I'm trying to upload a jpg image through a form. I am very new to the linux anvironment and php. I was a recent coldfusion developer and always worked on windows so I have a lot to learn. I ran and test my code locally on my windows IIS. I moved it up to a linux server and now it doesn't work. I don't even get an error. It just doesn't upload anything. Here's the important parts of my code...
form page:
<form method="post" action="add_image.php" enctype="multipart/form-data">
Thumb Nail Image:
<input type="file" name="ThumbImg" size="30">
<input type="submit" name="Submit" value="Submit">
</form>
Upload Page: ( I don't know the direct path on the server so that's the reasoning for the "../.../")
$images_query = "SELECT Max(models_id) FROM models_main";
$images_result = mysql_query($images_query, $db_connection)or die(mysql_error());
$image_id = mysql_result($images_result, 0, 0);
$_FILES['ThumbImg']['name'];
if(file_exists($_FILES['ThumbImg']['name'])) {
rename('' . $_FILES['ThumbImg']['tmp_name'],'../../images/thumb/' . $image_id .'.jpg');
Thanks in adavance for the help!
}
form page:
<form method="post" action="add_image.php" enctype="multipart/form-data">
Thumb Nail Image:
<input type="file" name="ThumbImg" size="30">
<input type="submit" name="Submit" value="Submit">
</form>
Upload Page: ( I don't know the direct path on the server so that's the reasoning for the "../.../")
$images_query = "SELECT Max(models_id) FROM models_main";
$images_result = mysql_query($images_query, $db_connection)or die(mysql_error());
$image_id = mysql_result($images_result, 0, 0);
$_FILES['ThumbImg']['name'];
if(file_exists($_FILES['ThumbImg']['name'])) {
rename('' . $_FILES['ThumbImg']['tmp_name'],'../../images/thumb/' . $image_id .'.jpg');
Thanks in adavance for the help!
}