Hey there. I'm a bit of a noob so I apologize if this is an obvious question. I am trying to query a database based on the chose from a drop down menu in the same form so it looks like this.
<?php
if(dropDownOption === 0)
return array("Author" => $form->data("userinputfindabook"));
if(dropDownOption === 1)
return array("book title" => $form->data("userinputfindabook"));
if(dropDownOption === 2)
return array("ISBN" => $form->data("userinputfindabook"));
?>
The problem is I don't know how to write the condition of the if statement.
<?php
if(dropDownOption === 0)
return array("Author" => $form->data("userinputfindabook"));
if(dropDownOption === 1)
return array("book title" => $form->data("userinputfindabook"));
if(dropDownOption === 2)
return array("ISBN" => $form->data("userinputfindabook"));
?>
The problem is I don't know how to write the condition of the if statement.