Quote:
|
Originally Posted by AIBob
Try this:
profile.php
PHP Code:
<?php
$name=strtolower($_GET["name"]);
$fname="profiles.txt";
if(($fp=fopen($fname,"r")))
{
$lines=split("
",fread($fp,filesize($fname)));
$done=0;
foreach($lines as $line)
{
if(!$done)
{
$prof=split("///",$line);
if(strtolower($prof[0])==$name)
{
echo $prof[1];
$done=1;
}
}
}
if(!$done) echo "User profile not found";
fclose($fp);
}
else
{
echo "There was an error in opening the profiles file";
}
?>
profiles.txt:
Code:
bob///this is the first line of the profile<br>this is the second.<br>etc...
frank///this is the first line of the profile<br>this is the second.<br>etc...
then just go to:
profile.php?name=bob
|
This script is just what i'm looking for. I do have one more question though.
Is there a way, that i can in the one line of text that i must contain all the information in, that i can tell it to include a file with the profile. This solution works if all i want to say is conatianed it one line but i need multiple lines and some tables. Take a look at this example:
http://www.delphielite.com/modules/profiles/example.php
i'd like this to be able to be shown on the page.