Anybody help me solve this query, error is syntax error,
unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
$sl = "select * from sanpham where id='$_GET['id']'";
Anybody help me solve this query, error is syntax error,
unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
$sl = "select * from sanpham where id='$_GET['id']'";
Careful with arrays and keys.
$sl = "select * from sanpham where id='{$_GET['id']}'";
Or
$sl = "select * from sanpham where id='" . $_GET['id'] . "'";