How to create a simple forum website with php
CLICK to view demo hereHi everyone, in this tutorial I will show how to create a simple forum website. I assume you have some background knowledge of php & mysql. I also assume you have signed up to some webhosting company which supports php/mysql (you can also find one for free). If you don’t this tutorial is not for you.
- Download here the file simple_forum_source.rar and extract it to get the files:- add_answer.php, add_topic.php, create_topic.php, main_forum.php, view_topic.php and table_creator.php. 6 php files. For now just extract and put them in some folder in your harddisk.
- Go to your hosting account, create a database and name it “test”. In this step I need you to write down:-host name, mysql user name, mysql password and database name(“test” in this case) . must remember!
- Now you’ve created your database “test”, it’s time to create two tables in it. “forum_question” and “forum_answer”. To do that :-
- • Open the temporary file table_creator.php with notepad and replace -host name, mysql user name, mysql password and database name, with your own. Look below
$host="***********"; // Host name $username="*****@*****.com"; // your mysql username $password="***********"; //your mysql password $db_name="test@*****.com"; // Database name its “test” for this example. // Make a MySQL Connection mysql_conn…
- • upload the temporary file table_creator.php in your ftp and run it. Ie.www. **********.com/ table_creator.php and you must see the display table forum_question created & table forum_answer created. if you do you can delete the temporary file ” table_creator.php” and move on to the next step.
- Upload the remaining five files. Wait!!! Before you do open up each file and replace hostname, username etc…like we did for the file ‘table creator.php’.
- Go to your site www.**********.com/main_forum.php. Congratulations you have created your forum site.
No comments:
Post a Comment