Welcome to WebmasterWorld Guest from 23.20.184.141

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Need a redirection script

badly!

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

New User

10+ Year Member

joined:Nov 24, 2003
posts:30
votes: 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!

:)

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

Senior Member

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

joined:Feb 4, 2002
posts:5044
votes: 0


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

Nick

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

New User

10+ Year Member

joined:Nov 24, 2003
posts:30
votes: 0


don't understand it :(
7:12 pm on Feb 22, 2003 (gmt 0)

Senior Member

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

joined:Feb 4, 2002
posts:5044
votes: 0


What don't you understand?

header("Location: page.html");

Nick

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

New User

10+ Year Member

joined:Nov 24, 2003
posts:30
votes: 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.
7:21 pm on Feb 22, 2003 (gmt 0)

Senior Member

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

joined:Feb 4, 2002
posts:5044
votes: 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

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

New User

10+ Year Member

joined:Nov 24, 2003
posts:30
votes: 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.
11:10 pm on Feb 25, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Apr 4, 2002
posts:236
votes: 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.