Hello everyone,
I have a problem. When I insert <a href="http://example.com>Example</a>
into my database with the following code...
Advertising
$connect = mysqli_connect($hostname, $username, $password, $database);
$sql="INSERT INTO notes VALUES ('$id', '$note')";
$result=mysqli_query($connect, $sql);
...everything works fine. The link (when I SELECT it and display it in my
browser) works as one would expect.
However when I insert <a href="http://example.com">Example</a> into my
database with the following code (prepared statement)...
$submitnote = mysqli_prepare($connect, "INSERT INTO notes VALUES (?, ?)");
mysqli_stmt_bind_param($submitnote, "is", $id, $note);
mysqli_stmt_execute($submitnote);
...the link (when I SELECT it and display it in my browser) shows up as...
http://jasoncarson.ca/admin/\"http://example.com\"
...Anyone know how to fix this so I can use the prepared statement?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php