joecooper Posted April 7, 2009 Share Posted April 7, 2009 This is some varibles that i am setting: $ordernumber==$_GET[txn_id]; $paymentdate==$_GET[payment_date]; $firstname==$_GET[first_name]; $lastname==$_GET[last_name]; $email==$_GET[payer_email]; $amount==$_GET[mc_gross]; $key==rand(1000000,9999999); The varibles are being set from whats in the URL bar, and then $key is a random number. When i do this: echo "$email"; or echo "$key"; it doesnt echo anything, but when i do this: echo rand(1000000,9999999); or echo $_GET[txn_id]; it displays. i dont know whats going on?! Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/ Share on other sites More sharing options...
Maq Posted April 7, 2009 Share Posted April 7, 2009 Use 1 equal sign not 2. Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803066 Share on other sites More sharing options...
tefuzz Posted April 7, 2009 Share Posted April 7, 2009 what does your url look like? Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803069 Share on other sites More sharing options...
joecooper Posted April 7, 2009 Author Share Posted April 7, 2009 Use 1 equal sign not 2. hmm. im sure some programming language i use uses 2 equal signs! Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803074 Share on other sites More sharing options...
Maq Posted April 7, 2009 Share Posted April 7, 2009 Use 1 equal sign not 2. hmm. im sure some programming language i use uses 2 equal signs! I'm sure one does... :-\ Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803076 Share on other sites More sharing options...
joecooper Posted April 7, 2009 Author Share Posted April 7, 2009 lol, i think i just got confused with the IF statements... i made this mistake a few times before! grrrr Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803085 Share on other sites More sharing options...
Silverado_NL Posted April 7, 2009 Share Posted April 7, 2009 also you havent qouted the $_GET variable array key name's. good habit to do that and keep your script nice and fast! Link to comment https://forums.phpfreaks.com/topic/152913-solved-varibles-are-not-working/#findComment-803121 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.