Probleme php/sql select post
Résolu
jupiter
-
jupiter -
jupiter -
Bonjour,
voila mon souci est qu je souhaite qu'une personn saisise un numero client et que en cliquant sur valider les infos de ce client s'affiche sauf que la il m'affiche rien comment faire merci
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-transitional.dtd">
<html Xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>formulaire</title>
<link href="formulaire.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="header-logo">
<img src="images/logo2.png">
</div>
<div id="header-slogan">
<img src="images/slogan.png">
</div>
</div>
<div id="globalcont">
<h3>Consulter la fiche d'un client:</h3>
<form method="POST" action="view_client.php" value="client">
<table class="table">
<tr><td><p>Entrer son numéro de client :</p></td><td><input type="text" name="ss" size="30" /></td></tr>
</table>
<br /><center><input type="submit" name="envoyer" value="Valider"/></center>
</form>
<?php
include 'config.php';
include 'connexion.php';
if (isset($_POST['envoyer'])) {
echo $sql = "SELECT id, nom, prenom, naissance, ss FROM clients where ss='".$_POST['ss']."'";
$req = mysql_query($sql) or die( mysql_error() ) ;
$total = mysql_num_rows($req);
{
echo '<table>'."\n";
echo '<tr>';
echo '<th ><b><u>Nom</u></b></th>';
echo '<th ><b><u>Prénom</u></b></th>';
echo '<th><b><u>Date de naissance</u></b></th>';
echo '<th><b><u>Numéro de clients</u></b></th>';
echo '</tr>'."\n";
while($row = mysql_fetch_array($req))
{
echo '<tr>';
echo '<td>'.$row["nom"].'</td>';
echo '<td>'.$row["prenom"].'</td>';
echo '<td>'.$row["naissance"].'</td>';
echo '<td>'.$row["ss"].'</td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
}
}
?>
</div>
</body>
</html>
voila mon souci est qu je souhaite qu'une personn saisise un numero client et que en cliquant sur valider les infos de ce client s'affiche sauf que la il m'affiche rien comment faire merci
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-transitional.dtd">
<html Xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>formulaire</title>
<link href="formulaire.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="header-logo">
<img src="images/logo2.png">
</div>
<div id="header-slogan">
<img src="images/slogan.png">
</div>
</div>
<div id="globalcont">
<h3>Consulter la fiche d'un client:</h3>
<form method="POST" action="view_client.php" value="client">
<table class="table">
<tr><td><p>Entrer son numéro de client :</p></td><td><input type="text" name="ss" size="30" /></td></tr>
</table>
<br /><center><input type="submit" name="envoyer" value="Valider"/></center>
</form>
<?php
include 'config.php';
include 'connexion.php';
if (isset($_POST['envoyer'])) {
echo $sql = "SELECT id, nom, prenom, naissance, ss FROM clients where ss='".$_POST['ss']."'";
$req = mysql_query($sql) or die( mysql_error() ) ;
$total = mysql_num_rows($req);
{
echo '<table>'."\n";
echo '<tr>';
echo '<th ><b><u>Nom</u></b></th>';
echo '<th ><b><u>Prénom</u></b></th>';
echo '<th><b><u>Date de naissance</u></b></th>';
echo '<th><b><u>Numéro de clients</u></b></th>';
echo '</tr>'."\n";
while($row = mysql_fetch_array($req))
{
echo '<tr>';
echo '<td>'.$row["nom"].'</td>';
echo '<td>'.$row["prenom"].'</td>';
echo '<td>'.$row["naissance"].'</td>';
echo '<td>'.$row["ss"].'</td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
}
}
?>
</div>
</body>
</html>
A voir également:
- Probleme php/sql select post
- Easy php - Télécharger - Divers Web & Internet
- Brouillon post instagram - Guide
- Post it windows - Télécharger - Agendas & Calendriers
- Code post - Télécharger - Vie quotidienne
- Billing post code - Forum Réseaux sociaux