<?php
$conn=mysql_connect(“localhost”,”root”,””) or die(“could not connect database”);
mysql_select_db(“data”,$conn) or die(“could not connect database”);
$conn=mysql_connect(“localhost”,”root”,””) or die(“could not connect database”);
mysql_select_db(“data”,$conn) or die(“could not connect database”);
?>
<form>
Name<input type=”text” name=”t1″><br>
Password<input type=”text” name=”t2″><br>
<input type=”submit” name=”s1″>
</form>
<?php
if(isset($_REQUEST['s1']))
{
$a=$_REQUEST['t1'];
<form>
Name<input type=”text” name=”t1″><br>
Password<input type=”text” name=”t2″><br>
<input type=”submit” name=”s1″>
</form>
<?php
if(isset($_REQUEST['s1']))
{
$a=$_REQUEST['t1'];
$sql=”SELECT * FROM `registeration`”;
if($dd=mysql_query($sql))
{
while($DD=mysql_fetch_array($dd))
{
$u=$DD['uname'];
$p=$DD['pass'];
}
}
if($u==$_REQUEST['t1'] && $p==$_REQUEST['t2'])
{
echo “welcome”.”$a”;
}
else
{
echo “userid and pass is wrong”;
}
if($dd=mysql_query($sql))
{
while($DD=mysql_fetch_array($dd))
{
$u=$DD['uname'];
$p=$DD['pass'];
}
}
if($u==$_REQUEST['t1'] && $p==$_REQUEST['t2'])
{
echo “welcome”.”$a”;
}
else
{
echo “userid and pass is wrong”;
}
}
?>
?>
No comments:
Post a Comment