SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using echo for a table produces blank page, not even errors!!!?

    Hi, I have a hyperlink which goes to the page below and passes the PK_ID from a query into 'userid'. From this we query the DB and then echo a table with a form; only the textboxes are already populated with the data from the query (in theory)!!!

    But I get a blank page! I have error reporting on php and mysql but nothing is displayed?

    Code:
    <?php
    
    echo "<form method=\"post\" action=\"\" style=\"padding-left: 10px\">";
    
    ini_set('display_errors','On');
    error_reporting(E_ALL);
    
    $user = $_GET['userid'];
    
    include 'config.php';
    include 'opendb.php';
    
    $query = "select * from users WHERE user_id LIKE '$user'"; 
    
    $result = mysql_db_query("servicemgmt", $query . mysql_error());
    
    $r = mysql_fetch_array($result);
    
    $firstname = $r['user_fname'];
    $lastname = $r['user_lname'];
    $ext = $r['user_ext'];
    $bleep = $r['user_bleep'];
    $exttel = $r['user_extno'];
    $email = $r['user_email'];
    
    
    echo "<table style=\"width: 80%\">";
    echo "<tr><td>First Name</td><td><input type=\"text\" value=\"$firstname\" name=\"firstname\" id=\"firstname\" style=\"width: 160px\"/></td><td>Last Name</td><td> <input type=\"text\" value=\"$lastname\" name=\"lastname\" id=\"lastname\" style=\"width: 160px\"/></td></tr>";
    echo "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td>Extension</td><td> <input type=\"text\" value=\"$ext\" name=\"ext\" id=\"ext\" style=\"width: 160px\"/></td><td>Bleep No.</td><td> <input type=\"text\" value=\"$bleep\" name=\"bleep\" id=\"bleep\" style=\"width: 160px\"/></td></tr>";
    echo "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td>External Tel.</td><td><input type=\"text\" value=\"$exttel\" name=\"exttel\" id=\"exttel\" style=\"width: 160px\"/></td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td>Email</td><td><input type=\"text\" value=\"$email\" name=\"email\" id=\"email\" style=\"width: 200px\" /></td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
    echo "<tr><td><input name=\"updateuser\" type=\"submit\" id=\"updateuser\" value=\"Update User Details\" /></td><td>&nbsp;</td><td>&nbsp;</td><td><input name=\"reset1\" type=\"reset\" value=\"Clear Form\" /></td></tr>";
    echo "</table>";
    
    echo "</form>";
    
    ?>

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Check the web server's error_log.


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
  •