PHP Coding HELP!!!

i’m kind of new to php coding and need some help working on my team’s page.
I’d like to know some websites where i can find coding help. I’m also looking for someone that I could contact to ask specific questions. What i need help in specifically is, I’m working on profiles and i’d like to just create a template profile page, and then instead of using that page to make the profiles just include the profiles for each person from a text file. This way i only have one page that through the links will turn into many pages. I’m not sure if i’m helping describe my problem or just confusiong people. If anyone can help it will be appreciated.

http://www.php.net has everything on php in there… just search their documentation and function library on their website… Or if you need a script that is not on there:
http://www.programmersheaven.com/
http://www.sourceforge.net/
http://www.pscode.com/
just search through their code there.

I recognize that i wasn’t really clear on what i want to do so here it is. I’d like to use one page and then be able to include a specific include file through the link like this:
(http://delphielite.com/profiles.php?show=fbosak)
this way all i need is to create one completely formated page and then have it include a text file for each team member that has all the profile information.
I hope that this is possible

see if this helps :

<?php



 $fullname = $_GET'name']; 
  
   		
		



    $query=mysql_query("SELECT * FROM $table where name='$fullname'") or die(mysql_error());

    
	
    while($row = mysql_fetch_array($query)) {
     $j = mysql_num_fields($query);
        for($i=0;$i<$j;$i++) {
            $k = mysql_field_name($query,$i);
            $$k = $row$k];
        }
	
    $entry=stripslashes($entry);



Echo" entry";


	
?>

to see somthing you just type : index.php?name=FRANK

Be careful that you don’t allow people to show any file on your system. Be sure to restrict it to a particular secure directory. I’ve heard of horror stories where the mechanism to include files allowed people to view password files and other system files.

Where would i specify what to direct frank to?? Is this in a my-sql database??
If so is there a way to do it in another form such as a text document or web site.

that’s right … this is for my-sql databases …
the other ones … i’m not sure so i won’t say anything …

Try this:
profile.php


<?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:


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.

so basically you want to be able to have seperate files for different people?

make a directory on your server as a subdirectory of whereever your profile.php is. call it profiles. chmod it to read/write for the user (i dont know the code)

change the example code to somethign like this:

the code says the file is “profiles.txt”
make it

$filename = "profiles/" . $name . ".txt";

there are two ways to make your file. you can make them html, in which case you can just read in the whole file and print it out (get rid of the split by line statement)

the second way is to keep the split statement and have the file be like a flat database so you would have one line for name, grade, filepath to picture, etc.

then, just read it in with the example code you have, split it in to an array and print it out.

any questions, cdawzrd at gmail {do.t} com