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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.