Jump to content

Archived

This topic is now archived and is closed to further replies.

techiefreak05

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

Recommended Posts

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 ..

[code]
<?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);
?>
[/code]

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**

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.