[Débutant] Parse error: syntax error, unexpected T_VARIABLE in C:\[.]Enregistrer.php on line 12
Bonjour
Je suis débutant dans le domaine.
Voici mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <?php
ini_set('default_charset',"windows-1252");
include("Parametres.php");
$intitule=$_GET['intitule'];
$reponse=$_GET['reponse'];
$id=mysql_connect($host,$user,$pass);
mysql_select_db($base)
or die("Impossible de sélectionner la base : $base")
$resultat=mysql_query("INSERT INTO Presentation(`intitule`, `reponse`)
VALUES ('$intitule', '$reponse');",$id);
?> |
Et voici le formulaire:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<FORM METHOD="GET" TARGET="Presentation" ACTION="Enregistrer.php">
<TABLE WIDTH="640" BORDER="1">
<TR><TD>
<TABLE BORDER="0">
<TR>
<TD WIDTH="120" ALIGN="CENTER">
Intitulé : <INPUT TYPE="TEXT" SIZE="0" MAXLENGTH="255" NAME="intitule">
</TD>
<TD WIDTH="120" ALIGN="CENTER">
Réponse : <INPUT TYPE="TEXT" SIZE="0" MAXLENGTH="255" NAME="reponse">
</TD>
<TD WIDTH="110" ALIGN="RIGHT">
<INPUT TYPE="SUBMIT" WIDTH="100" VALUE=" Enregistrer ">
</TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>
</FORM> |
((intitule et reponse appartiennent à la table Presentation et sont des TEXT))
J'obtiens ce message
Parse error: syntax error, unexpected T_VARIABLE in C:\[...]Enregistrer.php on line 12
Quelqu'un pourrait me dire ce qu'il ne va pas? :(