Jump to content

check input from textbox


kabucek

Recommended Posts

 

 

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!

Link to comment
https://forums.phpfreaks.com/topic/140961-check-input-from-textbox/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.