MySQL Forums
Forum List  »  PHP

Re: jquery update database
Posted by: ollie smith
Date: March 23, 2015 12:42PM

<?php include_once('Connections/nlaco.php'); ?>
<?php
error_reporting(-1);
if( $_REQUEST["name"] )
{
$id = trim($_REQUEST['name']);


$query = mysql_query("SELECT * FROM house WHERE id = $id");
$upform = mysql_query($query, $db);// or die(mysql_error());
$row_upform = mysql_fetch_assoc($upform);
$totalRows_upform = mysql_num_rows($upform);

echo $totalRows_upform;

mysql_free_result($upform);
}
?>
<?php echo $id; ?><br>
<html>
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First_name:</td>
<td><input type="text" name="first_name" value="<?php echo htmlentities($row_upform['first_name'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Last_name:</td>
<td><input type="text" name="last_name" value="<?php echo htmlentities($row_upform['last_name'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Position:</td>
<td><input type="text" name="position" value="<?php echo htmlentities($row_upform['position'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td>
<td><input type="text" name="address" value="<?php echo htmlentities($row_upform['address'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="city" value="<?php echo htmlentities($row_upform['city'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">State:</td>
<td><input type="text" name="state" value="<?php echo htmlentities($row_upform['state'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="zip" value="<?php echo htmlentities($row_upform['zip'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Phone:</td>
<td><input type="text" name="phone" value="<?php echo htmlentities($row_upform['phone'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Fax:</td>
<td><input type="text" name="fax" value="<?php echo htmlentities($row_upform['fax'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Email:</td>
<td><input type="text" name="email" value="<?php echo htmlentities($row_upform['email'], ENT_COMPAT, ''); ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td><input type="submit" value="Update record"></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="id" value="<?php echo $id; ?>">
</form>


<p>&nbsp;</p>
</html>

Options: ReplyQuote


Subject
Written By
Posted
March 23, 2015 11:38AM
March 23, 2015 12:37PM
Re: jquery update database
March 23, 2015 12:42PM
March 23, 2015 01:22PM
March 23, 2015 01:46PM
March 23, 2015 03:49PM
March 23, 2015 04:25PM
March 23, 2015 04:44PM
March 24, 2015 09:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.