www.webdeveloper.com

Search:

Type: Posts; User: weenis

Search: Search took 0.02 seconds.

  1. How to deal with errors in class constructor?

    In most other languages, if something goes wrong while creating an object, I can have my constructor return null and that's the end of it, the object is not created.

    Apparently that is not so with...
  2. You'll need to use a "session" in PHP to remember...

    You'll need to use a "session" in PHP to remember what ad was loaded across page loads, and then you can increment that number on each pageload.
  3. Basically the same thing you did with the drop...

    Basically the same thing you did with the drop down, just echo it within the textarea tags. Simplified:


    <textarea name="address"><? echo htmlentities($addr); ?></textarea>

    (Unless I'm not...
  4. You can use the mail()...

    You can use the mail() function to send you a link using basename( $_FILES['uploadedfile']['name'])
  5. Replies
    2
    Views
    836

    Hi Karfeef, it looks like it's a problem with...

    Hi Karfeef, it looks like it's a problem with your SQL. You'll want to replace "SELECT" with "VALUES" and put all the values within a single set of parenthesis. Also you had some things in...
  6. Replies
    8
    Views
    1,114

    PHP is server-side, so there's no way to shrink...

    PHP is server-side, so there's no way to shrink the image before or during upload with PHP. The only PHP solution would be to edit your php.ini as hastx said, then use the PHP image libraries to...
  7. The code Mindzai gave you are two different...

    The code Mindzai gave you are two different methods, so you can either do it the MySQL way or the PHP way, you don't have to use both at the same time. :)

    The PHP method you're using (employing...
  8. On the markup side of things, make sure all your...

    On the markup side of things, make sure all your radio buttons have the same name. So it might look like this:


    <input type="radio" name="choices" value="1" /> Run Query 1
    <input type="radio"...
  9. It's kind of hard to read through your markup,...

    It's kind of hard to read through your markup, but the way you usually do an "order review" kind of page is submit that form to a page that accepts the $_POST variables.

    Then using those $_POST...
  10. Replies
    4
    Views
    714

    I'm not sure if this is exactly what you need,...

    I'm not sure if this is exactly what you need, but you might want to take a look at array_count_values()
  11. Replies
    2
    Views
    3,319

    If I'm understanding you correctly, linking to a...

    If I'm understanding you correctly, linking to a page with this URL:

    http://www.domain.com/page.php?firstvar=value&secondvar=value

    Will make firstvar and secondvar available in the resulting...
  12. Replies
    4
    Views
    926

    You are correct that this is more of a(n)...

    You are correct that this is more of a(n) .htaccess thing. More specifically, you can use mod_rewrite in your .htaccess file.

    Here's a good guide to get you started, or google "mod_rewrite" for...
  13. Are the two images the same format? It might be...

    Are the two images the same format? It might be a color palette issue.
  14. Replies
    5
    Views
    1,639

    Oh! I see. In that case, I guess it depends on...

    Oh! I see. In that case, I guess it depends on your code.

    One way could be, instead of echo-ing all your output, keep appending the strings from your statements to a variable (using .= for...
  15. Replies
    3
    Views
    2,207

    Looks like that's exactly what I need. Thanks!

    Looks like that's exactly what I need. Thanks!
  16. Replies
    3
    Views
    2,207

    I should mention I have tried things like: ...

    I should mention I have tried things like:


    preg_replace("/<cut>(.*)</cut>/i", "<div id=\"cut_".++$x."\">$1</div>", $inputText);

    But that doesn't work because the ++$x is just evaluated when...
  17. Replies
    3
    Views
    2,207

    Increment a variable in preg_replace()?

    Is there any way I can increment a variable for each replacement in a preg_replace() statement?

    So basically if I have something like:


    <cut>Text one</cut>
    <cut>Text two</cut>

    And after...
  18. Thread: .htaccess issue

    by weenis
    Replies
    2
    Views
    940

    Have you tried creating a .htaccess file within...

    Have you tried creating a .htaccess file within the directory with the zip files with something like this in it:


    RewriteEngine On
    RewriteRule .*\.(zip)$ - [F]
  19. Replies
    5
    Views
    1,639

    Check out file_put_contents()...

    Check out file_put_contents() which will write anything to a file. :)
Results 1 to 19 of 19
HTML5 Development Center



Recent Articles