Jump to content

Recommended Posts

em facing problem in update records.

 

form submit successfully nut records is not updating. i dont whats the problem.

 

kindly solve my problem as soon as possible

 

 

this is form page

 



<form id="form1" name="form1" method="post" action="update_teacher_records_process.php">
<p>Name :
<!-- name of this text field is "name" -->
<input name="teachername" type="text" id="teachername" value="<? echo $row['teachername']; ?>"/>
<br />
Email :
<!-- name of this text field is "email" -->
<input name="cellno" type="text" id="cellno" value="<? echo $row['cellno']; ?>"/>
<br />
Tel :
<!-- name of this text field is "tel" -->
<input name="residentialadd" type="text" id="residentialadd" value="<? echo $row['residentialadd']; ?>"/>
</p><br><br>

<input name="tuition_asg" type="text" id="tuition_asg" value="<? echo $row['tuition_asg']; ?>"/>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>



 

 

this is my update code

<?PHP 

include("admin_conn.php");






// Get parameters from form.
$teachid=$_POST['teachid'];
$teachername=$_POST['teachername'];
$cellno=$_POST['cellno'];
$residentialadd=$_POST['residentialadd'];
$tuition_asg=$_POST['tuition_asg'];

// Do update statement.
mysql_query("UPDATE teachers set teachername='$teachername', cellno='$cellno', residentialadd='$residentialadd', tuition_asg='$tuition_asg' where teachid='$teachid'");

// Re-direct this page to select.php.
header("location:view_teacher_records.php");
exit;

?>


 

datatype in database is text.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/173779-problem-in-update-records/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.