?
| Current Path : /home/webyoo/www/backup/allback/docteurs/ |
| Current File : /home/webyoo/www/backup/allback/docteurs/villes_regions.php |
<?
include "start.php";
$sql1 = mysql_query("SELECT * FROM doc_villes ORDER BY libelle");
$sql2 = mysql_query("SELECT * FROM doc_villes ORDER BY libelle");
if(isset($_POST['send']))
{
print_r($_POST);
while($val1=mysql_fetch_array($sql2)){
$id = $val1['id'];
echo $waz = $_POST['waze'.$id];
$sel = "UPDATE doc_villes SET waze='$waz' WHERE id=$id";
//echo $sel."<br>";
$sql3 = mysql_query($sel);
}
echo "<br><br><br>Tout est dans la base";
echo "<br><br><a href='http://web4yoo.com/docteurs/villes_regions.php'>Retour a la liste</a>";
}else{
?>
<!DOCTYPE html>
<head>
<style>
#listemed{width:900px;font-size:15px;font-family:tahoma; margin: 0 auto;}
#listemed tr{border-bottom:2px solid #DDDDDD;}
#listemed tr:hover{background:#dedede;}
#listemed td{text-align:center;}
.submit {background: none repeat scroll 0 0 #3a3a3a;
color: white;
height: 52px;
padding: 10px 200px;
text-decoration: none;
width: 500px;font-size:15px;font-family:tahoma; margin: 0 auto;}
</style>
</head>
<body>
<form method="post">
<input type="hidden" name="send" id="send">
<table id="listemed">
<thead>
<tr>
<th>ID de la ville</th>
<th>Nom de la ville</th>
<th>Coordonnees Waze de la ville</th>
</tr>
</thead>
<tbody>
<?
while($val=mysql_fetch_array($sql1)){
?>
<tr>
<td><?=$val['id']?></td>
<td><input type="hidden" name="ville<?=$val['id']?>" id="ville<?=$val['id']?>" value="<?=$val['id']?>"/><?=$val['libelle']?></td>
<td><input type="text" name="waze<?=$val['id']?>" id="waze<?=$val['id']?>" value="<?=$val['waze']?>"/></td>
</tr>
<?}?>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
<input type="submit" value="enregistrer" onclick="return confirm('Miko tu es sur que tu as bien tout saisi ????');"/>
</form>
<script src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
</body>
</html>
<?}?>