<?php
function insert_table_ex($i, $t, $b) {
$stmt = 'insert into table_ex values (' .
mysql_real_escape_string($i) . ', ' .
'\'' . mysql_real_escape_string($t) . '\', ' .
'\'' . mysql_real_escape_string($b) . '\')';
if (!mysql_query($stmt)) {
printf("Could not insert: <b>%s</b>", mysql_error());
}
}
require('conn_db.inc');
$db_conn = connect_db();
if ($db_conn) {
insert_table_ex(
42,
'fourty-two',
'This should be a blob with \'quotes\' and \\backslashes\\'
);
insert_table_ex(
9,
'nine',
'some & special <html> things'
);
}
?>