www.webdeveloper.com

Search:

Type: Posts; User: Gravy

Page 1 of 2 1 2

Search: Search took 0.01 seconds; generated 26 minute(s) ago.

  1. Replies
    15
    Views
    4,966

    I would change: echo '

    I would change:



    echo '<input type="hidden" name="id" value="$book_id_number>';


    to
  2. Replies
    5
    Views
    2,381

    $singleSQL = mysql_query("SELECT * FROM questions...

    $singleSQL = mysql_query("SELECT * FROM questions WHERE id='$question' ORDER BY rand() LIMIT 20;");


    Is something like this what you're looking for?

    Please not that you shouldn't use mysql_...
  3. Replies
    4
    Views
    989

    View Post

    That's not a small task:

    HTML
    CSS
    JavaScript
    PHP
    Databases
    Payment Gateways
    Security
    Legal
  4. Remember when choosing a DB interface for MySQL...

    Remember when choosing a DB interface for MySQL to use mysqli_ or PDO, not mysql_ which is outdated and will be removed from PHP.
  5. Replies
    4
    Views
    679

    If there really is a need to send a JS variable...

    If there really is a need to send a JS variable to PHP, trying using AJAX with jQuery. However, that's a whole new can of worms and will take a ton of reading on your part.

    There's also the...
  6. Replies
    5
    Views
    3,004

    Add the following to the start of the script to...

    Add the following to the start of the script to make sure all the data input is correct. It's a good debugging method.



    <pre>
    $_GET:
    <?php print_r($_GET);
    </pre>
  7. Replies
    8
    Views
    10,168

    A bit of a bump, though, I'd probably write it...

    A bit of a bump, though, I'd probably write it like this:



    <?php
    $thisEmail = $_POST['email'];
    ?>
    <textarea name="email" cols="75" rows="1" style="text-align:left;"><?=$thisEmail?></textarea>
  8. Replies
    5
    Views
    785

    There's the always popular 2: 1) Library...

    There's the always popular 2:

    1) Library system

    2) Mini Forum
  9. array_unique and array_flip(array_flip()) *Interesting*

    I was doing some investigating on PHP.net and read that array_flip(array_flip()) was faster than array_unique() for integers.

    So I did a test, and found it to be so.

    I happened to have a list...
  10. There is no error:...

    There is no error:
    http://www.php.net//manual/en/features.file-upload.errors.php

    [error] => 0
    UPLOAD_ERR_OK
    Value: 0; There is no error, the file uploaded with success.
    ...
  11. There we go... [error] => 1, that looks like the...

    There we go... [error] => 1, that looks like the cause of problems!

    We do a quick google for php file upload error 1 : https://www.google.com/search?q=php+file+upload+error+1
    ...
  12. Don't just run it, try to upload a file with the...

    Don't just run it, try to upload a file with the form. You can't see the errors and debugging info if you don't try to upload the file.
  13. It's just an option I've seen used really, it's...

    It's just an option I've seen used really, it's not exactly needed, but it's an option.
    When they click the activation link:

    example.com/confirm_email/749c71f6a29220a3ec168df

    There would just...
  14. You could also have them enter their account name...

    You could also have them enter their account name or something else select at registration on the activation page to make sure it is actually the same person who created the account. Not just someone...
  15. I just had a look at your site, it doesn't look...

    I just had a look at your site, it doesn't look too bad, but..

    Please, before you do anything else and before you consider what you've done wrong... This will stop you getting hacked today. At...
  16. Well, there seems to be the problem: Array (...

    Well, there seems to be the problem:

    Array
    (
    )

    -------
    Array
    (
    )
  17. Try replacing the PHP file with this: ...

    Try replacing the PHP file with this:



    <?php
    // Show the page as text instead of HTML. Can be helpful in debugging
    header('Content-Type:text/plain');

    // Enable debug error reporting
    ...
  18. Thread: Geolocation Help

    by Gravy
    Replies
    1
    Views
    1,000

    Why not just do it outside MySQL? I prefer to...

    Why not just do it outside MySQL?

    I prefer to keep my data in my database and my logic outside of it.

    Store it in 1 form in the DB and convert it when needed.
  19. Replies
    7
    Views
    633

    When I don't know what I'm doing, I always like...

    When I don't know what I'm doing, I always like to take the informative approach:



    <pre>
    <?php
    print_r($_POST);
    ?>
    </pre>
  20. I think I've got it... A white page.. is a...

    I think I've got it...

    A white page.. is a blank page with no code or viewable source, such as what is below, without the secret, hidden POST variable being submitted. Just a blank "white" page.
    ...
  21. Yes, that's what he was talking about, just...

    Yes, that's what he was talking about, just having the MP3's as normal files stored on the server and not in the database.
    Having the file location in the database is exactly what I mean, however I...
  22. I was in a little of a rush when I wrote that,...

    I was in a little of a rush when I wrote that, let's just make up a very simple example where the MP3 is available to everyone to download freely, (no security considerations):

    You upload a file...
  23. Pre-firstly (yes I just added this in), this...

    Pre-firstly (yes I just added this in), this should be sanitized. Perhaps with encodeURIComponent. JS is not really my field.



    var dataString = 'name=' + name + '&email=' + email + '&phone=' +...
  24. Remove print "User Submitted"; ...

    Remove



    print "User Submitted";


    Because of this you're getting:

    TrueUser Submitted returned instead of True, so it's not considered as a success or failure.
  25. Is there any reason you want to store the file in...

    Is there any reason you want to store the file in the database?
    I would store the file name, author, other information in the database, but put the MP3 itself just somewhere usually not reachable on...
Results 1 to 25 of 45
Page 1 of 2 1 2
HTML5 Development Center



Recent Articles