Hi,
My mysql_error is No Database Selected.
errno 1046
I am connected to the database and it has worked fine before so I was wondering what I am doing wrong.
The code is from a tutorial I am using.
<?php require_once('Connections/connAdmin.php'); ?>
<?php
//file properties
$file = $_FILES['content']['tmp_name'];
if
(!isset($file))
echo "please select an image.";
else {
$content = addslashes (file_get_contents ($_FILES['content']['tmp_name']));
$content_name = addslashes ($_FILES['content']['name']);
$content_size = getimagesize ($_FILES['content'] ['tmp_name']);
if ($content_size ==FALSE)
echo "Thats not an image";
else {
if (!$insert = mysql_query("INSERT INTO upload VALUES('';'$content_name';'$content')"))
echo (mysql_errno());
else{
$lastid = mysql_insert_id();
echo "Image uploaded<p/>Your Image<p/><img src=get.php?$lastid>";
}
}
}
?>
everything seems to work up until the INSERT script.
Thanks!