|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Feb 2003
Città: Portsmouth - UK
Messaggi: 5385
|
[PHP] Parse error: parse error, unexpected T_STRING..chi mi aiuta??
stavo smanettando un pò con PHP e avevo creato questo modulo HTML :
<form method="post" action="http://localhost/argomenti.php"> Nome: <input type="text" NAME="nome" SIZE="40"><BR> Password: <input type="password" NAME="password" SIZE="20"><br><br> Quali argomenti vuoi approfondire?<br> <input type="checkbox" NAME="html" VALUE="html">Info su HTML<BR> <input type="checkbox" NAME="immagini" VALUE="immagini">Immagini e oggetti<br> <input type="checkbox" NAME="url" VALUE="url">Collegamenti e URL<br> <input type="checkbox" NAME="oggetti" VALUE="oggetti">Oggetti multimediali<br> <input type="checkbox" NAME="xhtml" VALUE="xhtml">XHTML v. 1.0<br> <hr width="100%"><br> <input type="submit" NAME="invia" VALUE="INVIA!"> <input type="reset" NAME="cancella" VALUE="CANCELLA TUTTO!"> </form> dopodichè ho creato il file relativo PHP per stampare il modulo: <?php $nome=$_POST['nome']; $password=$_POST['password']; $html=$_POST['html']; $immagini=$_POST['immagini]; $url=$_POST['url]; $oggetti=$_POST['oggetti']; $xhtml=$_POST['xhtml']; echo "<table border=\"1\">"; echo "<tr><td>"; printf ("%s", $nome); echo "</tr></td"; echo "<tr><td>"; printf ("%s", $password); echo "</tr></td>"; echo "<tr><td>"; printf ("%s", $html); echo "</tr></td>"; echo "<tr><td>"; printf ("%s",$immagini); echo "</tr></td>"; echo "<tr><td>"; printf ("%s",$url); echo "</tr></td>"; echo "<tr><td>"; printf ("%s",$oggetti); echo "</tr></td>"; echo "<tr><td>"; printf ("%s",$xhtml); echo "</tr></td>"; echo "</table> ?> PURTROPPO mi da SEMPRE questo errore... provando a modificare in tutti i modi... ho provato anche a creare un array nel form html, creando un ciclo for nel php per stampare l'array ma niente... sempre questo errore......... chi mi da 1 mano? Parse error: parse error, unexpected T_STRING, expecting ']' in E:\Programmi\Apache Group\Apache2\htdocs\argomenti.php on line 6
__________________
![]() ![]() Ultima modifica di MrEnrich : 10-11-2005 alle 01:31. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
![]() ![]() ![]() ![]() ![]() $url=$_POST['url]; --> manca una ' alla fine di URL :P per quello che ti da errore... ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Feb 2003
Città: Portsmouth - UK
Messaggi: 5385
|
grazie ora funge
![]() cmq ho 1 altro problema: #Controlla se la password è esatta $queryutente="(SELECT password FROM users WHERE (utente='$login'))"; $risultat=mysql_query($queryutente); $dbpass=mysql_fetch_array($risultat,MYSQL_ASSOC); if($pass != $dbpass[0]) die("La password inserita è sbagliata, torna indietro riscrivila correttamente"); mi dice: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource .... come risolvo? Grazie
__________________
![]() ![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
prova a togliere le parentesi in prima ed ultima posizione della stringa della query
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 22:46.