Whats good
I am working on a php program that reads in user input from 2 drop down menus and a text field. What I am trying to accomplish is have the user input the data from drop downs and the text field which may or may not correspond to a record in the database. The program is supposed to check if there is a record in the database that corresponds to the details entered in by the user and then refreshes the page and says whether or not it exists. After that it outputs onto a new line the same exact menu allowing you to change the details of the records the user is searching through. So basically all the info the user queried before remains on the page and he is allowed to compare it to the new info and it keeps going like that. Anyway I got drop down menus and the respawning(new menu lines) parts to work.
My problem concerns the input for the text field. The user has to type in a number for the text field then that number is put into a variable. The variable is then put in as part of a query to the db. What I dont understand how to do is compare the input text to the result of the query. To reiterate I am trying to check if a number the user enters exists in the database.
I am looking for any suggestions on how to do this. Here is the part of the code I am working with. The whole program is too long to post. I am working with an oracle database and I only have access to it through the php.
Thanks for reading through all of this.
Code:
echo("<td>");
echo("<input type=text name=opt_strk onBlur='submit();' >");
$strike_number = $_REQUEST['opt_strk'];
$query1 = "select strike from surfaces where strike = $strike_number and undl_indx = $undl_indx and expire_date = ".$_SESSION['opt_exd_vals'][$opt_indx]." and call_put = '".$_SESSION['opt_cp_vals'][$opt_indx]."' ";
$parsed1 = ociparse($db_conn, $query1);
$succ1 = ociexecute($parsed1);
echo("</td>");