Problem showing content in new site

Hello, PHP Help.

A bit of context. I was asked by a relative to migrate his company website (this one -> vigilame.com.ve) to a .com domain. Now, I’m not an expert but I can fight my way through a FTP client and have a basic knowledge of programming. I’m not expected to touch the code or change any information. Just moving content around.

I hired a hosting service for him and copied the whole thing to the new servers. At first the website wasn’t working because of database issues. Having never worked with MySQL databases, it took me a while to figure out that I could export/import the old databases into the new servers and setup the database name, user and password. Now the website loads just fine, EXCEPT for a little detail.

Two of the website sections aren’t working as intended:

One, old website
http://vigilame.com.ve/quienes-somos.php
One, new website
http://vigilame.com/quienes-somos.php

Two, old website
http://vigilame.com.ve/vigicamaras.php
Two, new website
http://vigilame.com/vigicamaras.php

Now, in the OLD website, if you choose any of the options on the left, the site shows the content accordingly. However, in the NEW website, it’s stuck on the first option in both cases.

Next thing I did was checking the code for both sections:

Section One:
[php]<?php
include(‘conex.php’);
include(“administrador/aplicaciones.php”);
?>

VIGILAME :: Video Vigilancia por Internet
<?php include("banner.php");?>
<?php if (isset($personal)) { $sql1="SELECT * FROM personal WHERE personal_id='1' LIMIT 1"; $res1=mysql_query($sql1) or die (mysql_error()); $row1=mysql_fetch_array($res1);
		$sql="SELECT * FROM personal WHERE personal_id != '1' ORDER BY personal_cargo ASC";
		$res=mysql_query($sql) or die (mysql_error());
	?>
	<div class="desarrollo_texto">
	  <p align="center">&nbsp;</p>
	  <p align="center"><img src="imagenes/enconstruccion.jpg" alt="" width="400" height="360" align="middle" /></p>
	  <p>&nbsp;</p>
	  <h1 align="center">EN CONSTRUCCIÓN</h1>
	  <p align="center">&nbsp; </p>
	</div>
    <?php
	} elseif (isset($clientes)) {
	?>
    <div class="desarrollo_texto">
      <h1>Alguno de nuestros clientes</h1>
      <p><span class="destacado1">Tenemos más de 5 años de experiencia</span></p>
      <ul type="disc">
        <li>FRENOS MEDINA,       C.A.</li>
        <li>RUSTICOS DEL       NORTE, C.A.</li>
        <li>TELESEMCA</li>
        <li>YONIS MOLERO</li>
        <li>COOPERATIVA DE       CIENCIA Y TECNOLOGIA DE MARA</li>
        <li>HOTEL KRISTOFF, C.A. </li>
        <li>SUCCO EXPRESS, C.A</li>
        <li>CENO,C.A</li>
        <li>RECUPERADORA DE       MATERIALES LAS TRES DIVINAS PERSONAS</li>
        <li>EL FOGON DE       MAYOLLA</li>
        <li>WILLIAM CARIDAD</li>
        <li>CORPOTECNICA</li>
        <li>SERVICIO DE       COMPUTACION Y TELECOMUNICACIÓN,C.A</li>
        <li>PLASTICOS       MULTIPLEX C.A</li>
        <li>ALEJANDRO BRACHO</li>
        <li>CHARS, C.A.</li>
        <li>YOLAS</li>
        <li>INDUSTRIA COSMO,       C.A.</li>
        <li>PICASA</li>
        <li>RANDY TRUJILLO</li>
        <li>VIDEO SERVICIOS       C.A</li>
        <li>EFRAIN MORENO</li>
        <li>ACRILICOS BICOLOR</li>
        <li>INPROMAR CA</li>
        <li>INVERSIONES 1611 C.A</li>
        <li>BLACKFER</li>
        <li>AREPAS SANTA RITA       C.A</li>
        <li>ANTONIO LAMEDA</li>
        <li>COMERCIALIZADORA       COMERCA, C.A</li>
        <li>CONSULTORES DE       SEGURIDAD</li>
        <li>NEIRA MONSALBES</li>
        <li>LUIS FUENMAYOR</li>
        <li>LINEAS ELECTRICAS       DE OCCIDENTE C.A</li>
        <li>DAVID VELAZQUEZ</li>
        <li>SIACONCA</li>
        <li>SUCCO,C.A</li>
        <li>V &amp; P       INGENIERIA C.A.</li>
        <li>MARWIL DE       VENEZUELA C.A.</li>
        <li>CARTOONS TOYS,       C.A.</li>
        <li>PROTEDICA</li>
        <li>NOVEDADES LA CORONA JOYERIA</li>
        <li>ADAN BERMUDEZ</li>
        <li>TEQUEÑISIMO CA</li>
        <li>EDUARDO HERRERA</li>
        <li>PINTURAS PINITEX       C.A.</li>
        <li>SILLIE JACK ALLAN</li>
        <li>SISCA</li>
        <li>JOSE GALBAN</li>
        <li>PROMAC SISTEM, CA.</li>
        <li>TORNILLERIA Y       FERRETERIA EL 4 C.A.</li>
        <li>AMBAR CENTER       CORPORETION CA</li>
        <li>OSCAR PEDRAJA</li>
        <li>S &amp; S       SERVICIOS Y SOLUCIONES C.A.</li>
      </ul>
    </div>
    <?php
	} else {
	?>
    <div class="desarrollo_texto">
      <h1>Misión</h1>
      <p>Brindar servicios de seguridad integral generando confianza y una  relación mas estrecha con nuestros clientes a través de nuestro trabajo, para  un mutuo beneficio entre empresas; resguardando sus bienes, intereses y  personas bajo un sistema de gestión de calidad e innovación de servicio.<br />
        <br />
      </p>
      <h1>Visión</h1>
      <p>Liderar  y ser reconocido por el mercado nacional de la seguridad privada expandiendo  nuestras áreas de servicio, gracias a la calidad y confiabilidad de nuestro  trabajo y servicio en un corto tiempo. </p>
      <p>&nbsp;</p>
    </div>
    <?php
	}
	?>
    <div class="contenedor_desarrollo_interno_borde"><img src="imagenes/desarrollo_borde_inferior.gif" width="692" height="9" /></div>
