提前感谢。我有麻烦创建与Oracle数据库登录形式实际上我已经创建了成功的连接,但登录形式连接问题
$conn = oci_connect('hr', 'hr', 'localhost/XE', 'AL32UTF8');
session_start();
$myusername = isset($_POST['username']);
$mypassword = isset($_POST['password']);
$query = "SELECT * FROM VTP_admin WHERE username='".$myusername."' and password='".$mypassword."' ";
$vtpid = oci_parse($conn, $query);
$result = oci_execute($vtpid);
$count=oci_num_rows($vtpid);
echo ($count);
if($count==1){
$_SESSION["username"];
$_SESSION["password"];
header("localhost/ERP/dashboard.php");
}
else{
echo "Incorrect Username or Password";
}
2条答案
按热度按时间wpx232ag1#
终于完成了这个任务,可能会对一些哥们有帮助。如果你有问题,随时问。
nmpmafwu2#