Une petite ereur de php
Fermé
vias
Messages postés
25
Date d'inscription
lundi 25 avril 2005
Statut
Membre
Dernière intervention
16 janvier 2006
-
25 avril 2005 à 11:17
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 - 25 avril 2005 à 14:24
kij_82 Messages postés 4089 Date d'inscription jeudi 7 avril 2005 Statut Contributeur Dernière intervention 30 septembre 2013 - 25 avril 2005 à 14:24
A voir également:
- Une petite ereur de php
- Easy php - Télécharger - Divers Web & Internet
- Petite amie virtuelle en français - Accueil - Intelligence artificielle
- Comment dévisser une petite visse sans tournevis - Forum Réseaux sociaux
- Petite vague clavier - Forum Clavier
- La fenetre actuelle est trop petite pour afficher correctement cette feuille - Forum Google Docs
3 réponses
Mnu
Messages postés
97
Date d'inscription
mercredi 11 avril 2001
Statut
Membre
Dernière intervention
9 janvier 2008
16
25 avril 2005 à 12:19
25 avril 2005 à 12:19
Euh... t'aurais pas oublié la balise "<?" au début ?
vias
Messages postés
25
Date d'inscription
lundi 25 avril 2005
Statut
Membre
Dernière intervention
16 janvier 2006
25 avril 2005 à 13:25
25 avril 2005 à 13:25
merci ta assuré le probleme c'est réduit maintenant il m'affiche
Parse error: parse error in d:\documents and settings\administrateur\bureau\issam\formulaire initial\copie de modiflogin.php on line 36
<?
//Vaiable d'environement pour le script
$host = "localhost";
$user = "root";
$password = "";
$bdd = "issam";
//Chaine de connection a la base de donnee
$conn = mysql_connect($host, $user, $password);
//Verification, de la possiblite d'acceder a la base de donnee
mysql_select_db($bdd) or die("IMpossible d'ouvrir la base de donnee $bdd");
mysql_close($conn);
?>
<?
session_start();
$_SESSION['nom']=$HTTP_POST_VARS['TxtNom'];
$_SESSION['prenom']=$HTTP_POST_VARS['prenom'];
$_SESSION['adresse']=$HTTP_POST_VARS['adresse'];
$_SESSION['codepostal']=$HTTP_POST_VARS['codepostal'];
$_SESSION['localite']=$HTTP_POST_VARS['localite'];
$_SESSION['email']=$HTTP_POST_VARS['email'];
$_SESSION['statut']=$HTTP_POST_VARS['statut'];
$_SESSION['diplome']=$HTTP_POST_VARS['diplome'];
$_SESSION['jour']=$HTTP_POST_VARS['jour'];
$_SESSION['moiss']=$HTTP_POST_VARS['mois'];
$_SESSION['annee']=$HTTP_POST_VARS['an'];
$_SESSION['annee']=$HTTP_POST_VARS['an'];
include "fonction.js"
(((c'est celle la la ligne 36)))<html>
<head>
<title>page loginnew</title>
<meta http-equiv="Content-Type" content="text/html;">
<script language="Javascript">
</script>
<script language="Javascript" >
function confirmer() {
//var reponse=confirm("êtes-vous d'accord");
var j = document.form.jour.value;
var m = document.form.mois.value;
var a = document.form.an.value;
var message;
var num1=0;
var num2=0;
var num3=0;
//var l= document.forms.prenom.length
//var motpasse = "abdel";
//var saisie = window.prompt("Veuillez donner le mot de passe:","");
if (document.form.prenom.value=="")
{
message= "penom vide";
num1=1;
}
if (document.form.TxtNom.value=="")
{
message= "Nom vide";
num2=2;
}
//alert ("longueur"+l);
alert ( "le mois" + <? echo $_SESSION['moiss'] ?>);
//alert (date_valide(document.form.jour.value,document.form.mois.value,document.form.an.value));
//if(reponse== true) {
//alert("Mot de passe erroné!");
//alert( document.form.jour.value);
// document.location.href="nabilbon.htm";
if(date_valide(<? echo $_SESSION['jour'] ?>,<? echo $_SESSION['moiss'] ?>,<? echo $_SESSION['annee'] ?>)=="False") {
message="Date invalide";
num3=3;
}
//alert(j m a );
if (num1==0 && num2==0 && num3==0)
{
document.location.href="bonpage.php";
}
else
{
alert (message );
}
//document.location.href="modiflogin.php";
}
</script>
</head>
<body bgcolor="#ffffff" onLoad="confirmer()">
<?php
//session_start();
//$_SESSION['nom']=$HTTP_POST_VARS['nom'];
//if ($PHPSESSID)
// session_start($PHPSESSID);
//else
// session_start();
//session_unset();
?>
<table width="75%" border="1">
<tr>
</tr>
</table>
<form name="form" method="post" action="">
<table width="892" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="Sans titre" fwbase="login1.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td colspan="6"><img src="spacer.gif" width="550" height="1" border="0" alt=""></td>
<td width="30"><img src="spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="20" colspan="6" bgcolor="#CCCCCC"> <blockquote>
<div align="left"><font color="#000000" size="7" face="Times New Roman, Times, serif"><em>
<font color="#666666">aaaaaaaa</font><font color="#CCCCCC"><font color="#000000">pré</font></font>
inscription</em></font></div>
</blockquote></td>
<td><img src="spacer.gif" width="1" height="44" border="0" alt=""></td>
</tr>
<tr>
<td> </td>
<td height="22"> </td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="22" valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td rowspan="7"><img src="spacer.gif" width="1" height="60" border="0" alt=""></td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Nom:</strong></td>
<td width="6" valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="38" valign="top"> <font color="#FFFFFF">
<input type="text" value="<? echo $_POST['TxtNom']?>" name="TxtNom" onBlur="javascript:changeCase(this.form.TxtNom)">
aaaaaaaaaaaaa::a</font><strong>Prénom</strong>:
<input type="text" name="prenom" value="<? echo $_POST['prenom']?>"></td>
<td> </td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Adresse:</strong><font color="#FFFFFF">:</font></td>
<td width="6" height="38" valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top"> <input name="adresse" type="text" size="75" value="<? echo $_POST['adresse']?>"></td>
<td> </td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Code postal:</strong></td>
<td width="6" height="38" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="721" valign="top"><input type="text" name="codepostal" value="<? echo $_POST['codepostal']?>">
<font color="#FFFFFF"> aaaaaaaaaaaaaaa asa::::</font><strong>Localité:</strong>
<input type="text" name="localite" value="<? echo $_POST['localite']?>"></td>
<td width="1"> </td>
</tr>
<tr>
<td width="12"></td>
<td width="12" height="27"></td>
<td width="110" valign="top"><strong>Date naissance:</strong> </td>
<td width="6" valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="38"> <select name="jour"><br>
<?
echo "<option selected ><strong>JOUR</strong></option>";
for ($n=1;$n<=31;$n++)
{
echo "<option value = $n";
echo ">$n \n";
}
?>
</select> <select name="mois">
<?
$mois = array(1=> "Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
echo "<option selected ><strong>MOIS</strong></option>";
for ($i=1;$i<=12;$i++)
{
echo "<option value = $i";
echo ">$mois[$i] \n";
}
?>
</select> <select name="an">
<?
$an= date("Y");
echo "<option selected ><strong>ANNEE</strong></option>";
for ($n=$an-45;$n<=$an-18;$n++)
{
echo "<option value = $n";
echo ">$n \n";
}
?>
</select> <strong><font color="#FFFFFF">aaaa</font>E.mail:</strong> <input name="email" type="text" size="18" value="<? echo $_POST['email']?>">
</td>
</tr>
<tr>
<td></td>
<td height="32"></td>
<td><strong>Diplôme:</strong></td>
<td><!--DWLayoutEmptyCell--> </td>
<td><select name="diplome">
<option selected><? echo $_POST['diplome']?></option>
<option>CESS</option>
<option>CESI</option>
</select> <font color="#FFFFFF">aaaaaasaaaaaaaaaaaaasaaaaaaaaaaa::</font><strong>Statut:</strong>
<select name="statut">
<option selected><? echo $_POST['statut']?></option>
<option>CPAS</option>
<option>Chômage</option>
</select></td>
<td></td>
</tr>
<tr>
<td width="12"></td>
<td width="12" height="32"></td>
<td width="110"><!--DWLayoutEmptyCell--> </td>
<td width="6"><!--DWLayoutEmptyCell--> </td>
<td> <font color="#FFFFFF">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</font>
<input type="submit" name="Submit" onClick="" value="Envoyer">
</form></td>
<td></td>
</tr>
<tr>
<td colspan="6"><img src="login1_r3_c1.gif" alt="" name="login1_r3_c1" width="488" height="181" border="0" align="middle"></td>
<td><img src="spacer.gif" width="1" height="196" border="0" alt=""></td>
</tr>
<tr>
<td colspan="6"><!--DWLayoutEmptyCell--> </td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td colspan="6"><!--DWLayoutEmptyCell--> </td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
</body>
</html>
Parse error: parse error in d:\documents and settings\administrateur\bureau\issam\formulaire initial\copie de modiflogin.php on line 36
<?
//Vaiable d'environement pour le script
$host = "localhost";
$user = "root";
$password = "";
$bdd = "issam";
//Chaine de connection a la base de donnee
$conn = mysql_connect($host, $user, $password);
//Verification, de la possiblite d'acceder a la base de donnee
mysql_select_db($bdd) or die("IMpossible d'ouvrir la base de donnee $bdd");
mysql_close($conn);
?>
<?
session_start();
$_SESSION['nom']=$HTTP_POST_VARS['TxtNom'];
$_SESSION['prenom']=$HTTP_POST_VARS['prenom'];
$_SESSION['adresse']=$HTTP_POST_VARS['adresse'];
$_SESSION['codepostal']=$HTTP_POST_VARS['codepostal'];
$_SESSION['localite']=$HTTP_POST_VARS['localite'];
$_SESSION['email']=$HTTP_POST_VARS['email'];
$_SESSION['statut']=$HTTP_POST_VARS['statut'];
$_SESSION['diplome']=$HTTP_POST_VARS['diplome'];
$_SESSION['jour']=$HTTP_POST_VARS['jour'];
$_SESSION['moiss']=$HTTP_POST_VARS['mois'];
$_SESSION['annee']=$HTTP_POST_VARS['an'];
$_SESSION['annee']=$HTTP_POST_VARS['an'];
include "fonction.js"
(((c'est celle la la ligne 36)))<html>
<head>
<title>page loginnew</title>
<meta http-equiv="Content-Type" content="text/html;">
<script language="Javascript">
</script>
<script language="Javascript" >
function confirmer() {
//var reponse=confirm("êtes-vous d'accord");
var j = document.form.jour.value;
var m = document.form.mois.value;
var a = document.form.an.value;
var message;
var num1=0;
var num2=0;
var num3=0;
//var l= document.forms.prenom.length
//var motpasse = "abdel";
//var saisie = window.prompt("Veuillez donner le mot de passe:","");
if (document.form.prenom.value=="")
{
message= "penom vide";
num1=1;
}
if (document.form.TxtNom.value=="")
{
message= "Nom vide";
num2=2;
}
//alert ("longueur"+l);
alert ( "le mois" + <? echo $_SESSION['moiss'] ?>);
//alert (date_valide(document.form.jour.value,document.form.mois.value,document.form.an.value));
//if(reponse== true) {
//alert("Mot de passe erroné!");
//alert( document.form.jour.value);
// document.location.href="nabilbon.htm";
if(date_valide(<? echo $_SESSION['jour'] ?>,<? echo $_SESSION['moiss'] ?>,<? echo $_SESSION['annee'] ?>)=="False") {
message="Date invalide";
num3=3;
}
//alert(j m a );
if (num1==0 && num2==0 && num3==0)
{
document.location.href="bonpage.php";
}
else
{
alert (message );
}
//document.location.href="modiflogin.php";
}
</script>
</head>
<body bgcolor="#ffffff" onLoad="confirmer()">
<?php
//session_start();
//$_SESSION['nom']=$HTTP_POST_VARS['nom'];
//if ($PHPSESSID)
// session_start($PHPSESSID);
//else
// session_start();
//session_unset();
?>
<table width="75%" border="1">
<tr>
</tr>
</table>
<form name="form" method="post" action="">
<table width="892" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="Sans titre" fwbase="login1.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td colspan="6"><img src="spacer.gif" width="550" height="1" border="0" alt=""></td>
<td width="30"><img src="spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="20" colspan="6" bgcolor="#CCCCCC"> <blockquote>
<div align="left"><font color="#000000" size="7" face="Times New Roman, Times, serif"><em>
<font color="#666666">aaaaaaaa</font><font color="#CCCCCC"><font color="#000000">pré</font></font>
inscription</em></font></div>
</blockquote></td>
<td><img src="spacer.gif" width="1" height="44" border="0" alt=""></td>
</tr>
<tr>
<td> </td>
<td height="22"> </td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="22" valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td rowspan="7"><img src="spacer.gif" width="1" height="60" border="0" alt=""></td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Nom:</strong></td>
<td width="6" valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="38" valign="top"> <font color="#FFFFFF">
<input type="text" value="<? echo $_POST['TxtNom']?>" name="TxtNom" onBlur="javascript:changeCase(this.form.TxtNom)">
aaaaaaaaaaaaa::a</font><strong>Prénom</strong>:
<input type="text" name="prenom" value="<? echo $_POST['prenom']?>"></td>
<td> </td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Adresse:</strong><font color="#FFFFFF">:</font></td>
<td width="6" height="38" valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top"> <input name="adresse" type="text" size="75" value="<? echo $_POST['adresse']?>"></td>
<td> </td>
</tr>
<tr>
<td width="12"> </td>
<td width="12" height="24"> </td>
<td width="110" valign="top"><strong>Code postal:</strong></td>
<td width="6" height="38" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="721" valign="top"><input type="text" name="codepostal" value="<? echo $_POST['codepostal']?>">
<font color="#FFFFFF"> aaaaaaaaaaaaaaa asa::::</font><strong>Localité:</strong>
<input type="text" name="localite" value="<? echo $_POST['localite']?>"></td>
<td width="1"> </td>
</tr>
<tr>
<td width="12"></td>
<td width="12" height="27"></td>
<td width="110" valign="top"><strong>Date naissance:</strong> </td>
<td width="6" valign="top"><!--DWLayoutEmptyCell--> </td>
<td height="38"> <select name="jour"><br>
<?
echo "<option selected ><strong>JOUR</strong></option>";
for ($n=1;$n<=31;$n++)
{
echo "<option value = $n";
echo ">$n \n";
}
?>
</select> <select name="mois">
<?
$mois = array(1=> "Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
echo "<option selected ><strong>MOIS</strong></option>";
for ($i=1;$i<=12;$i++)
{
echo "<option value = $i";
echo ">$mois[$i] \n";
}
?>
</select> <select name="an">
<?
$an= date("Y");
echo "<option selected ><strong>ANNEE</strong></option>";
for ($n=$an-45;$n<=$an-18;$n++)
{
echo "<option value = $n";
echo ">$n \n";
}
?>
</select> <strong><font color="#FFFFFF">aaaa</font>E.mail:</strong> <input name="email" type="text" size="18" value="<? echo $_POST['email']?>">
</td>
</tr>
<tr>
<td></td>
<td height="32"></td>
<td><strong>Diplôme:</strong></td>
<td><!--DWLayoutEmptyCell--> </td>
<td><select name="diplome">
<option selected><? echo $_POST['diplome']?></option>
<option>CESS</option>
<option>CESI</option>
</select> <font color="#FFFFFF">aaaaaasaaaaaaaaaaaaasaaaaaaaaaaa::</font><strong>Statut:</strong>
<select name="statut">
<option selected><? echo $_POST['statut']?></option>
<option>CPAS</option>
<option>Chômage</option>
</select></td>
<td></td>
</tr>
<tr>
<td width="12"></td>
<td width="12" height="32"></td>
<td width="110"><!--DWLayoutEmptyCell--> </td>
<td width="6"><!--DWLayoutEmptyCell--> </td>
<td> <font color="#FFFFFF">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</font>
<input type="submit" name="Submit" onClick="" value="Envoyer">
</form></td>
<td></td>
</tr>
<tr>
<td colspan="6"><img src="login1_r3_c1.gif" alt="" name="login1_r3_c1" width="488" height="181" border="0" align="middle"></td>
<td><img src="spacer.gif" width="1" height="196" border="0" alt=""></td>
</tr>
<tr>
<td colspan="6"><!--DWLayoutEmptyCell--> </td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td colspan="6"><!--DWLayoutEmptyCell--> </td>
<td><!--DWLayoutEmptyCell--> </td>
</tr>
</body>
</html>
kij_82
Messages postés
4089
Date d'inscription
jeudi 7 avril 2005
Statut
Contributeur
Dernière intervention
30 septembre 2013
857
25 avril 2005 à 14:24
25 avril 2005 à 14:24
Si tu ferme ta balise de code php avant cette ligne ca ira tout de suite mieux ;)
?>
?>