I am new to this website and also new in php..
I just want to ask on how to check a specific data or value in mysql database using the SELECT AND WHERE clause..
I have a table called websites.. And it has 3 fields namely id,websitename and ipaddress.
Sample content in the table
id websitename ipaddress
1 www.google.com 12.1.1.0
2 www.ebay.com 1.1.1.1
In my form I have a textbox where the user can input the website name and it has a button named get ip address..
To get the ip address of the website entered by the user I used the function in php called gethostbyname();
what i want to do is before gettip the ip address of the website entered by the user it should first check the database if the website name is already there. If the website name already exists, it should prompt a message cannot add but if the website name is not yet stored in the database it should get the ip address of the website and then it should be inserted into the table.
Please help I am so sorry I am a newbie.. Thank you very much in advance..