469,149 Members | 1,857 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,149 developers. It's quick & easy.

Use MYSQL SELECT statement from user input

I am new to PHP and MYSQL. I have a Database table with 4 field. FirstName, LastName, DateofBirth and MemberNumber. I would like to have a form where a user can fill in the FirstName, LastName and date of birth, and a select statement will return the membernumber bases on the user input.

This is how i would execute a script without user input. How do i change it to user input.
SELECT DISTINCT `MEMBERNO`
FROM `table`
WHERE `DATEOFBIRTH` = '1960-06-01'
AND `FIRSTNAMES` LIKE CONVERT( _utf8 'Name'
USING latin1 )
COLLATE latin1_swedish_ci
AND `SURNAME` LIKE CONVERT( _utf8 'Surname'
USING latin1 )
COLLATE latin1_swedish_ci


Can Someone PLEASE HELP
Jul 3 '07 #1
1 2412
r035198x
13,262 8TB
I am new to PHP and MYSQL. I have a Database table with 4 field. FirstName, LastName, DateofBirth and MemberNumber. I would like to have a form where a user can fill in the FirstName, LastName and date of birth, and a select statement will return the membernumber bases on the user input.

Can Someone PLEASE HELP
The designing of the forms and the PHP code for submiting the query should be asked in the PHP forum
Jul 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by hokieghal99 | last post: by
3 posts views Thread by dave | last post: by
reply views Thread by Mike Chirico | last post: by
1 post views Thread by David | last post: by
1 post views Thread by paulq182 | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.