creating my own blog

This is a discussion on "creating my own blog" within the PHP Forum section. This forum, and the thread "creating my own blog are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 14th, 2007, 17:28
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,281
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
creating my own blog

i am trying to create my own blog, but i am very stuck

what i need to do is to have a text box filled in ( much like the form i am filling to type this message - but i do know how to install tinymce ) , then saved to the database and then put on my webpage when called up, but i also want to limit the amount of blogs on one page so it goes onto another, lets say 5 blogs per page

sorry for putting in such a big request, i know its a bit more than a little question ( creating the database etc ) i could break it up, but it would only be posted at a later date anyway

please help or point me in the right direction, i have searched everywhere to find the answers with no luck

thank you
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote

  #2 (permalink)  
Old Sep 14th, 2007, 17:31
Daniel's Avatar
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 21
Posts: 2,051
Blog Entries: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Daniel
Re: creating my own blog

why not use wordpress?
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
Reply With Quote
  #3 (permalink)  
Old Sep 14th, 2007, 17:44
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

The whole ... limit on how many blogs needs to be display should be done through you query to MySQL ... sort of like

Code: Select all
$select = mysql_query("select * from blogs order by someID desc limit 5");
Reply With Quote
  #4 (permalink)  
Old Sep 14th, 2007, 17:57
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,281
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: creating my own blog

daniel, your missing the point, i want to make my own as a learning curve

thank you kerinne
i still have no idea on - from form to database to web page though
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #5 (permalink)  
Old Sep 14th, 2007, 18:34
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

Well in short (very short) ... from form to db would be something like

PHP: Select all

<html>
<head>.....</head>
<body>

<?
if ($_POST['submit'];) {
  
$blog $_POST['blog'];
  
$title $_POST['title'];

  
$insert mysql_query ("insert into blogs (blog, title) values ('$blog', '$title')");
}
?>


<form action="<? $_SERVER['PHP_SELF'?>" method="post">
Title: <input type="text" name="title">
Blog: <textarea name="blog" cols="4" rows="5"></textarea>
<input type="submit" name="submit" value="submit">
</form>

</body>
</html>
From database to site

PHP: Select all

<html>
<head>.....</head>
<body>

<?
 $select 
mysql_query ("select * from blogs order by blogID desc limit 5");

while (
$row=mysql_fetch_array($select))  {
   echo 
'<h2>'$row['title'].'</h2>'"\n";
   echo 
$blog;
}
?>

</body>
</html>
Something like that
Reply With Quote
  #6 (permalink)  
Old Sep 14th, 2007, 18:36
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 19
Posts: 717
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

Saltedm8 you really need to do some more basic PHP stuff before you try and develop a blog engine.

If you can't pull data from a database then this is going to be way to steep of a learning curve. Start learning the basics first.
Reply With Quote
  #7 (permalink)  
Old Sep 14th, 2007, 18:38
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

Yes ... I agree with Mike tho ... Go get a good php book and start learning it
Reply With Quote
  #8 (permalink)  
Old Sep 14th, 2007, 18:55
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,281
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: creating my own blog

i have, php&mysql for DUMMIES

i have also tryed others, so i thorght the only way to learn would be to throw myself into the deep end, thats how i learn't html, phpbb and css, worked for me then and i am hoping it will work for me now
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #9 (permalink)  
Old Sep 14th, 2007, 18:59
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,281
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: creating my own blog

this is what i have right now,
Code: Select all
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
$db  = 'CREATE DATABASE saltyblog';
$result = mysql_query($db);
mysql_select_db('saltyblog') or die('Cannot select database'); 
  
mysql_close($link);
?>
i now need to create the tables, how ?
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #10 (permalink)  
Old Sep 14th, 2007, 19:01
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

Why don't you just create them manually through phpMyAdmin or something like that?
Reply With Quote
  #11 (permalink)  
Old Sep 14th, 2007, 19:11
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,281
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: creating my own blog

its the learning curve thing again, sorry
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #12 (permalink)  
Old Sep 14th, 2007, 19:19
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 19
Posts: 717
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

exactly at this rate we will be making your blog engine for you by telling you everything you need to know.

Go learn the basics - one of which is creating tables in mySQL - and learn how to code PHp before you jump into creating a complex program like this.
Reply With Quote
  #13 (permalink)  
Old Sep 16th, 2007, 18:41
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,772
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: creating my own blog

Quote:
Originally Posted by saltedm8 View Post
this is what i have right now,
Code: Select all
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
$db  = 'CREATE DATABASE saltyblog';
$result = mysql_query($db);
mysql_select_db('saltyblog') or die('Cannot select database'); 
  
mysql_close($link);
?>
i now need to create the tables, how ?
It's not gunna be a learning curve if just ask us how to do something every time you get stuck
read your book to get the grips or some online tutorials (tizag, w3schools etc.)
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #14 (permalink)  
Old Sep 18th, 2007, 15:40
Junior Member
Join Date: Jul 2007
Location: London
Age: 15
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Re: creating my own blog

theres a "build a blog" tutorial @ http://www.codegrrl.com
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blog unitedcraig Website Planning 5 Feb 20th, 2008 11:48
Creating a CMS and Blog... marSoul Website Planning 12 Jan 3rd, 2008 00:56
Creating a blog? thewebkid Starting Out 16 Dec 20th, 2007 14:57
Blog Rep alexgeek Webforumz Suggestions and Feedback 2 Oct 13th, 2007 19:52
Need suggestions in creating a blog site jram Website Planning 11 Oct 8th, 2007 17:43


All times are GMT. The time now is 07:20.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43