Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Example Code

Status
Not open for further replies.

M2E

IS-IT--Management
Aug 1, 2005
28
GB
Could someone please provide me with example code on how I would do the following!? New to PHP, and not having much luck!

What happens is, a user enters an email address into a form, but then I need to check the MySQL db that this address does not already exsist.

IF address exists then display a message saying so, and ask to enter again.

ELSE add the address to the database.

Not particularly sure on how I would be incorporating the SQL with the PHP.


Thanking you in advance!

----Ment2Excel (M2E)----
--LEARN BY EXAMPLE--
 
I recommend that you first look in the PHP online manual,
In the case of MySQL database access, there is lots of example code in the online manual. The manual page for mysql_fetch_assoc() has a good example of connecting to a MySQL database server and retrieving information.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top