Jump to content

question regarding delay


shibbi3

Recommended Posts

hi everyone,

I was just wondering if anyone knows how to do the following:

Right now I have a form setup and when the user submits it, I want a new page to come up that says 'FORM SUBMITTED THANK YOU', and then after a 5 second delay it auto redirects the user back to the main page say 'index.php'...

Im not sure if this is a php problem... does anyone know?

My form is the following:
[code]

<form method="post" action="<?php echo basename($_SERVER["PHP_SELF"]); ?>" enctype="application/x-www-form-urlencoded"><div>
  <p><b>Name:</b><br /><input type="text" name="name" value="<?php if (isset($name)) echo htmlentities(stripslashes($name)); else echo ""; ?>" size="35" /></p>
  <p><b>E-mail:</b><br /><input type="text" name="email" value="<?php if (isset($email)) echo htmlentities(stripslashes($email)); else echo ""; ?>" size="35" /></p>
  <p><b>Subject:</b><br /><input type="text" name="subject" value="<?php if (isset($subject)) echo htmlentities(stripslashes($subject)); else echo ""; ?>" size="35" /></p>
  <p><b>Message:</b><br /><textarea name="text" cols="55" rows="12"><?php if (isset($text)) echo htmlentities(stripslashes($text)); else echo ""; ?></textarea></p>

  <br /><br />
  <p><input type="submit" name="form_submitted" value="OK - Submit" /></p>
  </div></form>

[/code]

Everything is working except I want a new page to come up when its submitted and After a 5 second stop  on the new page, I want to redirect the user to the main page.

Thanks for any suggestions!
Link to comment
https://forums.phpfreaks.com/topic/23703-question-regarding-delay/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.