Cenaz Posted January 14, 2011 Share Posted January 14, 2011 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 More sharing options...
Cenaz Posted January 14, 2011 Author Share Posted January 14, 2011 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 Link to comment https://forums.phpfreaks.com/topic/224404-redirect-after-submit/#findComment-1159344 Share on other sites More sharing options...
mrqpro Posted January 19, 2011 Share Posted January 19, 2011 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 Link to comment https://forums.phpfreaks.com/topic/224404-redirect-after-submit/#findComment-1161814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.