PHP Include Error

  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

Iam coding a layout entirely in PHP, so I got the navigation too work properly, but I was wondering if there was a way for it not too say
Code: [ Select ]
id=?blah

Is there a way for it too say
Code: [ Select ]
ratz=?blah

Below is my original code.
Code: [ Select ]
<?php if($id == ""){include "news.php";} else {include "content/$id.txt";} ?>



Thanks in advance. [/code]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

PHP Code: [ Select ]
<?php if($ratz == ""){include "news.php";} else {include "content/$ratz.txt";} ?>


^^
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

lol, works, ty. ^.^
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

oooooooooookay then. check out php.net and have a look at the valid variable names :shock:

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 63 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.