$sql="SELECT * FROM partenaire1 UNION ALL SELECT * FROM partenaire2 UNION ALL SELECT * FROM partenaire3 ";
<?php $host= "localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="location"; // Database name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM partenaire1 UNION ALL SELECT * FROM partenaire2 UNION ALL SELECT * FROM partenaire3 "; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> Gestion des voitures <form name ="form1" method="post" action=""> <table width="400" border="0" cellpadding="3" cellspacing="1" > ----, </td> Id, Marque voiture, Date début, Date fin, Fournisseur, <?php while($rows=mysql_fetch_array($result)){ ?> ---- ">, <? echo $rows['id']; ?>, <? echo $rows['marque_voiture']; ?>, <? echo $rows['date_debut']; ?>, <? echo $rows['date_fin']; ?>, <? echo $rows['tbl_name']; ?>, <?php } ?> ---- , <? // Check if delete button active, start this if(isset($_POST['delete'])){ for($i=0;$i<$count;$i++){ $del_id = $_POST['checkbox'][$i];$sql \"DELETE FROM $tbl_name WHERE id'$del_id'\"; $result = mysql_query($sql); } // if successful redirect to delete_multiple.php if($result){ echo \"<meta http-equiv=\\"refresh\\" content=\\"0;URL=sup2.php\\">\"; } } mysql_close(); ?> </form> </td> </tr> </table>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question