Saturday, November 27, 2004

Ah.. Berjaya menyelesaikan untuk "Prevent refresh (F5)" daripada resubmmit data dr form. dengan berpandukan kod ni:

[HTML]
[BODY]
[?
if ($newrecord) {
mysql_query( "......" );
Header( "location: index.php" );
}
?]

[FORM]
[INPUT NAME=newrecord>
[INPUT TYPE=submit>
[/FORM]


[/BODY>]
[/HTML]



The header line in the middle makes the page load again without the
$newrecord variable. That way, if the user refreshes, it'll simply load
index.php again.


Note: []=<>, i replace because this blog supporting html codes..but i just want to view my code.

0 Comments:

Post a Comment

<< Home