1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| <?session_start(); ?>
<?
if(!isset($_GET['prod'])){
require('inc_connect.php');
$sql="Select* from images";
$req=mysql_query($sql,$connexion)or exit ('Erreur SQL !'.$sql.'<br>'.mysql_error());
while( $data=mysql_fetch_array($req) ) {
}
mysql_close();
?>
</table>
<link href="style.css" rel="stylesheet" type="text/css" />
<div align="left">
<?}
if(isset($_GET['prod'])){
if(!is_numeric($_GET['prod'])){//juste une première sécurité
echo"<font color='red'>MERCI DE NE PLUS RECOMMENCER CETTE OPERATION !!!</font>";
exit;
}
require('inc_connect.php');
$sql1="Select* from images where id_images=".$_GET['prod'];
$req1=mysql_query($sql1,$connexion)or exit ('Erreur SQL !'.$sql1.'<br>'.mysql_error());
$nb=mysql_num_rows($req1);
if($nb==0){//juste une seconde sécurité
echo" <font color='red'>MERCI DE NE PLUS RECOMMENCER CETTE OPERATION !!!</font>";
exit;
}
//afichage du Produit séléctionné avec qté à commander:
while( $data=mysql_fetch_array($req1) ) {
?>
<form method="POST" action="Panier4_2.php">
<?
echo"<tr><td><img width=350px src=".$data['image']." /><br></td></tr>".
"<tr><td colspan='3'><input type='submit' name='action' value='Sélectionner'></td></tr>".
"<input name='id' type='hidden' value='".$data['id_images']."'>";
}
mysql_close();
?>
</table>
<br>
<div align="center"><a href="javascript:history.go(-1)"><< Retour Boutique</a></div>
<?
}
?> |
Partager