Newb Question - SELECT
Posted: Sat Oct 12, 2002 1:02 pm
Hi,
I'm new to using PHP and mySQL together.
All the tutorials I've seen on retrieving data from a mySQL database via. PHP just use a fixed criteria, i.e. SELECT * from sometable WHERE somefield = 'fixedvalue';
How can I query the database so that the input of a user in a text box is the criteria, i.e. if the user types in "monkey" for example and presses Submit, the query run would be SELECT * from sometable where somefield = 'monkey';
As I said, I'm new to this.
Preferably the form field and Submit button would be on the same page as the query results.
Thanks
jonat8
I'm new to using PHP and mySQL together.
All the tutorials I've seen on retrieving data from a mySQL database via. PHP just use a fixed criteria, i.e. SELECT * from sometable WHERE somefield = 'fixedvalue';
How can I query the database so that the input of a user in a text box is the criteria, i.e. if the user types in "monkey" for example and presses Submit, the query run would be SELECT * from sometable where somefield = 'monkey';
As I said, I'm new to this.
Thanks
jonat8