Jump to content


Photo

making a blog system .. how to show users posts??


  • Please log in to reply
1 reply to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 28 August 2006 - 08:41 AM

i have a blog system, well i am seeing how hard it is to create one ... and i want to write a code to the file.. like an html layout.. and then echo the users blog posts... heres what i have ..

<?php
mkdir("blogs/" .$_SESSION[reguname]. "", 0700);

$ourFileName2 = "blogs/" .$_SESSION[reguname]. "/index.php";
$html2 = file_get_contents("");
$file2 = fopen($ourFileName2, "w+");
fwrite($file2, $html2);
fclose($file2);
?>

that creates a directory for the users in the "blogs" folder.. and then it creates an index.php .. it has to be .php so i can echo the users post via "mysql_query" ..  but where it says "file_get_contents", would i use "file_put_contents" and in the quotes, put the code i want the page to have??

any ideas on creating the system?? am i on the right track??

**note: everything has a 2 after it, becuase i use the same thing..(with minor tweaks) to create a profile page for each user**
Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 28 August 2006 - 09:03 AM

anybody ?? or no ..  :-\
Link shortener with advanced, detailed statistics:

http://tyny.us/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users