Heres the code:
<?php // Config File include ("config.php"); // Get client id $id = $_GET[ClientID]; // Query Database $query = "SELECT * FROM clients WHERE ClientID = '$id' ORDER BY ClientID DESC LIMIT 1"; $result = mysql_query($query); // Check if database returns a problem or not if (!$result) { echo "Unable to select data from table"; } else { while($row = mysql_fetch_array($result)): ?> <form action="update.php?id=<?php echo '$id'; ?>" method="post"> <table width="600" border="0" cellspacing="0" cellpadding="4"> <tr> <td width="142">Name:</td> <td width="442"><label for="name"></label> <input name="name" type="text" id="name" value="<?php echo $row['ClientName']; ?>"></td> </tr> <tr> <td>Email:</td> <td><label for="email"></label> <input name="email" type="text" id="email" value="<?php echo $row['ClientEmail']; ?>"></td> </tr> <tr> <td> </td> <td><input type="submit" name="update" id="update" value="Update"></td> </tr> </table> </form> <?php endwhile ?> <?php } ?>
When the page is loaded like "edit.php?id=5" it should display the form to edit a row in a database, but nothing shows, no errors, nothing, just a blank white page, can anyone help with this?
Edited by Andy Rixon, 23 January 2011 - 08:41 PM.