PHP Code:
include_once('connections.php');
@$name = $_POST['name'];
@$obs = mysql_real_escape_string($_POST['obs']);
$sqlInsert = "INSERT INTO `test_table` (`user_name`, `obs`)
VALUES ('$name', '$obs'); ";
print_r( $sqlInsert) ;
$sqlResul = mysql_query($sqlInsert) or die(mysql_error());
and the output is:
HTML Code:
INSERT INTO `test_table` (`user_name`, `obs`) VALUES ('testname', '');
even the obs variable from the form is not empty.
when i use:
@$obs = $_POST['obs'];
the script works as espected
Bookmarks