Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 12-14-2006, 03:53 PM   #1
acider
Smurf
 
acider's Avatar
 
Join Date: Oct 2006
Posts: 15
acider will become famous soon enough
Default Help needed, scripting problem.

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
acider is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 12-14-2006, 03:55 PM   #2
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Help needed, scripting problem.

what are you trying to do, give some of the code please that would be more helpful
mani is offline  
Old 12-14-2006, 05:55 PM   #3
acider
Smurf
 
acider's Avatar
 
Join Date: Oct 2006
Posts: 15
acider will become famous soon enough
Default Re: Help needed, scripting problem.

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
?>
acider is offline  
Old 12-14-2006, 08:21 PM   #4
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Help needed, scripting problem.

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
mani is offline  
Old 12-15-2006, 07:18 AM   #5
acider
Smurf
 
acider's Avatar
 
Join Date: Oct 2006
Posts: 15
acider will become famous soon enough
Default Re: Help needed, scripting problem.

my apologies....
the <?php code is there, I overlook the copying when I copied the codes.
so the problem still exist.
acider is offline  
Old 12-15-2006, 04:07 PM   #6
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Help needed, scripting problem.

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
mani is offline  
Old 12-15-2006, 08:22 PM   #7
kenni
Registered Member
 
kenni's Avatar
 
Join Date: Dec 2005
Posts: 1,543
kenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to behold
Default Re: Help needed, scripting problem.

What is on line 101 on that script?
__________________
Wanna thank someone? Give 'em a rep. More info.
kenni is offline  
Old 12-19-2006, 05:35 PM   #8
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Help needed, scripting problem.

i assume that you have fixed the problem
__________________
Free Online Addictive Games - Fun flash arcade
Car Specifications - Ultimate Car Guide
mani is offline  
Old 12-20-2006, 06:38 AM   #9
acider
Smurf
 
acider's Avatar
 
Join Date: Oct 2006
Posts: 15
acider will become famous soon enough
Default Re: Help needed, scripting problem.

nope....its still not working...
well gonna try another script from another of my site

thanks for your attention
acider is offline  
Old 12-22-2006, 04:28 PM   #10
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Help needed, scripting problem.

Its ok and sorry we could not help fully
__________________
Free Online Addictive Games - Fun flash arcade
Car Specifications - Ultimate Car Guide
mani is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

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


All times are GMT. The time now is 05:57 AM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.