Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[resolu]petit pb php

Featured Replies

Posté(e)

Voila mon code

<?

session_start();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >

<head>

<title>Supprimer un menu</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" media="screen" type="text/css" title="index" href="index.css" />

</head>

<body>

<?

echo file_get_contents('entete.html');

include("compte.php3");

echo file_get_contents('menu.html');

?>

<div id="corps">

<?

$j=$_POST['jour'];

$m=$_POST['mois'];

$a=$_POST['année'];

$resto=$_POST['resto'];

$db=mysql_connect("localhost","root","");

mysql_select_db("lycée raymond cortat",$db);

$req1=mysql_query("select * from $resto where date='$a-$m-$j'")or die ("query failed");

$men=mysql_fetch_array($req1);

if (empty($men['menu']))

{

echo "La date saisie n'est pas valide, veuillez ressaisir une date. Si le problème persiste, merci

de le signaler au ";

?>

<a href="mailto:delp.pierre@laposte.net">Webmaster</a>.

<?

}

else

{

?><Center>Voulez-vous vraiment supprimé ce menu?<br><?echo stripslashes(nl2br($men['menu']));?></center><?

mysql_close();

$conf=0;

?>

<center><INPUT TYPE=BUTTON NAME="valider" VALUE="Oui" ONCLICK=$conf=1;>

<a href=miseajour.php3><input type=button name="annuler" value="Non"></a></center>

<?

if ($conf==1)

{

$db=mysql_connect("localhost","root","");

mysql_select_db("lycée raymond cortat",$db);

mysql_query("delete from $resto where date='$a-$m-$j'")or die ("query failed");

mysql_close();

?><center><?

echo "Menu supprimé";?></center>

<br> <center><a href="supprimer.php3"><?

echo "Retour";?></a></center><?

}

}

?>

</div>

</body>

</html>

Comme vous le voyez en bas juste avant le if, je n'arrive pas a assigner a ma variable $conf, un 1 lorsque l'on clique sur le bouton oui et ça me prend la tete. Est ce que quelqu'un connaîtrait une solution?

Modifié par roscow

Posté(e)

Ca ne risque pas de marcher...

Je te rappelle que le PHP (ton $conf) est exécuté côté serveur, alors que le HTML/Javascript (onClick=...) est exécuté côté client.

Posté(e)

regarde mon post ici

sinon faut passer la variable dans l'url et la récupérée avec $_GET["nomdetavariable"]

c'est exactement comme l'url du post si on fesait un $showtopic = $_GET["showtopic"] on aurait $showtopic = 76004

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.