I´m a little newbie at php, but i have to upload a file and i do this:
in the admin.php3 i put this into a form that action="altas.php3"
<input type="file" name="imagen1" enctype="multipart/form-data">
and the contents of altas.php3 is this:
$id_foto =mysql_insert_id($db->Link_ID);
if ($imagen1 !="" && $imagen1 != "none"){
$arch = "/images/countries/imagen1_" . $id_foto .".gif";
copy ($imagen1, $DOCUMENT_ROOT . $arch);
when i process that it send me an error like:
Warning: Unable to open '\Burn\www\countrieslife\images\n_logo6.gif' for reading: No such file or directory in
/usr/local/apache/share/htdocs/loc/countrieslife/admin/webstorming/altas.php3 on line 79
I´ve tried with eregi but this is the result:
$image1=eregi_replace("C:\","/","$imagen1");
$image2=eregi_replace("C:\","/","$imagen2");
$image3=eregi_replace("C:\","/","$imagen3");
and the error is :
Warning: Division by zero in /usr/local/apache/share/htdocs/loc/countrieslife/admin/webstorming/altas.php3 on line 75
if anybody can help me i´ll be glad!!!🙂