PHP always error, we help younger brother I read the code

Source: Internet
Author: User
PHP always error, everyone help me to read the code

if (!function_exists ("getsqlvaluestring")) {
function getsqlvaluestring ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (Php_version < 6) {
$theValue = GET_MAGIC_QUOTES_GPC ()? Stripslashes ($theValue): $theValue;
}

$theValue = function_exists ("mysql_real_escape_string")? Mysql_real_escape_string ($theValue): mysql_escape_string ($theValue);

Switch ($theType) {
Case "Text":
$theValue = ($theValue! = "")? "". $theValue. "'": "NULL";
Break
Case "Long":
Case "int":
$theValue = ($theValue! = "")? Intval ($theValue): "NULL";
Break
Case "Double":
$theValue = ($theValue! = "")? Doubleval ($theValue): "NULL";
Break
Case "Date":
$theValue = ($theValue! = "")? "". $theValue. "'": "NULL";
Break
Case "defined":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
Break
}
return $theValue;
}
}

mysql_select_db ($database _test, $test);
$query _test = "SELECT * from Test";
$test = mysql_query ($query _test, $test) or Die (Mysql_error ());
$row _test = Mysql_fetch_assoc ($test);
$totalRows _test = mysql_num_rows ($test);
?>

























while ($row 1=mysql_fetch_array ($result 1)) {$id =trim ($row 1[id]), $name =trim ($row 1[name]), $pass =trim ($row 1[pass]); echo " "; } ? >
Id Name Pass
$id $name $pass


Mysql_free_result ($test);
? >[code=php][/code]
=============================
Error:
Notice:use of undefined constant id-assumed ' id ' in D:\xampp\htdocs\vest\index.php on line 68

Notice:use of undefined constant name-assumed ' name ' in D:\xampp\htdocs\vest\index.php on line 69

Notice:use of undefined constant pass-assumed ' pass ' in D:\xampp\htdocs\vest\index.php on line 70

68, 69, 70 these three lines are
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.