- Joined
- Jun 14, 2004
- Posts
- 11,076
- Reaction score
- 962
Any PHP wizards out there?
I am a newbie to this but building my first input form in PHP to a MySQL database.
The fields I have in my form are:
3 things I need help with.
"Id" is a unique key with gets created and incremented automatically, so do I need to include this in the form? and just leave it blank?
Secondly, "domain" is set to unique also, how do I handle it in the form to tell me if the domain already exists in the DB?
I want to have drops down lists for a couple of fields (currency for example) how do I do this?
Many thanks
I am a newbie to this but building my first input form in PHP to a MySQL database.
The fields I have in my form are:
Code:
$sql = "INSERT INTO item (id,domain,ccy,Sale_Price,UK_Price,Source,Month,Category,Keyword) VALUES ('$id','$domain','$ccy','$Sale_Price','$UK_Price','$Source','$Month','$Category','$Keyword')";
3 things I need help with.
"Id" is a unique key with gets created and incremented automatically, so do I need to include this in the form? and just leave it blank?
Secondly, "domain" is set to unique also, how do I handle it in the form to tell me if the domain already exists in the DB?
I want to have drops down lists for a couple of fields (currency for example) how do I do this?
Many thanks