Bonjours
J'ai un gros problème d'affichage d'une page suite à sa sélection. la page demande.php contient deux frames.
centre.php est le frame 1
menu_d.php est le frame 2 et contient le menu de routage qui permet d'afficher la page selectionnée.
demande.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans nom</title> </head> <frameset cols="33%,*" frameborder="no" border="0" framespacing="0"> <frame src="centre.php" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" /> <frame src="menu_d.php" name="mainFrame" id="mainFrame" /> </frameset> <noframes><body> </body> </noframes></html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?php session_start(); mysql_connect("localhost","root",""); mysql_select_db("ibe"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <form method="post" action="../../m_root_ibe/f_root.php"> <table border="1" align="left"> <tr><th><B>MENU DE ROUTAGE</B></th></tr> <tr><td> <select name="root_admin"> <option>Sélectionner</option><?php $res= mysql_query("SELECT num_menu,nom,categorie FROM fr_cat_root WHERE num_cat=2 AND categorie LIKE 'Particulier'");if ($res){while ($resultat=mysql_fetch_object($res)){echo "<option value=$resultat->num_menu>$resultat->nom";}} ?></option></select> </td></tr> <tr><td align="center"><input type="submit" value="Afficher" /></td></tr> </table> </form> </body> </html>Lorsque je sélectionne la page inscription.php, dans le frame 2, la page s'affiche dans la page demande.php au lieu d'afficher la page dans une nouvelle page.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <?php session_start(); mysql_connect("localhost","root",""); mysql_select_db("ibe"); $num_sess = $_SESSION['ident']; $cat = $_POST['root_admin']; $sql = "SELECT a.num_session,a.num_cat,c.num_cat,c.num_menu,c.page FROM fr_session a, fr_cat_root c WHERE a.num_session = ".$num_sess." AND a.num_cat = c.num_cat AND c.num_menu = ".$cat; $res = mysql_query($sql); $row = mysql_fetch_object($res); if (isset($row->page)) {header("location:".$row->page);} else{header("location:../portail/portail.php");} ?>
Comment faire pour afficher inscription.php dans une nouvelle page et non dans demande.php ?
Que faut il modifier dans f_root.php pour cela se produise ?
Partager