I am sending a parameter through URL like: domain-name.com/Edit-user.php?reg_no=NV000003 and retrieving data into in textfields for reg_no NV000003 from database. It is fine here but when I click on modify button and submit form by using below code:
<?php
if(/$_POST){
$query=mysql_query("update table-name set
NAME = '".(/$_REQUEST['name'])."',
EMAIL = '".(/$_REQUEST['email'])."'
where field-name = 'particular-value'
");
?>
It is updating the data table but with empty values in all fields. May be I am missing somthing. Any idea Plsss?
my form is
<form action="" method="post" id="modifystndt" name="modifystndt">
<table> <tbody> <tr> <td width="200px">Name of Student:</td>
<td width="400px"><strong><input type="text" name="name" id="name" value="<?php echo $NAME; ?>"></strong></td> </tr>
<tr> <td>E-mail :</td> <td><strong><input type="text" name="name" id="name" value="<?php echo $EMAIL; ?>"></strong></td> </tr>
<tr> <tbody> <table> </form>