Jump to content

Simple blog on my website


lambik

Recommended Posts

Hello! I want to have an easy blog on my website, requiring name and email. I don't know if this is the right section to post but I think it is made in PHP. I have my whole page design and text created, I just need to get the 'Submit' button working and because I haven't learnt PHP so far, I am posting here for a help. Thanks for any advices. :)

Link to comment
Share on other sites

are you saying you would like to create a page where you (or a user?) can enter a blog post, which would get saved to a database, and then have another page retrieving those blog posts and then outputting them onto a page?Well, you justa) a database and a table to store the* name* email address* blog postb ) a form to submit the data to the database matched to those fieldsc) a page looking in the database getting the records out the table and then displaying the data on a pageOnce you make a, you can make b and test to see if it works. Once you have a -> b, you can make c. Let us know which of these steps you have done, or are needing help with doing (if the outlined above indeed matches your situation)

Link to comment
Share on other sites

Yes, on that page there are these forms: Name (required), E-mail (required), Subject (not required), Message (of course..) and a button Submit. Simple blog. The page is created in html and with css styles because as I said above I dont know PHP language, so I am wondering I will need your help in all 3 steps a,b,c. Is there any need to remake my website to php or not? Thanks a lot. :)

Link to comment
Share on other sites

There is no way to save data through a form without involving a server-side environment. People on the board are very experienced with PHP and MySql. You probably have these available.You may not realize it yet, but the server side of this thing will be pretty intensive. An out-of-the-box solution like WordPress has a steep learning curve, but maybe not as steep as learning PHP and MySql from the ground up. OTOH, if you already have experience with programming, especially if it's a C-type language (like JavaScript or C++), you can pick up PHP quickly.

Link to comment
Share on other sites

yes and no. In order to get information from a database using PHP, you need to either have javascript make an AJAX request to a PHP page that returns the information to the client (web browser) which then renders it all out... ORmake the blog page a PHP page and then just have it get all the blog information from the database and echo it out in a loop later on in the page where you need.I would go for option 2 because all the database calls and page constructing work is done on the server side, which means you don't have to force the browser to do it.If you haven't yet, I would read the PHP tutorials. It will cover the basics of the language including how to submit a form to a PHP script, and eventually how you can use that to store information in a database. The tutorials will also cover how to get that information out and loop over it so you can display it on your page.If you don't already have a web server running locally (on your own computer) you want to consider downloading a package that will allow you to run PHP code locally as well as manage the database. The most popular package is an A(pache)M(ySQL)P(HP) stack for Windows (WAMP) or Mac (MAMP).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...