The following is a report that I try to send to the database. The php code works fine I believe, as the row is created. But the reportdata column is always empty. the column type is varchar
. Is it because the report begins with #? the following call creates a row but nothing in reportdata column. the auto increment id is given.
http://www.someaddress.com/savereport.php?reportdata=#98#1#4#14#3#48#8#88#04/06/2016%2008:05:54%20PM
If I change the report to basic text, it works. What's going on?
http://www.someaddress.com/savereport.php?reportdata=basictext
Here is the php code that does the stuff:
mysqli_set_charset($dbc, 'utf8');
$reportdata = mysqli_real_escape_string($dbc, $_GET['reportdata']);
$query = "INSERT INTO `onwordreports`(`reportdata`) VALUES ('$reportdata')";
$result = mysqli_query($dbc, $query) or trigger_error("Veri yükleme başarısız: " . mysqli_error($dbc));
echo $result;
mysqli_close($dbc);