位置不工作/登录php mysql转到按钮上的下一页单击不工作/数据库验证不工作
但当我点击按钮时,即使我输入了一些数据库中未包含的随机值,验证也不起作用。按钮会将其重定向到上面提到的下一页。单击按钮时,它会自动转到boot.php。当我删除按钮不做任何事情时,它将不会转到其他页面,验证也不会真正起作用。请帮忙位置不工作/登录php mysql转到按钮上的下一页单击不工作/数据库验证不工作,php,Php,但当我点击按钮时,即使我输入了一些数据库中未包含的随机值,验证也不起作用。按钮会将其重定向到上面提到的下一页。单击按钮时,它会自动转到boot.php。当我删除按钮不做任何事情时,它将不会转到其他页面,验证也不会真正起作用。请帮忙 $username = "root"; $password = ""; $hostname = "localhost"; $output = ''; //connection to the database $dbhandle = mysql_connect($h
$username = "root";
$password = "";
$hostname = "localhost";
$output = '';
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db("homework",$dbhandle)
or die("Could not select examples");
>
将动作更改为html中的动作:
<button type="submit" class="submit" name = "submit" action = "boot.php">>> </button>
>
将动作更改为html中的动作:
<button type="submit" class="submit" name = "submit" action = "boot.php">>> </button>
>
它会转到boot.php,但即使我写随机字符,它也没有验证。它只接受它,即使这些字符没有包含在数据库中。你能发布完整的html代码吗?你应该采取行动。您需要在输入html中添加属性名,与boot.php中的$_POST[]相同,就像它进入boot.php一样,但它没有验证,即使我写随机字符,它也只接受它,即使这些字符没有包含在数据库中。您能发布完整的html代码吗?你应该采取行动。您需要在输入html中添加属性名,与boot.php中的$\u POST[]相同,如
<button type="submit" class="submit" name = "submit" formaction= "boot.php">>> </button>