There is a field called name and i have three records with names of stock items. I have tried all of them.
Heres the html form im using
<HTML>
<HEAD><TITLE> Stock Search System </TITLE></HEAD>
<BODY>
<FORM METHOD="POST" ACTION="/cgi-bin/project2.cgi">
Enter Stock name: <INPUT TYPE=TEXT NAME=Value>
<INPUT TYPE="SUBMIT">
</FORM>
</BODY>
</HTML>
| [reply] |
Well, first do what everyone has told you: change @results = $sth->fetchrow_array to @row = $sth->fetchrow_array. What I was suggesting by asking you if there was a param('Value') was that you should check in your script if something was entered in the field before attempting to query the database using the field. Yes, you have a field with that name in your form, but your script so far has no way to tell if the user put anything in that fields before clicking "submit".
| [reply] |
So sorry 2 every1 and thanks at the sametime
I left this code $sth->execute($sth); how it was when it should have been like $sth->execute(); now its work fine :)
| [reply] |