Ragazzi, ho un problema relativamente grosso, con uno script php che ho fatto....
In pratica questo script deve creare una pagina html con molti contenuti statici ed alcuni contenuti presi da un form! Fin qui tutto ok, il mio problema è che in questo codice ci stanno anche delle immagini, quindi un relativo <input dove inserire il link dell'immagine per poi farlo apparire nel codice html, il problema e che gli input sono 4 ed anche se un campo è vuoto lui mi scrive sempre nel codice html i tag [img][/img] <label> INSERISCI DESCRIZIONE PRODOTTO</label>
<textarea type="text" name="testo" alt="inserisci valore" title="inserisci il valore" cols="30" rows="10"></textarea>
<label>LINK IMG 1</label><input type="text" name="link1"/>
<label>LINK IMG 2</label><input type="text" name="link2"/>
<label>LINK IMG 3</label><input type="text" name="link3"/>
<label>LINK IMG 4</label><input type="text" name="link4"/>
<input type="submit" name="send" value="CREA" alt="crea l'inserzione" /> </form> <?php if(isset($_POST['send'])){ $testo = $_POST['testo']; $linkuno = "<img src=\"$_POST[link1]\" style=\"width:320px;\">"; $linkdue = "<img src=\"$_POST[link2]\" style=\"width:320px;\">"; $linktre = "<img src=\"$_POST[link3]\" style=\"width:320px;\">"; $linkquattro = "<img src=\"$_POST[link4]\" style=\"width:320px;\">"; echo "<textarea cols=\"30\" rows=\"20\" ><style type=\"text/css\"> #inserzione { width: 700px; margin:auto; } img { } #textprod{ position:absolute; text-align: center; vertical-align: inherit; height: 220px; font-size: 2.0em; color: red; margin-top: 250px; margin-left: 62px; padding: 10px 10px; max-width: 560px; } #descvar { background-image: url(http://---------------------/layout.png); background-repeat:no-repeat; height:535px; } #tabfoto tr td { cellpadding: 0px; cellspacing: 0px; } #centertd { background-image:url(http://-------------------/fotocenter.png); background-repeat:repeat-y; } #centertd td{ padding: 0px 50px; } #centertd td img{ max-width: 600px; float:left; } #tablehead { background-image:url(http://---------------/fotohead.png); background-repeat:no-repeat; height: 50px; } #imgspaz { margin-left:50px; } </style> </head> <body> <div id=\"inserzione\"> <center><a href=\"http://-------------------/Preventivo.html\"><img src=\"http://----------------------/messaggio.png\" alt=\"Preventivo ricambi\" title=\"preventivo ricambi\" /></a></center> <div id=\"descvar\"> <div id=\"textprod\"> $testo </div> </div> <div id=\"foto\"> <table id=\"tabfoto\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"> <tr id=\"tablehead\"><td></td></tr> <tr id=\"centertd\"><td><div id=\"imgspaz\">
$linkuno
$linkdue
$linktre
$linkquattro
</div></td></tr> <tr><td><img src=\"http://----------------------/fotobottom.png\" /></td></tr> </table> </div> <img src=\"http://--------------------------inserzione2.png\" usemap=\"#inser\" /> <map name=\"inser\" id=\"inser\"> <area shape=\"rect\" coords=\"61,2548,615,2569\" href=\"http://as777.bartolini.it/vas/tempi_consegna_parametri.html\" target=\"_new\" alt=\"rintraccia spedizione\" /> <area shape=\"rect\" coords=\"305,3169,396,3239\" href=\"http://www.bartolini.it\" target=\"_new\" alt=\"Sito bartolini\" /> <area shape=\"rect\" coords=\"52,626,364,685\" href=\"https://www.facebook.com/pages--------------------------\" target=\"_new\" alt=\"Link alla pagina di facebook\" /> <area shape=\"rect\" coords=\"51,555,436,607\" href=\"mailto:--------------@virgilio.it\" alt=\"Mandami una E-mail\" /> </map> </div> </textarea>"; } ?>[/PHP]
grazie mille a tutti