I'm working on a very simple client information, will have phone number, mailing address and that's pretty much it.... just trying to see if this is the way to do it.
The actual page code works fine, I'm using this code to pull a file based on index.php?id=clientname and that would pull clientname.php file from a /data/ directory
<?php
$id = $_GET['id'];
$ext = ".php";
$filename = "data/".$id.$ext;
if (file_exists($filename))
{
include($filename);
} else {
include("incl/error.php");
}
?>
Now, with the client data file I'm using, I'd like to pull the data with echo but it doesn't seem to be working... Here's a sample client data file:
<?php
$clientname = "JOE SMITH";
$address = "123 ANYWHERE";
$city = "TORONTO";
$prov = "ON";
?>
Any idea why it's not pulling the data with echo get?