Im working on a very simple client information, will have phone number, mailing address and thats pretty much it.... just trying to see if this is the way to do it.
The actual page code works fine, Im 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 Code:
<?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 Im using, Id like to pull the data with echo but it doesnt seem to be working... Heres a sample client data file:
PHP Code:
<?php
$clientname = JOE SMITH;
$address = 123 ANYWHERE;
$city = TORONTO;
$prov = ON;
?>
Any idea why its not pulling the data with echo get?
Im working on a very simple client information, will have phone number, mailing address and thats pretty much it.... just trying to see if this is the way to do it.
The actual page code works fine, Im 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 Code:
<?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 Im using, Id like to pull the data with echo but it doesnt seem to be working... Heres a sample client data file:
PHP Code:
<?php
$clientname = JOE SMITH;
$address = 123 ANYWHERE;
$city = TORONTO;
$prov = ON;
?>
Any idea why its not pulling the data with echo get?
|
|
Search Webmaster Help and Solution
Echo Get from file?Related ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
