Hello everyone,
I have build an Add page that performs differently from the standard one but I have troubles with uploaded files.
I explain:
when I add a record (that includes also an image), in the "Before record added" events I put something like this
(it's a call at 2 stored procedures):
//global $conn;
$bacheca_query = "CALL BAC_CREATE_ADM_MESSAGE('IT','".$values['Titolo']."','".$values['Estratto']."',
'".mysql_real_escape_string($values['Contenuto'])."','".$values['url_picture']."','".$values['category']."',@titolo,@abstract,@testo,@id_messaggio)";
//db_exec($bacheca_query, $conn);
$inserisci_bacheca = mysql_query($bacheca_query);
$bacheca_en_queryT = "CALL TXT_SET_MESSAGE(@titolo,'".$values['TitoloEN']."','EN')";
$inserisci_bacheca_ingleseT = mysql_query($bacheca_en_queryT);
$bacheca_en_queryE = "CALL TXT_SET_MESSAGE(@abstract,'".$values['EstrattoEN']."','EN')";
$inserisci_bacheca_ingleseE = mysql_query($bacheca_en_queryE);
$bacheca_en_queryC = "CALL TXT_SET_MESSAGE(@testo,'".$values['ContenutoEN']."','EN')";
$inserisci_bacheca_ingleseC = mysql_query($bacheca_en_queryC);
if(($inserisci_bacheca)&&($inserisci_bacheca_ingleseT)&&($inserisci_bacheca_ingleseE)&&($inserisci_bacheca_ingleseC))
$message = "<div style='width:100%; padding: 15px; border:1px solid green; background-color:#d5f4df;text-align:center;'>
RECORD INSERT</div>";
return false;
The file uploaded should be:
$values['url_picture']
Naturally, even if I store the name of the file uploaded in the DB, actually I cannot upload it.
How do I intercept the filesize, the file type and so on, in order to build a function to upload it seamlessly?
Thank ou very much