Go to Post I want to wish everyone a Happy Ship Day. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 26-01-2005, 13:54
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: PHP Coding HELP!!!

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
__________________
- from B B frank


Last edited by AIBob : 26-01-2005 at 14:02. Reason: missed something in my code..
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speaking of PHP 5... Ryan M. IT / Communications 3 01-08-2004 16:46
openFIRST PHP 5 Compatibility Timothy D. Ginn FIRST-related Organizations 0 30-07-2004 13:45
PHP and Wiki Error Venkatesh Website Design/Showcase 2 24-07-2004 15:51
Coding / Style Standards for sharing C code Joe Johnson Programming 33 01-05-2004 15:15
What's better, PERL/cgi or PHP/my_sql? mikefrei Programming 10 27-05-2002 22:50


All times are GMT -5. The time now is 00:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi