472,133 Members | 1,168 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

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 2536
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.