

InterviewSolution
Saved Bookmarks
1. |
Solve : syntax error in php? |
Answer» Dear sirs, and all the block is: $errore = "" if ($nome == "") { $errore .= " if ($cognome == "") { $errore .= " if ($telfisso == "") { $errore .= " if ($email == "") { $errore .= " //Se la VARIABILE errore NON è vuota (ovvero almeno uno dei campi obbligatori // è stato lasciato vuoto) visualizzo un messaggio di errore if $errore <> "" { //Creo una lista puntata CON class ERRORS dove con il css posso //dare un carattere rosso e la inserisco in una variabile $stampaErrori = '
$stampaErrori .= $errore; $stampaErrori .= " (all the comments are in italian) Many thanks if you can help me to find the error. Regards Benedetto No problem. You have a semi colon missing. The line that says: $errore = "" should say: $errore = "";Hi Robpomeroy and thank you very much for your help! I did as you said but now i meet a new problem: Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /hsphere/local/home/clubscan/articaviaggi.com/processForm.php on line 16 I am "new" in php programming and I hope you can help me aven now. This is the second part of the file, from line 8: $errore = ""; if ($nome == "") { $errore .= " if ($cognome == "") { $errore .= " if ($telfisso == "") { $errore .= " if ($email == "") { $errore .= " //Se la variabile errore non è vuota (ovvero almeno uno dei campi obbligatori // è stato lasciato vuoto) visualizzo un messaggio di errore if $errore <> "" { //Creo una lista puntata con class errors dove con il css posso //dare un carattere rosso e la inserisco in una variabile $stampaErrori = '
$stampaErrori .= $errore; $stampaErrori .= " //Stampo un riquadro con dentro la lista errori echo ''; echo 'Attenzione!' echo $stampaErrori; echo ''; echo ' '; |
|