Sto realizzando il backend di un sito in locale ho questo codice php che è di un area privata e serve per inserire solo il titolo della news, esce un errore del genere
la linea 31 è quella in rosso vorrei capire dove sbagliocodice:Parse error: syntax error, unexpected T_ELSEIF in /var/www/italydelight/insert.php on line 31
codice:<?php include ("conf.inc.php"); if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['user'])) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Nuova News</title> </head> <body> <form action="<?php echo $PHP_SELF; ?> method="post" > <h3>Inserisci il titolo </h3> <input type="text" name="titolo" > <input type="submit" value="invia" > </form> <?php if(!empty($_POST['titolo'])) { $titolo = mysql_real_escape_string($_POST['titolo']); $insert_title="INSERT INTO temp_news (titolo) VALUES ('$titolo')"; $insert = mysql_query($insert_title); if($insert) { echo "Titolo Inserito "; echo "<a href=\"insert-time.php\">Tempistica</a>"; }else { echo "Inserimento non riuscito<a href\"insert.php\">Riprova<\a>"; }else { echo "inserisci il titolo"; } } } else{ echo "<meta http-equiv='refresh' content='=2;login.php' />"; } ?> </body> </html>

Rispondi quotando