Tema: include
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/04/2003, 12:00
araujo_guntin
 
Fecha de Ingreso: febrero-2003
Mensajes: 165
Antigüedad: 21 años, 3 meses
Puntos: 0
include

Hola ...

Estoy empezando en php y tengo el siguiente problema ...

Tengo un php como plantilla y utilizo include para cambiar solo parte de la página. Pero solo toma el valor por defecto no los otros valores. Aquí le paso el código...

Gracias

//inicio de código
<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">&nbsp;</td>
</tr>
</table>
<table width="100%" bgcolor="#33FF99" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="20%" align="left" valign="middle"><a class="Tabs" href="mailto:[email protected]">&nbsp;&nbsp;Con tact us</a></td>
<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="280"><font class="CurrentPage">Journey to the Pearl of Antilles &quot;Cuba&quot; ,the
most safe country in the world.<br><br> Experience warm hospitality of Cuban
people, explore the Old Havana, swim in world-famous beaches as Varadero,
dance your way in the country of rumba, mambo, cha-cha-cha and salsa. <br><br>
Go freely throughout its cities, valleys, mountains, beaches and waterfalls. <br><br>
Return to your country tanned, refreshed and relaxed. </font></td>
</tr>
<tr>
<td height="437">&nbsp;</td>
</tr>
</table></td>
<td width="60%" align="center" valign="top">
<?
$id=$_GET['id'];
switch ($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%">&nbsp;</td>
</tr>
</table>

</body>
//fin codigo

//include 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>
</td>
</tr>
<tr class="ActiveTab">
<td>
<table>
<tr><td width="137">
<font class="CurrentPage"> Nombre del Hotel</font>
</td>
<td width="197">
<select name="nhotel">
<option>Habana Libre</option>
<option>Riviera</option>
<option>Mellia Cohiba</option>
</select>
</td>
<tr>
<td>
<font class="CurrentPage">Destino</font>
</td>
<td>
<select name="ndestino">
<option>Varadero</option>
<option>Santiago de Cuba</option>
<option>La Habana</option></select>
</td>
</tr>
</table>
</td>
</tr>
</Table>
</form>