Jump to content

Trying to redirect


usadarts

Recommended Posts

Hello,

 

I have an online form being filled out.  Once the form is submitted, a webpage comes up thanking them for joining the organization. I then need it to redirect to another page after about 5 seconds, however, the actual page is determined on what information they enter.  The pay is declared by a parm ($paypal).

 

This is not working:

<META HTTP-EQUIV="REFRESH" CONTENT = "5; URL=$paypal">

 

Is is coming up with this url:

http://adodarts.com/webmaster/$paypal

 

Link to comment
https://forums.phpfreaks.com/topic/41011-trying-to-redirect/
Share on other sites

Here is the actual string......notice the $noam parm....does that make a difference?

 

$paypal = "<a href='https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=' . $noam . '&item_name=Organization ADO Membership&currency_code=USD&bn=paywiz4msoe-001.000'></a>";

Link to comment
https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198606
Share on other sites

I see. here:

<body onload="timer=setTimeout('move()',5000)"> 
<script language="JavaScript"> 
var time = null 
function move() { 
window.location = '<?php echo "https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=$noam&item_name=Organization ADO Membership&currency_code=USD&bn=paywiz4msoe-001.000";?>'} 
</script>

does this work?

Ted

 

 

Link to comment
https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198608
Share on other sites

Almost....it loaded the paypal page, but without the price.

I changed code to:

<script language="JavaScript"> 
var time = null 
function move() { 
window.location = '<?php echo "https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=" . $_POST['noam'] . "&item_name=Organization ADO Membership&currency_code=USD&bn=paywiz4msoe-001.000";?>'} 
</script>

 

works perfect.

 

 

Thank you VERY much for all your help.

 

David

 

Link to comment
https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198614
Share on other sites

Another question pertaining to this......what if I do not have the parm declared until within the <php> tags?

 

<html>
<head>
<script language="JavaScript"> 
var time = null 
function move() { 
window.location = '<?php echo "https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=" . $_POST['noam'] . "&item_name=" . $description . "&currency_code=USD&bn=paywiz4msoe-001.000";?>'} 
</script>
</head>
<body onload="timer=setTimeout('move()',5000)">
<?php 
$name = $_POST['name'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$email = $_POST['email'];
$membership = $_POST['membership'];
$patch = $_POST['patch'];
$dues = $membership + $patch;

if($dues == "30.00"){
$description = "1 Year Annual Membership totaling $30.00";
} elseif($dues == "50.00"){
$description = "2 Year Annual Membership totaling $50.00";
} elseif($dues == "25.00"){
$description = "1 Year Renewal totaling $25.00";
} elseif($dues == "40.00"){
$description = "2 Year Renewal totaling $40.00";
} elseif($dues == "33.25"){
$description = "1 Year Annual Membership and 3 color patch totaling $33.25";
} elseif($dues == "53.25"){
$description = "2 Year Annual Membership and 3 color patch totaling $53.25";
} elseif($dues == "28.25"){
$description = "1 Year Renewal and 3 color patch totaling $28.25";
} elseif($dues == "43.25"){
$description = "2 Year Renewal and 3 color patch totaling $43.25";
}
...........

 

 

This is bringing up the following url:

https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=&item_name=&currency_code=USD&bn=paywiz4msoe-001.000

Link to comment
https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198643
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.