faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 6 people (67%) answered Yes
Recently 4 of 6 people (67%) answered Yes

Entry

If I append to a file, but if I hit refresh, the same info gets appended again. How do I fix that?

Mar 19th, 2008 22:49
ha mo, Jakub Vrana, Mike Chavez,


You can process the data on some page and just send the Location 
header directing to the page showing the data.
file1.php
<form action="file2.php">
...
</form>
file2.php
<?php
// process the data without outputing any information
header("Location: file3.php");
?>
file3.php
<?php
// show the data
?>
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com