usadarts Posted March 3, 2007 Share Posted March 3, 2007 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 More sharing options...
ted_chou12 Posted March 3, 2007 Share Posted March 3, 2007 Use javascript instead: <body onload="timer=setTimeout('move()',5000)"> <script language="JavaScript"> var time = null function move() { window.location = '<?php echo $paypal;?>'} </script> Ted Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198581 Share on other sites More sharing options...
wildteen88 Posted March 3, 2007 Share Posted March 3, 2007 This is not working: <META HTTP-EQUIV="REFRESH" CONTENT = "5; URL=$paypal"> Is that being echo'd in php tags? This should work: echo '<META HTTP-EQUIV="REFRESH" CONTENT = "5; URL=' . $paypal . '">'; Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198589 Share on other sites More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 Thank you kindly for the help. I tried both options above and the page is just refreshing instead of loading a new url. David Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198594 Share on other sites More sharing options...
ted_chou12 Posted March 3, 2007 Share Posted March 3, 2007 can you give one example of your paypal string please? i wish to see the format of it, thank you. Ted Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198597 Share on other sites More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 $paypal = "<a href='https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=85.00&item_name=Organization ADO Membership¤cy_code=USD&bn=paywiz4msoe-001.000'></a>"; Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198600 Share on other sites More sharing options...
ted_chou12 Posted March 3, 2007 Share Posted March 3, 2007 is the $paypal string "https://www.paypal.com/cgi-bin/webscr?cmd%20=_xclick&business=adopay%40adodarts.com&amount=85.00&item_name=Organization%20ADO%20Membership¤cy_code=USD&bn=paywiz4msoe-001.000"? then i believe javascript redirect shoule work... because you do have the https:// thing infront... Ted Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198602 Share on other sites More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 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¤cy_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 More sharing options...
ted_chou12 Posted March 3, 2007 Share Posted March 3, 2007 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¤cy_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 More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 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¤cy_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 More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 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 . "¤cy_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=¤cy_code=USD&bn=paywiz4msoe-001.000 Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198643 Share on other sites More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 Any way to do this? See above Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198662 Share on other sites More sharing options...
usadarts Posted March 3, 2007 Author Share Posted March 3, 2007 Never mind.....got it..... php code infront of HTML informaiton Thanks Link to comment https://forums.phpfreaks.com/topic/41011-trying-to-redirect/#findComment-198665 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.