<?php
$link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password")
or die("Could not connect");
$text = dbx_escape_string($link, "It\'s quoted and backslashed (\\).");
$result = dbx_query($link, "insert into tbl (txt) values ('" . $text . "')");
if ($result == 0) {
echo dbx_error($link);
}
dbx_close($link);
?> |