Mysql not updating [Resolved]
Posted: Fri Aug 30, 2013 10:22 am
Okay, I've spent a few hours trying to figure out why this isn't working. I can't find any errors visibly, and there are no errors displayed. So here I am lol....
Here is my isset function when they choose to update the information:
Here is the input area that will be used for the isset:
Here is the submit that will call the issset:
Is it not working because of the limit one? I only want the first entry displayed is why I did it that way. Other than this, I have looked the code a billion times and find nothing wrong. Grrr Thx.
*EDITED* If you want to know the post hidden, here:
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'] ?>" />