homepage Welcome to WebmasterWorld Guest from 50.17.107.233
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Need a redirection script
badly!
troi21




msg:1260065
 6:36 pm on Feb 22, 2003 (gmt 0)

I am offering a greeting card service on my website. I want the user to select the picture they want, enter the message details etc all in one form. Then I want them to press submit to send the information and then be automatically redirected to the order page. This should be simple enough but I don't have much coding knowledge. I have searched for free scripts but all seem to be for UNIX but I am on an NT server.

HELP!

:)

 

Nick_W




msg:1260066
 6:39 pm on Feb 22, 2003 (gmt 0)

Easily done with PHP:
[php.net...]

Nick

troi21




msg:1260067
 7:11 pm on Feb 22, 2003 (gmt 0)

don't understand it :(

Nick_W




msg:1260068
 7:12 pm on Feb 22, 2003 (gmt 0)

What don't you understand?

header("Location: page.html");

Nick

troi21




msg:1260069
 7:18 pm on Feb 22, 2003 (gmt 0)

wouldn't this cause an automatic redirect? i need them to input the information first, submit it and then be redirected to the order page.

Nick_W




msg:1260070
 7:21 pm on Feb 22, 2003 (gmt 0)

Well if your form submits to 'process.php', it would work like this:

#process.php
<?
// do form validation here

if(form validates) {
header("Location: success.php");
] else {
// do error stuff here
?>

WIth me?

Nick

troi21




msg:1260071
 7:26 pm on Feb 22, 2003 (gmt 0)

not entirely. i haven't got a clue about PHP. maybe i need to do some basic study before i try. or i will think of another approach or drop the idea altogether. thanks.

dhdweb




msg:1260072
 11:10 pm on Feb 25, 2003 (gmt 0)

Try adding this line to your form:

<INPUT NAME="success" TYPE="hidden" VALUE="http://www.your-domain-name.com/order.html">

This is assuming that you are sending the info through a CGI script like formmail or such.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved