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
Recommended Answers
Jump to PostYes, we can. Will we? No. We are not here to do your work for you.
Jump to PostThere're alot of excellent tutorials about how to write jsp. Google it and you'll find, learning jsp when you only know php is a bit harder than going jsp to php. But I'm confident that you'll be able to get a script going. You'll soon notice that the two languages …
All 6 Replies
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.