Current location: Hot Scripts Forums » Programming Languages » PHP » After a user submits a form redirect them to a new page


After a user submits a form redirect them to a new page

Reply
  #1 (permalink)  
Old 05-22-08, 10:20 AM
steptoe steptoe is offline
New Member
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
After a user submits a form redirect them to a new page

Hi all

Need some help with this. I have form on my web site for a user to fill in, but after the user fills in the form and submits it, I want them to be directed to a new page.

I use cgiemail to process the for which works fine, the form action is

"http://www.mydomain.ie/cgi-bin/cgiemail/file.txt"> as i said this works fine.


Just wondering would anyone know how to direct the user after they click the submit button on the form to a new page on my web site.

I was thinking that it could be some php code but I not really familiar with the php Language

Any help with this would great

Thanks
steptoe
Reply With Quote
  #2 (permalink)  
Old 05-22-08, 10:56 AM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
If you are wanting to do this with php you would need to set the action to go to a php file to process, then use the header() function to change location

PHP Code:

<?php
//PROCESS FILE HERE

//IF SUCCESSFUL, REDIRECT
header('Location: newpage.php');

?>
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing login page if not logged in eprots Script Requests 1 12-23-07 04:58 PM
Problem with FormMail script for simple contact form amang Perl 2 09-21-07 07:59 PM
How do I create a form that, when submitted, a new page takes on its URL? NormanTang HTML/XHTML/XML 2 09-09-05 10:53 AM
Error in the form - Front page extention FreeStyler HTML/XHTML/XML 1 01-21-05 04:42 AM
passing array to hidden fields in form on next page? seala ASP 2 09-04-03 02:40 PM


All times are GMT -5. The time now is 07:44 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.