bonjour je viens d'installer easy php et voila que je rencontre 2 probleme :
le premier est que je n'arrive pas a ouvrir mon formulaire corectement le voici(<?
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"
?>
<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>
)
le deuxième soucis est que je ne sais pas comment ouvrir mysql ?
je vous demande de bien vouloir m'aider car c'est un travail que je dois rendre impérativement tot?
Afficher la suite