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> </td><td> </td><td> </td><td> </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> </td><td> </td><td> </td><td> </td></tr>"; echo "<tr><td>External Tel.</td><td><input type=\"text\" value=\"$exttel\" name=\"exttel\" id=\"exttel\" style=\"width: 160px\"/></td><td> </td><td> </td></tr>"; echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; echo "<tr><td>Email</td><td><input type=\"text\" value=\"$email\" name=\"email\" id=\"email\" style=\"width: 200px\" /></td><td> </td><td> </td></tr>"; echo "<tr><td> </td><td> </td><td> </td><td> </td></tr>"; echo "<tr><td><input name=\"updateuser\" type=\"submit\" id=\"updateuser\" value=\"Update User Details\" /></td><td> </td><td> </td><td><input name=\"reset1\" type=\"reset\" value=\"Clear Form\" /></td></tr>"; echo "</table>"; echo "</form>"; ?>






Bookmarks