kabucek Posted January 15, 2009 Share Posted January 15, 2009 hi all, i have this piece of code to check the textbox input: $selectedProdCode="LMQ"; if ($memberDataArray['eventDate']="FEBRUARY 28") //changed from ttevents { $selectedProdCode="febevent"; } elseif ($memberDataArray['eventDate']='ttevents') { $selectedProdCode="ttevents"; } - with this i want to check: if user types: FEBRUARY 28 in the box the system will select febevent if user tyeps: ttevents in the box the system will select ttevents somehow it doesn't work, it selects febevent all the time. thanks! Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 15, 2009 Share Posted January 15, 2009 use == in both if statements...not = Quote Link to comment Share on other sites More sharing options...
Vince889 Posted January 16, 2009 Share Posted January 16, 2009 Just like rhodesa said, use == $selectedProdCode == "LMQ"; if ($memberDataArray['eventDate'] == "FEBRUARY 28") //changed from ttevents { $selectedProdCode == "febevent"; } elseif ($memberDataArray['eventDate'] == "ttevents") { $selectedProdCode == "ttevents"; } That should do what you want it to do. Quote Link to comment Share on other sites More sharing options...
kabucek Posted January 16, 2009 Author Share Posted January 16, 2009 i've tried that but it didn't work. is this because the: $memberDataArray['eventDate'] should be the value of the textbox? thanks Quote Link to comment 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.