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

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
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.