error con include
| From: | pedro | Date: | Sat, 19 Apr 2003 18:33:15 +0000 |
| Subject: | error con include | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-35300@lists.php.net to get a copy of this message | ||
Hola ...
Quiero cambiar una parte de mi página según una selección, para eso intento
utilizar el include y ficheros .inc
Pero siempre me muestra la página por defecto. Aquí les paso el código.
Gracias
///fichero index.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Cubatropicaltours</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="jscss/sty.css" type="text/css">
</head>
<body marginwidth="0" marginheight="0" rightmargin="0"
leftmargin="0"
bottommargin="0" topmargin="0" height=550 width=800>
<table width="100%" border="0" bgcolor="#00CCFF">
<tr>
<td>
<table width="100%" border="0">
<tr>
<td align="left" valign="top"><img
src="images/logoCubaTropical.gif"></td>
<td align="left" valign="top"><img
src="images/txtslogan.gif"></td>
</tr>
</table></td>
<td width="360"> </td>
</tr>
</table>
<table width="100%" bgcolor="#33FF99" border="0"
cellpadding="0"
cellspacing="0" >
<tr>
<td width="80%">
</td>
</tr>
</table>
<table width="100%" height="737" border="0"
bgcolor="#FFFFCF">
<tr>
<td width="20%" height="731"><table width="100%"
height="725"
border="0">
<tr>
<td height="437"> </td>
</tr>
</table></td>
<td width="60%" align="center" valign="top">
<?
switch ($_GET['id']) {
case 1:
include("hoteles_home.inc");
break;
case 2:
include("excur_home.inc");
break;
case 3:
include("prog_home.inc");
break;
default:
include("hoteles_home.inc");
// estado default .. nos determina el estado
// "si no es ninguna opcion de las anteriores".
}
?>
</td>
<td width="20%"> </td>
</tr>
</table>
</body>
</html>
///fichero hoteles_home.inc
<link rel="stylesheet" href="jscss/sty.css" type="text/css">
<Table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<TABLE width="#200" cellSpacing=0 cellPadding=0 border="0">
<TBODY>
<TR>
<TD><IMG src="images/tabs_active_left.gif" alt="" width=10
height=22 border=0></TD>
<TD class=ActiveTab rowSpan=2><A class=ActiveTab>Hoteles</A></TD>
<TD><IMG height=22 alt="" src="images/tabs_active_right.gif"
width=10 border=0></TD>
<TD><IMG height=22 alt="" src="images/tabs_inact_left.gif"
width=10 border=0></TD>
<TD class=InactiveTab><A class=Tabs
href="index.php?id=2">Excursiones</A></TD>
<TD><IMG height=22 alt="" src="images/tabs_inact_right.gif"
width=10 border=0></TD>
<TD><IMG height=22 alt="" src="images/tabs_inact_left.gif"
width=10 border=0></TD>
<TD class=InactiveTab><A class=Tabs
href="index.php?id=3">Programas</A></TD>
<TD><IMG height=22 alt="" src="images/tabs_inact_right.gif"
width=10 border=0></TD>
</TR>
</TBODY>
</TABLE>
<table>
.....................
</table>
</td>
</tr>
</Table>
</form>