Jump to content

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


techiefreak05

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**
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.