</div>
</div>
<?php include("pie.php");?>
<?php mysql_close();?>[/php]

Section Two:
[php]

VIGILAME :: Video Vigilancia por Internet
<?php include("banner.php");?>
<?php if (isset($videovigilancia)) { ?>

VIDEOvigilancia

Estos sistemas funcionan de manera similar a la Televigilancia pero sin salida a internet. Todo se monitorea dentro de la estación del cliente.

En estos dispositivos también graban la información en un disco duro que poseen.

[ Ver catálogo de productos ]

<?php } elseif (isset($ventaseinstalacion)) { ?>

Ventas e instalación

En Vigílame disponemos de una gran variedad de soluciones para vigilar y controlar su empresa bien sea local (Videovigilancia) o remotamente a través del servicio de Televigilancia por internet.

Asesoramiento

Estamos en la capacidad de realizar el proyecto que se ajuste a su necesidad, tanto de espacio como económica.

Ventas

Siempre contamos con un amplio stock de productos. Somos distribuidores y representantes de las más prestigiosas marcas del mercado.

Instalación

Contamos con un personal calificado de instaladores y supervisores con amplia experiencia en el campo. TODOS NUESTROS TRABAJOS ESTÁN GARANTIZADOS.

<?php } elseif(isset($solucionesempresas)) { ?>

Soluciones para empresas

  • Comercios
  • Oficinas
  • Galpones o depósitos
  • Colegios
  • Conjunto de locales o sedes
  • Supervisión de obras
  • Estacionamientos
  • Estaciones de servicio (combustible)
  • Autolavados
  • entre otros...
<?php } elseif (isset($solucioneshogar)) { ?>

Soluciones para el hogar

  • Apartamentos
  • Casa o Quintas
  • Casas vacacionales
  • Edificios
  • Depósitos
  • entre otros...
<?php } else { ?>

TELEvigilancia

Estos son los sistemas más avanzados que existen en el mercado. Permiten observar las cámaras de su empresa u hogar desde cualquier parte del mundo.

Son dispositivos que además de enviar las imagenes de las cámaras a través de internet, graban la información en un disco duro que poseen.

Usted puede visualizar las imágenes de las cámaras con una simple conexión a internet, bien sea un computador, PDA o teléfono móvil con capacidad de conexión a internet.

[ Ver catálogo de productos ]

<?php } ?>
<?php include("pie.php");?>
[/php]

So, one thing I’m noticing is that the ‘stuck’ option is the one defined by else, thus ignoring the options described within if and each elseif

I basically copied and pasted the whole website, so it baffles me that this is happening. Maybe something to do with version differences? I dunno. If anyone can shed some light into this, you’re welcome to do so.

It looks like you’re missing some code. I don’t see where any of those variables are being set. as an example - where is $clientes coming from? try adding this on top of section 1
[php]$personal = $_GET[‘personal’];
$clientes = $_GET[‘clientes’];[/php]
If it works, just continue with the rest of the variables.

Heh… I wonder if this has to do with PHP version changes. The most common being register_globals being set to “On” then being changed to “Off” with later PHP versions.

Could be. all the configs i’ve used had it off.

That did it. Works like a charm now. Thanks richei!

m@tt, indeed, it definitely must have something to do with PHP version changes, since the old website didn’t need any variables to be set beforehand.

Sponsor our Newsletter | Privacy Policy | Terms of Service