View Full Version : dababase connection using php

04-12-2012, 03:39 PM
<title>Result Process</title>
$select = "SELECT * FROM customer WHERE Username ='$username'
AND Password='$password'";
$con = mysql_connect("localhost","root","");
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db("places of interest", $con);

$Name= $_POST["Name"];
$Address= $_POST["Address"];
$Username= $_POST["Username"];
$Password= $_POST["Password"];
$Retype_password= $_POST["Retype_password"];
$E_mail= $_POST["E_mail"];

$select = "SELECT * FROM customer WHERE E_mail ='$E_mail'AND Username='$username' AND Password='$password' ";
$Rs = mysql_query($select);
if (mysql_num_rows($Rs)>0)

$sql_insert = "INSERT INTO customer
(Name,Username, Password,Retype_password , E_mail,Address )
values ('$Name','$Username', '$Password','$Retype_password', '$E_mail','$Address')";
if (!mysql_query($sql_insert,$con))
die('Error: '.mysql_error());


<BODY STYLE = "background:ROyalblue">

<style type="text/css" >
h1 {color: navy;}
<h1 align ="center"><b>Congratulations you have successfully signed up!!!</b></h1>

<h2> You can now use your username and password to login.</h2>
<h2 > Click <a href="log.php">Here</a> to continue</h2>



04-12-2012, 03:46 PM
Okay! Any questions?

04-12-2012, 03:58 PM
So what is the issue? Why have you posted us a random login script?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum