|
|
|
![]() |
|
Strumenti |
![]() |
#1 | |
Member
Iscritto dal: Jul 2006
Messaggi: 92
|
[PHP] problema con form per upload file
Premetto che sono praticamente alle prime armi con php. Sto cercando di realizzare un semplice pannello di inserimento news in un db mysql. Questo pannello prevede un form contenente un tag html <input type = "file"> per selezionare da disco un'immagine da allegare alla news:
Codice HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pannello amministrazione news</title> </head> <body> <div class = 'form'> <h1>Inserisci nuova news:</h1> <br /> <br /> <form action = "./news_preview.php" method = "POST"> <label>Titolo:</label> <input type = "text" name = "titolo" size = "40" maxlength = 255 /> <br /> <br /> <label>Testo:</label> <textarea name = "testo" rows = "6" cols = "30" ></textarea> <br /> <br /> <label>Immagine:</label> <input type="file" name="image_path"> <br /> <br /> <input type = "submit" name = "insert" value = "Inserisci news"> </form> </div> </body> Codice PHP:
Quote:
![]() |
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 19:51.