|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Smurf Join Date: Oct 2006
Posts: 15
![]() | Hi I have a problem with my paypal payment page. Whenever a user click on the paypal option, this error shows up instead of the paypal payment page: Warning: Header may not contain more than a single header, new line detected. in /home/singapor/public_html/payment.php on line 101 Anybody can help??Please advise..... Thanks Matt |
| |
|
| |||||||
| | #2 |
| Junior Guru Contributor Join Date: Aug 2006
Posts: 578
![]() | what are you trying to do, give some of the code please that would be more helpful |
| |
| | #3 |
| Smurf Join Date: Oct 2006
Posts: 15
![]() | here is the code, please note that other than paypal, the rest of the payment options are disabled and do not show up on my site. offers; //echo "cur-offr=".$nn.""; $prqr=mysql_query("select * from prices where PriceID='$sl'"); $prqr1=mysql_fetch_object($prqr); $prqr2=$prqr1->offers; $pckprior=$prqr1->PriorityLevel; $pckprice=$prqr1->PriceValue; $pcktype=$prqr1->PriceType; $pckduratin=$prqr1->Duration; $nd=$nn+$prqr2; //echo "need=".$nd; $pckname=$_GET[PaymentGateway]; mysql_query("update agents set offers='$nd' where username='$usrnm'"); $usid=mysql_fetch_object(mysql_query("select * from agents where username='$usrnm'")); $usrid=$usid->AgentID; //---------------------------- if($_GET['more']!="") { $pc=mysql_query("select * from moreoffer where user='$usrnm'"); $num=mysql_num_rows($pc); //echo "num=".$num; if($num=="" || $num==0 || $num>0) { $qq=mysql_query("insert into moreoffer (userid,user,PackageName,PriceID,PriceValue,Durati on,PriorityLevel,PriceType,offers) values ('$usrid','$usrnm','$pckname','$sl', '$pckprice','$pckduratin','$pckprior','$pcktype',' $prqr2')"); //echo mysql_error(); } else { $qq=mysql_query("update moreoffer set userid='$usrid',user='$usrnm',PackageName='$pcknam e',PriceID='$sl', PriceValue='$pckprice',Duration='$pckduratin',Prio rityLevel='$pckprior',PriceType='$pcktype',offers ='$prqr2' where user='$usrnm'"); } } else { //-------------------------------------------------- $pc=mysql_query("select * from pricecontrol where user='$usrnm'"); $num=mysql_num_rows($pc); //echo "num=".$num; if($num=="" || $num==0 || $num>0) { $qq=mysql_query("insert into pricecontrol (userid,user,PackageName,PriceID,PriceValue,Durati on,PriorityLevel,PriceType,offers) values ('$usrid','$usrnm','$pckname','$sl', '$pckprice','$pckduratin','$pckprior','$pcktype',' $prqr2')"); //echo mysql_error(); } else { $qq=mysql_query("update pricecontrol set userid='$usrid',user='$usrnm',PackageName='$pcknam e',PriceID='$sl', PriceValue='$pckprice',Duration='$pckduratin',Prio rityLevel='$pckprior',PriceType='$pcktype',offers ='$prqr2' where user='$usrnm'"); } } //get the price details $q1 = "select * from prices where PriceID = '$_GET[SelectedPackage]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); //update the advertiser's record/credits $aexp = mktime(0,0,0,date(m) + $a1[Duration],date(d),date(Y)); //set the expire date //$q1 = "update agents set PriorityLevel = '$a1[PriorityLevel]', offers = '$a1[offers]', ExpDate = '$aexp' where AgentID = '$_SESSION[AgentID]' "; //mysql_query($q1) or die(mysql_error()); //get the agent details $q1 = "select * from agents where AgentID = '$_SESSION[AgentID]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); //get the price details $q2 = "select * from prices, priority where prices.PriceID = '$_GET[SelectedPackage]' and prices.PriorityLevel = priority.PriorityLevel "; $r2 = mysql_query($q2) or die(mysql_error()); $a2 = mysql_fetch_array($r2); if($_GET[PaymentGateway] == "paypal") { //paypal post header("location:https://www.paypal.com/xclick?business=$aset[PayPalEmail]&item_name=$a2[PackageName] for $a1[FisrtName] $a1[LastName] ($a1[username])&first_name=$a1[FirstName]&last_name=$a1[LastName]&email=$a1[email]&item_number=1&custom=$_SESSION[AgentID]|$_GET[SelectedPackage]&amount=$a2[PriceValue]¬ify_url=$site_url/notify.php&return=$site_url"); exit(); } elseif($_GET[PaymentGateway] == "stormpay") { header("location:https://www.stormpay.com/stormpay/handle_gen.php?generic=1&vendor_email=$aset[sp_vendor_email]&payee_email=$aset[sp_payee_email]&transaction_ref=$_SESSION[AgentID]|$_GET[SelectedPackage]&product_name=$a2[PackageName] for $a1[FisrtName] $a1[LastName] ($a1[username])&amount=$a2[PriceValue]&require_IPN=1¬ify_URL=$site_url/sp_notify.php&return_URL=$site_url"); exit(); } elseif($_GET[PaymentGateway] == "2checkout") { // 2checkout redirect header("location:https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c?sid=$aset[SellerID]&total=$a2[PriceValue]&cart_order_id=$_SESSION[AgentID]|$_GET[SelectedPackage]&card_holder_name=$a1[FirstName] $a1[LastName]&email=$a1[email]&phone=$a1[phone]"); } else { //manual //send an email to the admin $to = $aset[ContactEmail]; $subject = "Manual Service Activation Request"; $message = "A client has selected Manual Service Activation\nHere are the details:\n\n"; $message .= "Username: $a1[username]\nNames: $a1[FirstName] $a1[LastName]\nSelected Package: $a2[PackageName] $a2[PriorityName], $a2[Duration] months, $a2[offers] offers\n\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); //get the templates ?> |
| |
| | #4 |
| Junior Guru Contributor Join Date: Aug 2006
Posts: 578
![]() | The php code should start on line 1 if you want the header to work, start the php <? on line 1 and everything should work to the way you like without any errors
__________________ Free Online Addictive Games - Fun flash arcade ![]() Car Specifications - Ultimate Car Guide |
| |
| | #5 |
| Smurf Join Date: Oct 2006
Posts: 15
![]() | my apologies.... the <?php code is there, I overlook the copying when I copied the codes. so the problem still exist. |
| |
| | #6 |
| Junior Guru Contributor Join Date: Aug 2006
Posts: 578
![]() | you know when the php code starts make sure that you start it on line 1 then the page redirection should work.
__________________ Free Online Addictive Games - Fun flash arcade ![]() Car Specifications - Ultimate Car Guide |
| |
| | #8 |
| Junior Guru Contributor Join Date: Aug 2006
Posts: 578
![]() | i assume that you have fixed the problem
__________________ Free Online Addictive Games - Fun flash arcade ![]() Car Specifications - Ultimate Car Guide |
| |
| | #9 |
| Smurf Join Date: Oct 2006
Posts: 15
![]() | nope....its still not working... well gonna try another script from another of my site thanks for your attention |
| |
| | #10 |
| Junior Guru Contributor Join Date: Aug 2006
Posts: 578
![]() | Its ok and sorry we could not help fully
__________________ Free Online Addictive Games - Fun flash arcade ![]() Car Specifications - Ultimate Car Guide |
| |
(Threads which have no activity for more than 30 days are automatically closed.) |
| Quick Reply | ||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Weird ip problem | dre | General Talk | 6 | 08-18-2006 01:34 AM |
| iWebTool Problem | Daniel Malone | Help and Support | 4 | 06-19-2006 07:11 PM |
| frame problem | marionn | HTML | 1 | 05-27-2006 01:11 PM |
| Email Problem | WideOpen | PHP | 3 | 04-08-2006 12:16 PM |
| problem with my order | sydney | Help and Support | 1 | 03-31-2006 11:50 PM |