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?! Quote 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. Quote 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? Quote 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! Quote 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... :-\ Quote 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 Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.