Problems creating a User management system

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
reddurango
Forum Newbie
Posts: 13
Joined: Sun Aug 16, 2009 9:17 am

Problems creating a User management system

Post by reddurango »

I have a few troubles with my management system, i tried to use $_SESSION variables but i couldn't it only works on my first page, 'cause when i tried to use it in the next page it doesn't work anymore, so i decided to use GET and POST but i just get one problem, i'm using the include instruction to paste a php file into another but the file included can't use the GET and POST variables, someone can give me a hint on what can i do????
reddurango
Forum Newbie
Posts: 13
Joined: Sun Aug 16, 2009 9:17 am

Re: Problems creating a User management system

Post by reddurango »

about the session start yes it is in my website, in this code i'm posting i take it off, and i'm placing my code when i try to get the POST but it isn't work

File one where i called the next file

Code: Select all

<?php
$con = mysql_connect ("localhost","carad_admin","reddurango");
if (!$con)
    {
    die('No puede conectarse: ' . mysql_error());
    }
 
mysql_select_db("carad_hoteles", $con);
 
$hotel = $_GET ["hotel"];
 
$result = mysql_query("SELECT * FROM hoteles
WHERE hotel_id='{$hotel}';");
 
 
while ($row = mysql_fetch_array($result))
    {
    include ($row['hotel_descripcion']);
    }
 
 
 
mysql_close($con);
?>
The file i'm getting is this, in the bold font i show you one of the forms trying to get the data

Code: Select all

<table width="100%" border="0">
  <tr>
    <td width="12%"><img src="images/hoteles/hoteles/emporiomzt.jpg" width="100" height="80" /></td>
    <td width="12%"><img src="images/hoteles/logos/emporiomzt.jpg" width="100" height="48" /></td>
    <td width="76%">Emporio es el primer hotel ubicado en la zona dorada, a un costado de valentino&acute;s , cuenta con
  134 c&oacute;modas habitaciones con terraza y vista al mar, 7 Jr. Suite, 9 Master Suite, equipadas con 
  DVD y CD para entretenimiento, 2 albercas y jacuzzi climatizado, estacionamiento, secadora, 
  bascula, cafetera, kit de planchado y habitaciones exclusivas para no fumadores. </td>
  </tr>
  <tr>
    <td colspan="3"><table width="100%" border="0" cellspacing="0">
      <tr>
        <td width="13%" bgcolor="#CCCCCC">Fecha</td>
        <td width="27%" bgcolor="#CCCCCC">Sencilla/Doble</td>
        <td width="20%" bgcolor="#CCCCCC">Persona Adicional </td>
        <td width="20%" bgcolor="#CCCCCC">Ni&ntilde;os</td>
        <td width="20%" bgcolor="#CCCCCC">Promoci&oacute;n</td>
      </tr>
      <tr>
        <td bgcolor="#CCCCCC">ABR.  19, a<br />
          JULIO 02, 09&rsquo;</td>
        <td bgcolor="#CCCCCC">$1,157.00</td>
        <td bgcolor="#CCCCCC">$ 177.00 </td>
        <td bgcolor="#CCCCCC">Hasta 12 A&ntilde;os Gr&aacute;tis </td>
        <td bgcolor="#CCCCCC">3a. Noche Gratis "o" desayuno americano "o" 3ra. 4a. Persona Sin costo </td>
      </tr>
      <tr>
        <td bgcolor="#CCCCCC">JULIO 03, a<br />
          AGO. 15, 08&rsquo;</td>
        <td bgcolor="#CCCCCC">$1,369.00</td>
        <td bgcolor="#CCCCCC">$ 177.00 </td>
        <td bgcolor="#CCCCCC">Hasta 12 A&ntilde;os Gr&aacute;tis </td>
        <td bgcolor="#CCCCCC">3er. pax gratis sin alimentos Estancia minima 3 noches </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
[b]        <td><div align="center"><form action="/calendario/formulario.php" method="get"><input type="hidden" name="usuario" value=<?php $_GET['usuario']; ?>><input type="hidden" name="hotel" value=<?php $_GET['hotel']; ?>>
        <input type="hidden" name="room" value="SGL/DBL" /><input type="image" src="/images/boton_reservar.jpg" /></form></div></td>[/b]
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="3">*Tarifas en moneda nacional, por habitaci&oacute;n por noche en ocupaci&oacute;n Sencilla o Doble. *Plan Europeo, *Incluye 18% de impuestos (15% de I.V.A. y 3% 
    de impuesto estatal). *Tarifas sujetas a cambio sin previo aviso. * Comisionable al 15%.</td>
  </tr>
  <tr>
    <td colspan="3"><table width="100%" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15%">Fecha</td>
        <td width="13%">SGL</td>
        <td width="13%">DBL</td>
        <td width="14%">TPL</td>
        <td width="15%">CPL</td>
        <td width="16%">Ni&ntilde;os menores a 6 a&ntilde;os </td>
        <td width="14%">Ni&ntilde;os de 6 a 12 a&ntilde;os </td>
      </tr>
      <tr>
        <td>ABR.  19, a<br />
JULIO 02, 09&rsquo;</td>
        <td>$1,412.00</td>
        <td>$1,173.00</td>
        <td>$1,379.00</td>
        <td>$858.00</td>
        <td>$375.00</td>
        <td>$625.00</td>
      </tr>
      <tr>
        <td>JULIO 03, a<br />
AGO. 15, 08&rsquo;</td>
        <td>$1,498.00</td>
        <td>$1,223.00</td>
        <td>$988.00</td>
        <td>$916.00</td>
        <td>$375.00</td>
        <td>$625.00</td>
      </tr>
      <tr>
Post Reply