homepage Welcome to WebmasterWorld Guest from 54.167.179.48
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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

10+ Year Member



 
Msg#: 749 posted 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

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 749 posted 6:39 pm on Feb 22, 2003 (gmt 0)

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

Nick

troi21

10+ Year Member



 
Msg#: 749 posted 7:11 pm on Feb 22, 2003 (gmt 0)

don't understand it :(

Nick_W

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 749 posted 7:12 pm on Feb 22, 2003 (gmt 0)

What don't you understand?

header("Location: page.html");

Nick

troi21

10+ Year Member



 
Msg#: 749 posted 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

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 749 posted 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

10+ Year Member



 
Msg#: 749 posted 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

10+ Year Member



 
Msg#: 749 posted 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved