954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to stop data insert while html page is refreshing

hello everyone,

i need your help.

i m using update query for a table to update data. i want to insert data when submit button is pressed but when page is refeshed the table data is automatically updated the value. now i want to restrict automatic update except submit button is pressed.


how to do it ?
can any one please help me out.

Thanks

rezvi
Newbie Poster
5 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

put your insert query in nthis condition:

if(isset($_POST['addbutton']))
{
//insert query
}

put your update query in this condition:

if(isset($_POST['updatebutton']))
{
//update query
}
Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You