Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear a Form using Php

Status
Not open for further replies.

otgriffin

Programmer
Jan 21, 2003
8
US
Hello,

I am trying to clear a form after it's information has been submitted into the Database and before it is redirected to a Thank you page. I tried using the onload function to clear the page an it worked but I only want it to clear once it has been submitted not on any other time (such as hitting the back button).(Oh I am using php and javascript). I am wanting this so that once submitted the user information is not visible to anyone. I also want to keep the user from entering in a duplicate record by accidently hitting the submit button. I was wondering if the <?php include(&quot;javascript.inc&quot;);?> would be helpful. Also I was reading something about a Smarty package and was hoping someone can explain to me more about that package. This package has a clear_all_cache function that I though would help me get the result I am wanting.Can someone please give me some advise concerning these issues.

Thanks to everyone in advance!!!!

 
Clearing a form has nothing whatsoever to do with PHP. This is something that is done on the client side, hence PHP, which runs on the server side, is way out of the picture. //Daniel
 
Daniel,

Do you have any suggestions. I was reading where some programmers used the meta method. For example:

header (&quot;Expires: &quot;.gmdate(&quot;D, d M Y H:i:s&quot;, time()).&quot; GMT&quot;);
header (&quot;Last-Modified: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;) . &quot; GMT&quot;);
header (&quot;Cache-Control: no-cache, must-revalidate&quot;);
header (&quot;Pragma: no-cache&quot;);

or

META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;-1&quot;>

</BODY>
<HEAD>
<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;-1&quot;>.

I am sort of new at using Php. I want to prevent the user browser from cache a certain page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top