PHP ODBC Database Connectivity

<body bgcolor="#cccfff">
<form action="accessuserlogin.php" method="post">

Codango PHP, ASP .NET, JSP Scripts, Resources, Reviews
Click to Read Reviews
What do you think?

User Name :<input type="text" name="user"/><br/>
Password :<input type="password" name="pwd"/><br/>
<input type="submit" value="Login" ><input type="reset" value="clear" ><br/>
More PHP & MySQLtutorials --->

Free html templates --->

$con = odbc_connect (mydata,"admin","nopass");

$query="select name from user where user_id=".$_POST['user']." and passwd='".$_POST['pwd']."'";
$res = odbc_exec($con, $query);

if($row = odbc_fetch_into($res, $cols))
echo "<h1>Welcome ". $cols['name']."</h1>";
echo "<h1 style='color:red'>Wrong User id or Password</h1>";
echo "<a href='accessloginform.htm'>Try Again</a>";

No comments:

Post a Comment

Thanks for visiting my Blog!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog