Here is my isset function when they choose to update the information:
Code: Select all
$select = mysql_query("select * from locations LIMIT 1");
if(isset($_POST['update'])){
$UpdateQuery = "UPDATE locations SET location='$_POST[Location]', name='$_POST[Name]', price='$_POST[Price]', level='$_POST[Level]', greeting='$_POST[Greeting]', exitgreet='$_POST[ExitGreet]' WHERE id='$_POST[hidden]'";
mysql_query($UpdateQuery); Code: Select all
<td>Location </td>
<td><span class="div2">
<input type="textarea" size="30" name="Location" id="Location" value= <?php echo $result['location'] ?> />
</span></td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>Code: Select all
<?php echo '<input type=image value=Update image name=update img src="' . '/adminpanelexample/images/user_edit.png">' ?>*EDITED* If you want to know the post hidden, here:
Code: Select all
<input type="hidden" name="hidden" id="edit5" value= "<?php echo $result['id'] ?>" />