Membuat Forum Sederhana dengan PHP

Dalam tutorial ini buat 5 files
1. create_topic.php
2. add_topic.php
3. main_forum.php
4. view_topic.php
5. add_answer.php

Tahap-tahap :
1. Create table name "forum_question" and "forum_answer" in database "test".
2. Create file create_topic.php.
3. Create file add_topic. php.
4. Create file main_forum.php
5. Create file view_topic.php
6. Create file add_answer.php

(1)Set up database
Table forum_question
CREATE TABLE `forum_question` (
`id` int(4) NOT NULL auto_increment,
`topic` varchar(255) NOT NULL default '',
`detail` longtext NOT NULL,
`name` varchar(65) NOT NULL default '',
`email` varchar(65) NOT NULL default '',
`datetime` varchar(25) NOT NULL default '',
`view` int(4) NOT NULL default '0',
`reply` int(4) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

Table forum_answer
CREATE TABLE `forum_answer` (
`question_id` int(4) NOT NULL default '0',
`a_id` int(4) NOT NULL default '0',
`a_name` varchar(65) NOT NULL default '',
`a_email` varchar(65) NOT NULL default '',
`a_answer` longtext NOT NULL,
`a_datetime` varchar(25) NOT NULL default '',
KEY `a_id` (`a_id`)
) TYPE=MyISAM;


(2)Create file create_topic.php

(3)Create file add_topic.php

(4)Create file main_forum.php

(5)view_topic.php




----------------------------------------------------------
ntar code nya nyusul,,,,,:D
----------------------------------------------------------
(6)add_answer.php

----------------------------------------------------------
ntar code nya nyusul,,,,,:D
----------------------------------------------------------

2 komentar:

  1. mas code program lanjutannya koq gk da?

    BalasHapus
  2. kodingnya 6(add_answernya) mana gan? pliss lanjutin, butuh bgt..

    BalasHapus

Diberdayakan oleh Blogger.