Hello everybody !
Like you see i'm new in this forum and in php too...
I got a little probleme :
Messages :
1."session_start(): Cannot send session cookie - headers already sent by (output started at ...
2." session_start(): Cannot send session cache limiter - headers already sent (output started at ...
My page :
<?php
include_once 'includes/connexion.php';
include_once 'includes/functions.php';
include_once 'admin/includes/ad_functions.php';
connexion_db('bouchind_db');
$host = "localhost";
$user = "root";
$bdd = "bouchind_db";
$passwd = "";?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="160" height="300" rowspan="2" align="center" valign="top" background="images/home.gif" bgcolor="#f5f5f5">
<?php $verification = page_to_display("verification"); ?>
<form name="form" method="post" action="index.php?id_page=<?php echo $verification['id_page']; ?>">
<table width="160" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" colspan="2" align="center" bgcolor="#FFFFFF" class="txt_fin_contenu "><img src="images/login_top.gif" width="123" height="25" /></td>
</tr>
<tr>
<td height="10" colspan="2" align="center" class="txt_fin_contenu "> </td>
</tr>
<tr>
<td align="right"><span class="txt_fin_contenu ">Login</span></td>
<td align="center"><input name="login" type="text" class="fields" id="login" size="15" maxlength="15"/></td>
</tr>
<tr>
<td height="25" align="right" class="txt_fin_contenu ">Password</td>
<td height="25" align="center" class="txt_fin_contenu "><input name="pwd" type="text" class="fields" id="pwd" size="15" maxlength="15" /></td>
</tr>
<tr>
<td height="3" colspan="2" align="center"></td>
</tr>
<tr>
<td height="30" align="center"></td>
<td height="30" align="center"><input name="Submit" type="submit" class="bt_valider" value="Submit" /></td>
</tr>
</table>
<img src="images/login_linespace.gif" width="160" height="2" />
</form>
</td>
<td width="100%" align="right" valign="top">
<table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td height="25"> </td></tr></table>
</td><td width="74" height="300" rowspan="2" valign="top"><img src="images/logo_right_bg.gif" width="74" height="272" /></td>
</tr> <tr>
<td align="right" valign="bottom"><table width="95%" height="275" border="0" align="center" cellpadding="3" cellspacing="0" class="txt_fin_contenu">
<tr>
<td align="left" bgcolor="#f5f5f5">
<?php session_start();
if(isset($POST['acces']))
{
if(eregi("[^'$()+<>?#\"{}\]",$POST['login']) OR eregi("[^'$()+<>?#\"{}\]",$POST['password']))
{
echo 'Pas de caractères spéciaux';
exit;
}
else
{
mysql_connect($host, $user,$passwd) or die("erreur de connexion au serveur");
mysql_select_db($bdd) or die("erreur de connexion a la base de donnees");// il faut changer les paramètres de connexion à la base mysql
$requete=mysql_query("SELECT COUNT(*) FROM members WHERE login='".$POST['login']."' AND password='".$POST['password']."'");
$r=mysql_fetch_row($requete);
if($r[0]==1)
{
$SESSION['login']=$_POST['login'];
header('location:index_mbr.php');
exit;
}
}
}
else
{
echo 'Vous n\etes pas inscrit.';
}
?>
</td>
</tr>
</table></td> </tr> </table>🙂
Thanks you for the help