致命错误:未捕获错误:调用未定义函数mysql_real_escape_string() [英] Fatal error: uncaught error: call to undefined function mysql_real_escape_string()
问题描述
我们在register.php期间收到此错误
致命错误:未捕获错误:调用未定义函数mysql_real_escape_string()
< b>我尝试了什么:
注册php即将收到此错误
we are getting this error during register.php
Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string()
What I have tried:
on registration php i m getting this error
推荐答案
阅读 mysql_real_escape_string() [ ^ ]文档:
Read the mysql_real_escape_string()[^] documentation:
警告这个扩展在PHP 5.5.0中已弃用,并在PHP 7.0.0中被删除。相反,应该使用MySQLi或PDO_MySQL扩展。另请参阅MySQL:选择API指南和相关的常见问题解答以获取更多信息。此功能的替代方案包括:
- mysqli_real_escape_string( ) [ ^ ]
- PDO :: quote() [ ^ ]
- mysqli_real_escape_string()[^]
- PDO::quote()[^]
Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
请找我的代码
pls find my code
<html>
<head>
<title>BHARAT HILLS</title>
</head>
<body>
<h2>Registration Page</h2>
<a href="index.php">Click here to go back</a><br/><br/>
<form action="register.php" method="POST">
Enter Username: <input type="text" Name ="username" required ="required"/><br/><br/>
Enter password: <input type="password" name="password" required="required"/><br/>
<input type="submit" value="register"/>
</form>
</body>
</html>
<?php
if(
_SERVER [REQUEST_METHOD] ==POST){
_SERVER["REQUEST_METHOD"] == "POST"){
这篇关于致命错误:未捕获错误:调用未定义函数mysql_real_escape_string()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!