Windows linux Software Super Tips

All Tips For Os & Software

 
Home
Add to Technorati Favorites

php test switch case
Wednesday, January 31, 2007
CODE::
CódigoPHP:
<html>
<head>
<title>WebModular</title>
<metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1">
</head>

<body>
<tablewidth="100%"border="0"cellpadding="5">
<tr>
<tdcolspan="2">CabeceradenuestraWeb</td>
</tr>
<tr>
<td><ahref="index.php?id=1">Secci?n1</a><br>
<ahref="index.php?id=2">Seccion2</a></td>
<td>
<?
$id=$_GET['id'];

switch($id){
case1:
include("pagina1.php");
break;
case2:
include("pagina2.php");
break;
case3:
include("pagina3.php");
break;
default:
include("pagina_por_defecto.php");
//estadodefault..nosdeterminaelestado
//"sinoesningunaopciondelasanteriores".
}
?>
</td>
</tr>
<tr>
<tdcolspan="2">Piedep?gina</td>
</tr>
</table>
</body>
</html>

Tags: php test switch case
 
0 Comments:
Post a Comment
<< Home
 
Search



Previous Post
Archives
Links
    Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online Add to My AOL Add to Technorati Favorites!
Powered by

BLOGGER

© 2005 Windows linux Software Super Tips
eXTReMe Tracker