PHP - GetSQLValueString function
Your function escapes the string using MySQL's built-in string escaping function, then if it is a non-numeric value, surrounding it in single quotes. This function was written for inserting variable data into SQL queries.
$sql = "SELECT * FROM users WHERE username = " . GetSQLValueString($_GET['username'], 'text');
$result = mysql_query($sql);
Fatal error: Call to undefined function getsqlvaluestring()
Fatal error: Call to undefined function getsqlvaluestring()
It means that there is no such a function.
I guess that this function is another file and you forgot to include it.
mysqli_real_escape_string () can't find my $connSQL
You are getting $connSQL from connSQL.php but it is a global variable, simply add:
global $connSQL;
inside your "if" statement to be able to catch your variable.
PHP Validation Failure
if (strlen(isset($_POST['password'])) < 8) {
would you try to strlen on and boolean
so try to
if(isset($_POST['password'] && strlen($_POST['password']) < 8) {
Moreover you do this
if (isset($_POST['password']) !== isset($_POST['passwordconfirm'])) {
which do not check if the passwords are equals, it check if there is one set and one not
this should something like this
if (isset($_POST['password'],$_POST['passwordconfirm'])
&& $_POST['password'] !== $_POST['passwordconfirm']) {
same here
if (filter_var(isset($_POST['email']), FILTER_VALIDATE_EMAIL)) {
should be
if (isset($_POST['email']) && !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
You may look at the documentation for
isset(), strlen()
Related Topics
Decoding Numeric HTML Entities via PHP
Check If a Remote Page Exists Using PHP
PHP Regex to Remove Http:// from String
How to Keep the Chinese or Other Foreign Language as They Are Instead of Converting Them into Codes
List of Us Time Zones for PHP to Use
Parameter Type Covariance in Specializations
Regex Ignore Url Already in HTML Tags
PHP Object of Class Dateinterval Could Not Be Converted to String
Sort Array by Length and Then Alphabetically
Jquery Tablesorter Index Column Insert
How to Remove a Key and Its Value from an Associative Array