Welcome to WebmasterWorld Guest from 54.227.125.200

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Need a redirection script

badly!

     

troi21

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

10+ Year Member



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

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

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



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

Nick

troi21

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

10+ Year Member



don't understand it :(

Nick_W

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

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



What don't you understand?

header("Location: page.html");

Nick

troi21

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

10+ Year Member



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

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

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



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

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

10+ Year Member



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

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

10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month