piątek, 10 czerwca 2011

System komentarzy JS i Ajax

//Posts Table

 CREATE TABLE posts
 (
post_id INT PRIMARY KEY AUTO_INCREMENT,
post_title VARCHAR(200),
post_dis TEXT
 );

 //Comments Table
 CREATE TABLE comments
 (
com_id INT PRIMARY KEY AUTO_INCREMENT,
com_name VARCHAR(100),
com_email VARCHAR(100),
com_dis TEXT,
post_id_fk INT,
FOREIGN KEY(post_id_fk) REFERENCES posts(post_id)
 );



javascript code.
Contains javascript.


comment.php
 Contains HTML code here class timeline li{display:none}
    //Displaying existing or old comments




Name
Email



commentajax.php
Contains PHP and HTML code.
 







  • Brak komentarzy:

    Prześlij komentarz