hello!
Can anyone plz tell me how 2 write z following php code into jsp..Thx in advance..
<?php
$userid = $_POST["txt_login"];
$password = $_POST["txt_pwd"];
//Connecting to database
include("db_connect.php");
if (($userid=='admin' OR $userid=='ADMIN') && ($password=='admin' OR $password=='ADMIN'))
header( 'Location: http://localhost/MyWeb/admin.php?id='.$userid) ;
else
{
$Rs = mysql_query("SELECT * FROM Users WHERE UserId = '$userid' AND UserPassword = '$password'");
if (mysql_fetch_row($Rs))
header( 'Location: http://localhost/MyWeb/Basket.php?id='.$userid ) ;
else//user does not exist
{
mysql_close($con);
header( 'Location: http://localhost/MyWeb/user_error.php?id='.$userid ) ;
}
}
mysql_close($con);
?>
aksm 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
Zhoot 0 Light Poster
aksm 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.