Ok EVERY time I think I’ve figured it out and got it working something goes wrong.
So below is the entire code for uploading and image and storing it in a folder and setting the path to the image in MySQL. After fixing the parse errors posted earlier I was able to get the form to show and select and image and submit it with no errors, it appeared to work perfectly as it looked as if it submitted the images then reset the page for a new image to be submitted. After checking the upload folder it was empty and the database tables is empty as well, Now, all I get is a blank white page when I attempt to call up the page in a browser. Any suggestions? [php]
Upload
<?php
require "../dbconnect/portal_connect.php";
//Select database, database_name
mysql_select_db(“image_test”);
if(isset($_POST[‘uploaded’])) {
//If nothing has been uploaded display the form
?>
Upload:
<?php
}else{
//The image is named after the persons IP address until it gets moved into the database
//get users IP
$ip=$_SERVER['REMOTE_ADDR'];
//don't continue if an image hasn't been uploaded
if (isset($_POST['image'])){
$image = $_POST['image'];
//copy the image to directory
$path = "upload/images";
move_uploaded_file($image,$path);
//store the name and path.
$location = $path . "/" . $image;
$mysql_query ("INSERT INTO uploaded_images (ImgData) VALUES (" . $location . ")");
}
}
?>
[/php]