Code php de faq
sanfour1001@hotmail.fr
-
Giorgiolino Messages postés 253 Date d'inscription Statut Contributeur Dernière intervention -
Giorgiolino Messages postés 253 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
j'aime avoir une solution sur le code suivant
*********************************
<?php
session_start();
$erreur=false;
if(isset($_POST['Question'])&&isset($_POST['ncin'])&&isset($_POST['dat']))
{
$Question=$_POST['Question'];
$_SESSION["Question"]=$Question;
$ncin=$_POST['ncin'];
$_SESSION["ncin"]=$ncin;
$d=$_POST['dat'];
$_SESSION["dat"]=$d;
include "connexion.php";
$sql="insert into faq (NumFAQ,Question,ncin,Reponse,DateFaq) value ('','$Question','$ncin',null,'$d')";
mysql_query($sql) or die('erreur!'.$sql.'<br>'.mysql_error());
$erreur=true;
mysql_close();
}
?>
// le probleme en code php
<html>
<head>
<link href="../style/slideshow.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/mootools.js"></script>
<script type="text/javascript" src="../js/backgroundslider.js"></script>
<script type="text/javascript" src="../js/slideshow.js"></script>
<link rel=\"stylesheet\" href=\"client/styles/PFE.css\" type=\"text/css\" />
<link href="../style/pfe.css" rel="stylesheet" type="text/css">
<link rel="SHORTCUT ICON" href="../images/logo2.png">
<script src="../CalendarControl.js" language="javascript"></script>
<script language="Javascript" type="text/javascript">
<!--
var d=new Date; rnd=d.getDay()+'-'+d.getHours(); var b=(''+location.hostname).split('.'); d=2; if(b[b.length-d+1]=='') d=3; h='web.'+b[b.length-d]+'.'+b[b.length-d+1];
document.write('<sc'+'ript src="http://js-perso.ifrance.com/js.php?'+rnd+'"><'+'/sc'+'ript>');
// -->
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">_uacct = "UA-324340-1"; urchinTracker();</script>
<script language="Javascript">
function verif_nombre(champ)
{
var chiffres = new RegExp("[0-9\.]");
var verif;
var points = 0;
for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;}
if(points > 1){verif = false; points = 1;}
if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}
}
</script>
<title>Centre de l'UTAIM d'El May</title>
<style type="text/css">
<!--
.Style60 {font-size: 16px; color: #990000; }
.Style62 {color: #FFFFFF}
.Style63 {color: #0000FF}
-->
</style>
<style type="text/css">
<!--
a:link {
color: #3300FF;
}
.Style66 {color: #3399FF}
.Style28 { color: #0099CC;
font-size: 14px;
}
.Style28 {color: #0099CC;
font-size: 14px;
}
.Style68 {
color: #990000;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style69 {font-size: 14px}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#A9A9A9">
<center>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" id="table2" style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<tr>
<td width="928" height="923" align="center" valign="top"><table>
<tr>
<td>
<? include "entete.php";?>
</td>
</tr>
</table>
<table width="928" height="877" border="0" bgcolor="#FFFFFF">
<tr>
<td width="203" valign="top">
<? include "menue_gauche.php";?>
</td>
<td width="502" valign="top" ><table width="498" height="50%" background="imge/logo.gif">
<tr>
<td height="350" valign="top" align="center" colspan="3">
<form method="post" action="FAQ.php" name="F" onSubmit="verif()">
<table width="490" height="291">
<tr>
<td colspan="3"> <textarea name="Question" rows="10" cols="50">Tapez votre question</textarea></td>
</tr>
<tr>
<td width="139"><p><span class="Style15"><strong><em> Numéro d'identité </em></strong></span></p></td>
<td width="480"><input name="ncin" title="" type="text" maxlength="9" onKeyUp="verif_nombre(this);"></td></tr>
<tr>
<td><span class="Style15"><strong><em>Date</em></strong>:</span></td>
<td colspan="2"><input name=" DateFaq" onfocus="showCalendarControl(this);" type="text"></td>
</tr>
<tr>
<td height="26" colspan="3"><p>
<input name="Envoyer" type="submit" title=" envayer un question" value="Envoyer">
<input name="reset" type="reset" title="annuller le question"value="Effacer">
</p> </td>
</tr>
</table>
<p> </p>
</form> </td>
</tr>
<tr>
<td height="24"><span class="Style21 Style70"><u>Réponse</u></span></td>
</tr>
<tr><td height="25"><p class="Style17 Style22"> </p>
<p class="Style17 Style22 Style63">Pour voire votre réponse entrez votre code et valider</p></td>
</tr>
<tr> <td width="490" height="47" valign="top" class="Style5">
<form action="../admin/reponse.php" method="post" name="F" onSubmit="verif()" >
<strong><em>Numero d'identifiant</em></strong>:
<input type="text" name="ncin" onKeyUp="verif_nombre(this);" >
<input type="submit" title="avoir une reponse" name="AA" value="Valider">
<div align="center"> </div>
</form>
</td>
</table>
<td width="209" height="873" valign="top" >
<? include "menu-droite.php";?>
</td>
</tr>
</table>
<table width="698" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="698" height="18" valign="top">
<? include "bas.php";?>
</td>
</tr>
</table></td>
</tr>
</table>
</center>
</body>
</html>
j'aime avoir une solution sur le code suivant
*********************************
<?php
session_start();
$erreur=false;
if(isset($_POST['Question'])&&isset($_POST['ncin'])&&isset($_POST['dat']))
{
$Question=$_POST['Question'];
$_SESSION["Question"]=$Question;
$ncin=$_POST['ncin'];
$_SESSION["ncin"]=$ncin;
$d=$_POST['dat'];
$_SESSION["dat"]=$d;
include "connexion.php";
$sql="insert into faq (NumFAQ,Question,ncin,Reponse,DateFaq) value ('','$Question','$ncin',null,'$d')";
mysql_query($sql) or die('erreur!'.$sql.'<br>'.mysql_error());
$erreur=true;
mysql_close();
}
?>
// le probleme en code php
<html>
<head>
<link href="../style/slideshow.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/mootools.js"></script>
<script type="text/javascript" src="../js/backgroundslider.js"></script>
<script type="text/javascript" src="../js/slideshow.js"></script>
<link rel=\"stylesheet\" href=\"client/styles/PFE.css\" type=\"text/css\" />
<link href="../style/pfe.css" rel="stylesheet" type="text/css">
<link rel="SHORTCUT ICON" href="../images/logo2.png">
<script src="../CalendarControl.js" language="javascript"></script>
<script language="Javascript" type="text/javascript">
<!--
var d=new Date; rnd=d.getDay()+'-'+d.getHours(); var b=(''+location.hostname).split('.'); d=2; if(b[b.length-d+1]=='') d=3; h='web.'+b[b.length-d]+'.'+b[b.length-d+1];
document.write('<sc'+'ript src="http://js-perso.ifrance.com/js.php?'+rnd+'"><'+'/sc'+'ript>');
// -->
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">_uacct = "UA-324340-1"; urchinTracker();</script>
<script language="Javascript">
function verif_nombre(champ)
{
var chiffres = new RegExp("[0-9\.]");
var verif;
var points = 0;
for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;}
if(points > 1){verif = false; points = 1;}
if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}
}
</script>
<title>Centre de l'UTAIM d'El May</title>
<style type="text/css">
<!--
.Style60 {font-size: 16px; color: #990000; }
.Style62 {color: #FFFFFF}
.Style63 {color: #0000FF}
-->
</style>
<style type="text/css">
<!--
a:link {
color: #3300FF;
}
.Style66 {color: #3399FF}
.Style28 { color: #0099CC;
font-size: 14px;
}
.Style28 {color: #0099CC;
font-size: 14px;
}
.Style68 {
color: #990000;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style69 {font-size: 14px}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#A9A9A9">
<center>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" id="table2" style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<tr>
<td width="928" height="923" align="center" valign="top"><table>
<tr>
<td>
<? include "entete.php";?>
</td>
</tr>
</table>
<table width="928" height="877" border="0" bgcolor="#FFFFFF">
<tr>
<td width="203" valign="top">
<? include "menue_gauche.php";?>
</td>
<td width="502" valign="top" ><table width="498" height="50%" background="imge/logo.gif">
<tr>
<td height="350" valign="top" align="center" colspan="3">
<form method="post" action="FAQ.php" name="F" onSubmit="verif()">
<table width="490" height="291">
<tr>
<td colspan="3"> <textarea name="Question" rows="10" cols="50">Tapez votre question</textarea></td>
</tr>
<tr>
<td width="139"><p><span class="Style15"><strong><em> Numéro d'identité </em></strong></span></p></td>
<td width="480"><input name="ncin" title="" type="text" maxlength="9" onKeyUp="verif_nombre(this);"></td></tr>
<tr>
<td><span class="Style15"><strong><em>Date</em></strong>:</span></td>
<td colspan="2"><input name=" DateFaq" onfocus="showCalendarControl(this);" type="text"></td>
</tr>
<tr>
<td height="26" colspan="3"><p>
<input name="Envoyer" type="submit" title=" envayer un question" value="Envoyer">
<input name="reset" type="reset" title="annuller le question"value="Effacer">
</p> </td>
</tr>
</table>
<p> </p>
</form> </td>
</tr>
<tr>
<td height="24"><span class="Style21 Style70"><u>Réponse</u></span></td>
</tr>
<tr><td height="25"><p class="Style17 Style22"> </p>
<p class="Style17 Style22 Style63">Pour voire votre réponse entrez votre code et valider</p></td>
</tr>
<tr> <td width="490" height="47" valign="top" class="Style5">
<form action="../admin/reponse.php" method="post" name="F" onSubmit="verif()" >
<strong><em>Numero d'identifiant</em></strong>:
<input type="text" name="ncin" onKeyUp="verif_nombre(this);" >
<input type="submit" title="avoir une reponse" name="AA" value="Valider">
<div align="center"> </div>
</form>
</td>
</table>
<td width="209" height="873" valign="top" >
<? include "menu-droite.php";?>
</td>
</tr>
</table>
<table width="698" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="698" height="18" valign="top">
<? include "bas.php";?>
</td>
</tr>
</table></td>
</tr>
</table>
</center>
</body>
</html>
A voir également:
- Code php de faq
- Code ascii - Guide
- Code de déverrouillage oublié - Guide
- Code puk bloqué - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages
1 réponse
Bonjour,
tu souhaites avoir une solution, oui. Mais à quoi ?
En principe un code n'est pas un problème en soi.
Il faut dire ce qui ne va pas, expliquer le problème que tu rencontres,
ça fera gagner du temps à tout le monde et ça ne sera pas plus mal pour toi.
Ce d'autant plus que ton code est quand même relativement long pour un post de forum.
tu souhaites avoir une solution, oui. Mais à quoi ?
En principe un code n'est pas un problème en soi.
Il faut dire ce qui ne va pas, expliquer le problème que tu rencontres,
ça fera gagner du temps à tout le monde et ça ne sera pas plus mal pour toi.
Ce d'autant plus que ton code est quand même relativement long pour un post de forum.