SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist cturner01's Avatar
    Join Date
    Jun 2006
    Location
    My computer
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Why is my code displaying a blank page???

    Can someone please tell me this is happening? Thanks in advance.
    PHP Code:
    require "config2.php";
    $usersid $_POST['usersid'];
    $query "SELECT username, password, email FROM users WHERE username = '$usersid' LIMIT 1";
    $result mysql_query($query) or die("Could not select data from the database because: "mysql_error());
    while(
    $row mysql_fetch_array($result)){
        echo 
    "<div class=borderbg>";
        echo 
    "<b>Edit your Account</b>";
        echo 
    "<form action=account.php method=post>";
        echo 
    "Username: ".$row['username']."<br> E-mail address: <input name=email type=text value=".$row['email']."><br /><a href=comments.php>Edit comments</a> <br /> Current password: <input name=currentpassword type=text> <br /> New password: <input name=newpassword type=text><br /> Confirm new password: <input name=newpassword2 type=text> <br /> <input name=submit type=submit value=SAVE> <input name=reset type=reset value=RESET>";
        echo 
    "</form></div>";
    }
    mysql_close(); 

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    blank page

    PHP Code:
    require "config2.php"
    If the script fails to get the config2.php file it falls down. Double check that the file with that name exists. Or you could use include instead of require to see what errors you get.

  3. #3
    SitePoint Evangelist cturner01's Avatar
    Join Date
    Jun 2006
    Location
    My computer
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have worked out what the problem is.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •