Hi, thanks to anybody that reads or replies this thread.
I have a form that uploads both, data and files , i get the form to upload the data correctly to mysql but the file name dont get there , I also would like the rename the image to another name for example i have the value $code , i would like to rename the image to $code.jpg or something like that then post the new value as $image or something to the table on MySQL
So the question is. How do i rename a image to the name i want and then post it to the table on mysql database , my file upload code is
$uploaddir = 'images/';
$uploadfile = $uploaddir . basename($_FILES['imagen']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['imagen']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
thanks again for your help