Salve,ho un form e uno script in php che dovrebbero inserire del testo e delle immagini nel db.
Dico dovrebbero perchè in realtà lo script mi avvisa che l'inserimento è stato effettuato correttamente ma in realtà non avviene niente.
Vi posto il codice,spero che qualcuno possa aiutarmi.
codice:<?php if ($submit) { MYSQL_CONNECT("localhost","x","x"); mysql_select_db("test"); $result="INSERT INTO gpag (name,description,pic1,pic2,pic3) VALUES ('name','description','pic1','pic2','pic3')"; $id= mysql_insert_id(); print " The new page was created succesfully: $id"; MYSQL_CLOSE(); } else { echo "no page created."; } ?> <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> <p align="center"><font color="#336699"> Screen-name</font><font color="#F5EA94"> </font> <font color="#00000"><span class="storycontent"> <input type="text" name="name" size="20"></span></font></p> <p align="center"><font color="#336699">Description </font><font color="#F5EA94"> <textarea rows="8" name="description" cols="20"></textarea></font></p> <p align="center"></p> <font color="#336699">Pic1</font> <input type="file" name="pic1" size="40"> <font color="#336699">Pic2</font> <input type="file" name="pic2" size="40"> <font color="#336699">Pic3</font> <input type="file" name="pic3" size="40"> </p> <input type="submit" name="submit" value="submit"> </form>



Rispondi quotando