View Single Post
Old 06-28-2007, 04:14 AM   #1 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Login Box - Connecting to a MySQL Database

Hello Everyone!!!,

How do I create a Username & Password page, based on the user name and password used to connect to the database?

Code:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
  die('Could not connect: ' . mysql_error());
}

// some code

mysql_close($con);
?>
If the Username and Password entered in a form is incorrect, a error message is displayed underneath the appropriate text box. However, if the Username & Password is correct, the page navigates to the content page where data is displayed from the table. Data displayed is as follows:
  • Name
  • Species
  • Sex
Many Thanks,
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote