Jump to content

php include with IF


eradinn

Recommended Posts

hey i have a website that uses this php include code:

 

<?php

if(!$id || $id == ""){$id = "ff12/ff12";} ?>

              <?php include("$id.html"); ?>

 

so when i get into ff12.php it includes the ff12/ff12/html file automatically.

 

and when you click on another link on the ff12 menu eg, ff12/ff12_battle  (ff12.php?id=ff12/ff12_combat_system)

that file doesnt come up it just stays on the main ff12 page.

 

since i changed hosts, (which uses php5) it doesnt work.

is there fix for this problem?

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/41898-php-include-with-if/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.