refresh on submit

K

kindermaxiz

I have a php script with a form that insert data in a mysql db and
when I click on submit I would like the page to refresh after the
insertion, how can I do that? it's a php script that display data from
a mysql db, and the submit button modify the content of the page yet I
need to manually refresh to see the result of my insertion.

it kinda looks like this:

echo "<form method=\"post\" action=$php_self>";
echo "<br>$dispayed_colname:<BR><INPUT TYPE=\"TEXT\" NAME=\"hey\"
SIZE=\"40\">";

echo "<p><input type=\"submit\" name=\"submit_the_values\"
value=\"$submit\">
</form>";

if($submit_the_values){
$sql=mysql_query("INSERT INTO $tabname($cols_to_insert)". "VALUES
($hey)");

//I would like to refresh $php_self here, please tell me if you know
:)

}



thanx in advance

Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top