Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP,mysql-Register&;登录-用户登录_Php_Sql_Mysql_Html - Fatal编程技术网

PHP,mysql-Register&;登录-用户登录

PHP,mysql-Register&;登录-用户登录,php,sql,mysql,html,Php,Sql,Mysql,Html,您好,我想登录到我的数据库,但我无法使用Apache2.2和Oracle Database 10g Express Edition: 索引页index.html: <html><form action='login.php' method='POST' > username: <input type='text' name='username'><br> password: <input type='password' na

您好,我想登录到我的数据库,但我无法使用Apache2.2和Oracle Database 10g Express Edition: 索引页index.html:

   <html><form action='login.php' method='POST' >
   username: <input type='text' name='username'><br>
   password: <input type='password' name='password'><br>
             <input type='submit' value='log in'>
   </form></html>

用户名:
密码:
登录页面login.php:

<?php
$username = $_POST['username']
$password = $_POST['password']
if (username&&password)
{
 $connect = mysql_connect("localhost","root","") or die("couldn't connect!");
 mysql_select_db("operateurs") or die("couldn't find db ! )" ;
}
 else 
 die ("please enter username and password !");
?>

mysql\u connect PHP函数用于连接mysql数据库,而不是oracle

请按照以下oracle教程页面进行操作


mysql\u connect PHP函数用于连接mysql数据库,而不是oracle数据库

请按照以下oracle教程页面进行操作

使用

if ($username && $password)
相反,如果

if (username&&password)
使用

相反,如果

if (username&&password)

输出是什么?你又给了同样的代码输出是什么?您再次给出了相同的代码,但RRY无法指出Gaurav指出的错误。用户名和密码是变量,您不会将其作为变量提及。thks BOOTA和Gaurav非常有用!!抱歉,我无法指出Gaurav指出的错误。用户名和密码是变量,您不会将其作为变量提及。thks BOOTA和Gaurav非常有用!!thks BOOTA和Gaurav非常有用!!thks BOOTA和Gaurav非常有用!!