Jump to content

Redirect after submit


Cenaz

Recommended Posts

Elåå!

Need some help redirecting to a page after i hit the submit button for a form. Hoping for an answer:)

 

Here is the script:

 

<style type="text/css">

<!--

.a {

text-align: center;

}

-->

</style>

<img src="bilde/header.jpg" alt="description of the photo" width="705" height="207"></img>

 

<form action="form_send.php" method="post" />

<p>Navn:

  <input type="tekst" name="navn" /></p>

<p>TLF:

  <input type="tekst" name="TLF" />

</p>

<p>Backup:

 

  <input type="tekst" name="Backup" />

</p>

<p>Lader:

  <input type="tekst" name="Lader" />

</p>

<p>

  <textarea rows="20" cols="43" name="Kommentar"></textarea>

</p>

<input type="submit" value="Send inn" />

  </form>

 

Link to comment
https://forums.phpfreaks.com/topic/224404-redirect-after-submit/
Share on other sites

Found it out!

 

Place inside <head> to refresh page after 5 seconds:

 

<meta http-equiv="refresh" content="5" />

 

Redirect to http://example.com/ after 5 seconds:

 

<meta http-equiv="refresh" content="5;url=http://example.com/" />

 

Redirect to http://example.com/ immediately:

 

<meta http-equiv="refresh" content="0;url=http://example.com/" />

 

placed this: <meta http-equiv="refresh" content="5;url=http://example.com/" /> into my form_send and gadosh !

 

mark this as solved:D

 

Elåå!

Need some help redirecting to a page after i hit the submit button for a form. Hoping for an answer:)

 

Here is the script:

 

<style type="text/css">

<!--

.a {

text-align: center;

}

-->

</style>

<img src="bilde/header.jpg" alt="description of the photo" width="705" height="207"></img>

 

<form action="form_send.php" method="post" />

<p>Navn:

  <input type="tekst" name="navn" /></p>

<p>TLF:

  <input type="tekst" name="TLF" />

</p>

<p>Backup:

 

  <input type="tekst" name="Backup" />

</p>

<p>Lader:

  <input type="tekst" name="Lader" />

</p>

<p>

  <textarea rows="20" cols="43" name="Kommentar"></textarea>

</p>

<input type="submit" value="Send inn" />

  </form>

 

 

In your form_send.php file. After do something (get parameters....)

ex :

If ($_SERVER['REQUEST_MEHOD'] == 'POST') {

// do something

 

header('Location: your_page_which_you_want_to_redirect');

exit();

}

 

 

http://dacloi.com

 

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.