<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2147536258455714585</atom:id><lastBuildDate>Thu, 29 Aug 2024 11:57:23 +0000</lastBuildDate><title>Php best tutorials</title><description>learn php, jquery and mysql.</description><link>http://phpcoderboard.blogspot.com/</link><managingEditor>noreply@blogger.com (ebraam)</managingEditor><generator>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>learn php, jquery and mysql.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-4558762756055867483</guid><pubDate>Sun, 24 Jul 2011 18:26:00 +0000</pubDate><atom:updated>2011-07-24T11:26:13.177-07:00</atom:updated><title>ADD REPLY FUNCTIONALITY TO OUR COMMENT SYSTEM part2</title><description>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;this page post.php&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;lt;?php include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    if ($_POST['wall'] == "post"){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   $name = $_POST['name1'];//name1 is parameter from the jquery function&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    $comment = $_POST['comment1'];//comment1 is parameter from the jquery function &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    if ($comment=="" || $name==""){exit();}// if no name or comment exit the script&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    else{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    //insert the name and comment into database&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   $sql = mysql_query("INSERT INTO comment (name,comment) VALUES('$name','$comment')")&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;      or die (mysql_error());&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   &lt;span class="Apple-style-span" style="background-color: #f4cccc;"&gt;$id = mysql_insert_id();//the auto incremented id of the commet.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #f4cccc;"&gt;it important to this line &lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   // the inserted comment will renderd by the "$("#result").prepend(data).show();" from jquery&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  echo 'name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   &lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;&amp;lt;div id="'.$id.'" class="reply"&amp;gt;&amp;lt;span&amp;gt;reply&amp;lt;/span&amp;gt;&amp;lt;hr&amp;gt;name&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;       &amp;lt;input type="text" id="repname'.$id.'" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;       &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    comment&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;       &amp;lt;textarea id="repcomment'.$id.'" cols="30" rows="2"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    &amp;lt;input type="submit" name="button" id="button" value="Submit"&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;onclick="return false" onmousedown="javascript:reply('.$id.');"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;&amp;lt;br /&amp;gt;' . $r . '&amp;lt;/div&amp;gt;&lt;/span&gt;      &amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;      } }   &lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;else if ($_POST['wall'] == "reply"){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $repto = $_POST['repto1'];//repto1 is parameter from the jquery function &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $repname = $_POST['repname1'];//repname1 is parameter from the jquery function &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $repcomment = $_POST['repcomment1'];//repcomment1 is parameter from the jquery function &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   if ($repcomment=="" || $repname==""){exit();}// if no $repname or $repcomment exit the script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    else{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    //insert the values above into database&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $sql = mysql_query("INSERT INTO reply (repto,repname,repcom) VALUES($repto,'$repname','$repcomment')")&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;      or die (mysql_error()); &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   // the inserted reply will renderd by the "$("#"+ comid).append(data);" from jquery&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  echo 'name : '.$repname.'&amp;lt;br /&amp;gt;comment : '.$repcomment.'&amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;      }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt; }&lt;/span&gt;  ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</description><link>http://phpcoderboard.blogspot.com/2011/07/add-reply-functionality-to-our-comment_24.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-5939066713450754517</guid><pubDate>Sun, 24 Jul 2011 18:25:00 +0000</pubDate><atom:updated>2011-07-24T11:25:48.195-07:00</atom:updated><title>ADD REPLY FUNCTIONALITY TO OUR COMMENT SYSTEM part1</title><description>&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;continuing from &lt;/span&gt;&lt;a href="http://phpcoderboard.blogspot.com/2011/06/learn-how-to-create-comment-system-with.html"&gt;http://phpcoderboard.blogspot.com/2011/06/learn-how-to-create-comment-system-with.html&lt;/a&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;first create a table and call it "reply" with 4 fields rid, &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;repto,&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;repname, repcom.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;this page index.php&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; //////render data that is already stored in the data base&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  $sql_comments = mysql_query("SELECT * FROM comment ORDER BY id DESC");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; while($row = mysql_fetch_array($sql_comments)){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     $id = $row["id"];&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     $name = $row["name"];&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     $comment = $row["comment"];  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;$sql_hreply = mysql_query("SELECT * FROM reply WHERE repto !='$id'" );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;     while($row = mysql_fetch_array($sql_hreply)){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  $r = "";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;      } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  $sql_reply = mysql_query("SELECT * FROM reply WHERE repto='$id'" );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  while($row = mysql_fetch_array($sql_reply)){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  $replycom = $row["repcom"];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  $replyname = $row["repname"];&lt;/span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  &lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;$r .= 'name : '.$replyname.'&amp;lt;br /&amp;gt;comment : '.$replycom.'&amp;lt;hr&amp;gt;' ;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   }       &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;$commentlist .= 'name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;br /&amp;gt;  &lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    &amp;lt;div id="'.$id.'" class="reply"&amp;gt;&amp;lt;span&amp;gt;reply&amp;lt;/span&amp;gt;&amp;lt;hr&amp;gt;name&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;     &amp;lt;input type="text" id="repname'.$id.'" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;       &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    comment&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;       &amp;lt;textarea id="repcomment'.$id.'" cols="30" rows="2"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;    &amp;lt;input type="submit" name="button" id="button" value="Submit"&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;onclick="return false" onmousedown="javascript:reply('.$id.');"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;&amp;lt;br /&amp;gt;' . $r . '&amp;lt;/div&amp;gt;&lt;/span&gt;      &amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; //////////////the highlight is new code added to old script&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; &amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; &amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; $(document).ready(function(){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  $('#loading').hide();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  $('#notice').hide();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; });  function wall(){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; $('#loading').show();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   var name = $('#name').val();///#name is the input id and will be equal the variable "name"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   var comment = $('#comment').val();/////#comment is textarea id and will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   var URL = "post.php"; /////post.php will be equal the variable "URL"      $.post(URL,{wall:"post",name1:name,comment1:comment},function(data){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;//parameter wall will be equal "post", name1 will be equal to the var "name" and comment1 will be equal to the var "comment"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   $("#result").prepend(data);//.show() the result will be placed above the the #result div&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   $('#loading').hide();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     var name = $('#name').val("");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   var comment = $('#comment').val("");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  });&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  }    &lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;function reply(comid){   &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;var repname = $('#repname'+comid).val();///#repname is the input id and will be equal the variable "name"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   var repcomment = $('#repcomment'+comid).val();/////#repcomment is textarea id and will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   alert(comid + "" + repname + " " + repcomment)   var URL = "post.php"; /////post.php will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $.post(URL,{wall:"reply",repname1:repname,repcomment1:repcomment,repto1:comid},function(data){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;//parameter wall will be equal "post", repname1 will be equal to the var "repname" and repcomment1 will be equal to the var "repcomment"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   $("#"+ comid).append(data);//render result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   //$('#loading').hide();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   var repname = $('#repname'+comid).val("");&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;   var repcomment = $('#repcomment'+comid).val("");&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="background-color: #cfe2f3;"&gt;  }&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; &amp;lt;style type="text/css"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; &amp;lt;!--&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; #notice {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  font-family: Arial, Helvetica, sans-serif;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  font-size: 12px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  font-weight: normal;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  color: #660000;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  background-color: #FFF2F2;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  padding: 5px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  border: 1px solid #FF6666;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  text-align: center;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; .reply {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  margin-left: 50px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; span{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  font-size: 14px;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  font-weight: bold;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;  color: #333333;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt; &amp;lt;/style&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;lt;table width="500" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     &amp;lt;td&amp;gt;&amp;lt;form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;     name&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;input type="text" id="name" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;    comment&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;textarea id="comment" cols="45" rows="5"&amp;gt;&amp;lt;/textarea&amp;gt;       &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;input type="submit" name="button" id="button" value="Submit" onclick="return false" onmousedown="javascript:wall();"/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;&amp;lt;img src="loading.gif" alt="" width="15" height="15" id="loading" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;br /&amp;gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;       &amp;lt;div id="notice"&amp;gt;Your comment will be reviewed by the webmaster before publishing&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;        &amp;lt;div id="result"&amp;gt;&amp;lt;?php print"$commentlist";?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 18px; white-space: pre;"&gt;   &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: monospace; font-size: 15px; line-height: 18px; white-space: pre;"&gt;&lt;br /&gt;
&lt;/span&gt;</description><link>http://phpcoderboard.blogspot.com/2011/07/add-reply-functionality-to-our-comment.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-5561196303847649623</guid><pubDate>Fri, 24 Jun 2011 19:43:00 +0000</pubDate><atom:updated>2011-06-26T00:19:37.233-07:00</atom:updated><title>IMPORTANT NOTICE</title><description>Hello to everyone, To those who have been following my tutorials. I have create a fan page on facebook so you guys can give a feed backs on my tutorials and say what you like and what you dont like and what kind of tutorials you want more and the kind stuff you want to learn more.&lt;br /&gt;
Go to&amp;nbsp;&lt;a href="http://www.facebook.com/pages/Phpcoderboard/209608885746800?sk=wall"&gt;&lt;b&gt;http://www.facebook.com/pages/Phpcoderboard/209608885746800?sk=wall&lt;/b&gt;&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.facebook.com/pages/Phpcoderboard/209608885746800?sk=wall"&gt;&lt;b&gt;join&lt;/b&gt;.&lt;/a&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/important-notice.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-1532651069417677863</guid><pubDate>Thu, 23 Jun 2011 22:01:00 +0000</pubDate><atom:updated>2011-07-03T04:46:10.563-07:00</atom:updated><title>TUTORIAL COMMENT SYSTEM WITH ALLOW AND DENY PUBLISHING FUNCTIONALITY</title><description>&lt;pre&gt;&lt;object style="height: 390px; width: 540px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/AOhC29_OGtk?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/AOhC29_OGtk?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="540" height="390"&gt;&lt;/object&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;first create table and call it "comment" with 4 fields id, name, comment and status&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;mysql.php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;&amp;lt;?php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_connect("localhost","root","") or die ("could not connect to mysql");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_select_db("name of your database") or die ("no database");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;?&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;///////////page end here&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&lt;b&gt;index.php&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;//////render data that is already stored in the data base&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;$sql_comments = mysql_query("SELECT * FROM comment ORDER BY id DESC");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;while($row = mysql_fetch_array($sql_comments)){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$comment = $row["comment"];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-tab-span" style="line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$commentlist .= 'name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;//////////////&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;$(document).ready(function(){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;$('#loading').hide();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;function wall(){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;$('#loading').show();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var name = $('#name').val();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;///#name is the input id from the form and will be equal the variable "name"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var comment = $('#comment').val();&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;/////#comment is textarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;from the form&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;and will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var URL = "post.php";&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;/////post.php will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $.post(URL,{wall:"post",name1:name,comment1:comment},function(data){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//parameter wall will be equal "post", name1 will be equal to the var "name" and comment1 will be equal to the var "comment"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;if($('#name').val() != "" &amp;amp;&amp;amp; $('#comment').val() != ""){&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//if there is a value for name and comment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; $("#notice").show();&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//show the div with id = notice&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; $("#notice").fadeOut(4000);&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//fade out the div with id = notice within 4 seconds&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; $('#loading').hide();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; var name = $('#name').val("");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; var comment = $('#comment').val("");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;table width="500" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;div id='form'&amp;gt;&amp;lt;form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; name&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="text" id="name" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;comment&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;textarea id="comment" cols="45" rows="5"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="submit" name="button" id="button" value="Submit" onclick="return false" onmousedown="javascript:wall();"/&amp;gt;&amp;lt;img src="loading.gif" alt="" width="15" height="15" id="loading" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id="result"&amp;gt;&amp;lt;?php print"$commentlist";?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;post.php&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;?php&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; if ($_POST['wall'] == "post"){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $name = $_POST['name1'];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//name1 is parameter from the jquery function&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $comment = $_POST['comment1'];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//comment1 is parameter from the jquery function&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; &amp;nbsp;if ($comment=="" || $name==""){exit();}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;// if no name or comment exit the script&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;else{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//insert the name and comment into database as pending&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$sql = mysql_query("INSERT INTO comment (name,comment)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;VALUES('$name','$comment','0')")&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;or die (mysql_error());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;else if ($_POST['wall'] == "allow"){&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;$comid = $_POST['cid'];&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138; font-family: inherit; line-height: 18px;"&gt;//set comment from pendded to published&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;mysql_query("UPDATE comment SET status='1' WHERE id='$comid'") or die(mysql_error());&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;echo"comment has been published.";&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;else if ($_POST['wall'] == "deny"){&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;$comid = $_POST['cid'];&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138; font-family: inherit; line-height: 18px;"&gt;//delete comment if dennied&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;mysql_query("DELETE FROM comment WHERE id='$comid'") or die(mysql_error());&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;echo"comment has been deleted.";&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;b&gt;admin.php&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: inherit; line-height: 18px;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;//////render data that is already stored in the data base&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;$sql_comments = mysql_query("SELECT * FROM comment WHERE status='0' ORDER BY id DESC");&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;while($row = mysql_fetch_array($sql_comments)){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; $id = $row["id"];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$comment = $row["comment"];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-tab-span" style="font-family: inherit; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="color: #222222; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;$commentlist .= '&amp;lt;div id="&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;'.$id.'&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;"&amp;gt;&amp;lt;table width="700" border="0" cellspacing="0" cellpadding="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//we are going to the comment id as div id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;td width="536" align="left" valign="top"&amp;gt;name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;td width="150" align="left" valign="top"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="color: #222222; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;lt;a id="comment'.$id.'" href="#" onclick="return false" onmousedown="javascript:allow(&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;'.$id.'&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;);"&amp;gt;allow&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="color: #222222; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;lt;a id="comment'.$id.'" href="#" onclick="return false" onmousedown="javascript:deny(&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;'.$id.'&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;);"&amp;gt;deny&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;//////////////&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; function allow(id){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//if admin want to publish&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; var URL = 'post.php';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; $.post(URL,{wall:"allow",cid:id},function(data){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; $('#'+id).html(data);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; function deny(id){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//if admin want to delete&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; var URL='post.php';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; $.post(URL,{wall:"deny",cid:id},function(data){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; $('#'+id).html(data);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;style type="text/css"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;!--&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;.style {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 16px;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-weight: bold;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;color: #333333;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;span class="style"&amp;gt;Pending comments&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;hr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;?php print"$commentlist"; ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: sans-serif;"&gt;&lt;span class="Apple-style-span"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="color: #222222; font-family: sans-serif; font-weight: bold; line-height: 18px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/tutorial-comment-system-with-allow-and.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-7363362300854414700</guid><pubDate>Mon, 20 Jun 2011 20:44:00 +0000</pubDate><atom:updated>2011-07-01T17:04:13.824-07:00</atom:updated><title>TUTORIAL:CREATE A  LOGIN FORM VALIDATED WITH PHP AND JQUERY</title><description>&lt;pre&gt;&lt;b&gt;CREATE &amp;nbsp;TABLE CALLED members WITH 5 FIELDS id firstname lastname email password&lt;/b&gt;
&lt;b&gt;INDEX.PHP&lt;/b&gt;

&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;

&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;function login()&lt;/span&gt;&lt;/span&gt;{
&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: #cccccc;"&gt; var email &lt;/span&gt;= &lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;$('#email').val();&lt;/b&gt;&lt;/span&gt;//$('#email').val() is the value of the input field with id = email so we are goning to say var email will equal the value of that input
&amp;nbsp; &lt;span class="Apple-style-span" style="background-color: #a2c4c9;"&gt;var pass&lt;/span&gt; = &lt;b&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;$('#pass').val();&lt;/span&gt;&lt;/b&gt;//$('#pass').val() is the value of the input field with id = pass&amp;nbsp;so we are goning to say var pass will equal the value of that input
&amp;nbsp; &lt;span class="Apple-style-span" style="background-color: #93c47d;"&gt;var URL&lt;/span&gt; = "parse.php";

&amp;nbsp; $.post(&lt;span class="Apple-style-span" style="background-color: #93c47d;"&gt;URL&lt;/span&gt;,{&lt;span class="Apple-style-span" style="background-color: #e69138;"&gt;action:"login"&lt;/span&gt;,logname:&lt;span class="Apple-style-span" style="background-color: #cccccc;"&gt;email&lt;/span&gt;,logpass:&lt;span class="Apple-style-span" style="background-color: #a2c4c9;"&gt;pass&lt;/span&gt;},function(data){
&amp;nbsp; &lt;span class="Apple-style-span" style="color: #38761d;"&gt;&lt;b&gt;$("#result").html(data).show();&lt;/b&gt;&lt;/span&gt;
&amp;nbsp; });
&amp;nbsp;}

&amp;lt;/script&amp;gt;
&amp;lt;style type="text/css"&amp;gt;
&amp;lt;!--
.font {
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 12px;
}
.result{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 12px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-weight: bold;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;color: #CC0000;
}
.txtstyle{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;height: 25px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;width: 200px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-width: 2px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-color: #DDDDDD;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-color: #DDDDDD;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-color: #DDDDDD;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-color: #DDDDDD;
}
.loginbutton {
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;clear: left;
}
--&amp;gt;
&amp;lt;/style&amp;gt;

&amp;lt;table width="458" border="0" align="center" cellpadding="5" cellspacing="0"&amp;gt;
&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td width="261" height="117" align="left" valign="bottom"&amp;gt;log in &amp;lt;/td&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td width="291" align="left" valign="bottom"&amp;gt;sgin up&amp;lt;/td&amp;gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td height="155" align="left" valign="top"&amp;gt;&amp;lt;span class="font"&amp;gt;Email&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="color: red;"&gt;&amp;lt;input class="txtstyle" type="text" id="email" /&amp;gt;&lt;/span&gt;//CREATE INPUT WITH TYPE=TEXT AND ID=EMAIL
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;span class="font"&amp;gt;Password&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="color: lime;"&gt;&amp;lt;input class="txtstyle" type="password" id="pass" /&amp;gt;&lt;/span&gt;//CREATE INPUT WITH TYPE=PASSWORD AND ID=PASS
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="button" class="loginbutton" id="login" onclick="return false" onmousedown="&lt;span class="Apple-style-span" style="color: purple;"&gt;javascript:login()&lt;/span&gt;;" value="login"/&amp;gt;//CREATE INPUT WITH TYPE=BUTTON AND ONECE THE BUTTON IS CLICKED &lt;span class="Apple-style-span" style="color: #990000;"&gt;JAVASCRIPT:LOGIN()&lt;/span&gt;&amp;nbsp;WILL RUN
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="color: #38761d;"&gt;&amp;lt;div id="result" class="result"&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;lt;/td&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td width="291" align="left" valign="top"&amp;gt;SIGN UP FORM WILL BE HERE&amp;lt;/td&amp;gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;div&gt;&lt;b&gt;PARSE.PHP&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt;include_once "mysql.php";&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;if(&lt;span class="Apple-style-span" style="background-color: #e69138;"&gt;$_POST['action']=="login"&lt;/span&gt;){&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;$email1 = $_POST['logname'];//$email1 =&amp;nbsp;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;$('#email').val();&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;$pass = $_POST['logpass'];//$pass =&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;$('#pass').val();&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;if($email1 ==""){echo'Please enter your email'; }//if&amp;nbsp;$email1 has no value show&amp;nbsp;Please enter your email&lt;/div&gt;&lt;div&gt;else{//if&amp;nbsp;$email1 has value&lt;/div&gt;&lt;div&gt;$sql = mysql_query("SELECT * FROM members WHERE email='$email1'");&lt;/div&gt;&lt;div&gt;$email_check = mysql_num_rows($sql); //check if&amp;nbsp;$email1 value exist in the table&lt;/div&gt;&lt;div&gt;if($email_check == 1){//if exist proceed&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;while($row = mysql_fetch_array($sql)){&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #0c343d;"&gt;$password&lt;/span&gt; = $row["password"];//get the password&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;if($pass == ""){echo 'Please enter your password';}//if&amp;nbsp;$pass has no value show&amp;nbsp;Please enter your password&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;else if(&lt;span class="Apple-style-span" style="color: #7f6000;"&gt;md5($pass)&lt;/span&gt; != &lt;span class="Apple-style-span" style="color: #0c343d;"&gt;$password&lt;/span&gt;){echo 'Your password is incorrect';}//if &lt;span class="Apple-style-span" style="color: #7f6000;"&gt;encrypted $pass&lt;/span&gt; value not equal to
&lt;span class="Apple-style-span" style="color: #0c343d;"&gt;$password&lt;/span&gt; show&amp;nbsp;Your password is incorrect

&lt;/div&gt;&lt;div&gt;else{//if&amp;nbsp;&lt;span class="Apple-style-span" style="color: #7f6000;"&gt;encrypted $pass&lt;/span&gt;&amp;nbsp;value equal to&amp;nbsp;&lt;span class="Apple-style-span" style="color: #0c343d;"&gt;$password&lt;/span&gt;&amp;nbsp;the proceed&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;//create sessions for the table values&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;$_SESSION['id'];&amp;nbsp;&lt;/div&gt;&lt;div&gt;$_SESSION['firstname'];&amp;nbsp;&lt;/div&gt;&lt;div&gt;$_SESSION['lastname']; &amp;nbsp;&lt;/div&gt;&lt;div&gt;$_SESSION['email'];&amp;nbsp;&lt;/div&gt;&lt;div&gt;echo'&amp;lt;script&amp;gt;window.location = "profile.php"&amp;lt;/script&amp;gt;';&lt;/div&gt;&lt;div&gt;exit();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;else if($email_check != 1){//if doesnt exist show&amp;nbsp;Email is incorrect&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;echo 'Email is incorrect';&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;else{echo'&amp;lt;script&amp;gt;window.location = "index.php"&amp;lt;/script&amp;gt;';}&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;PROFILE.PHP&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt;session_start(); // Must start session first&amp;nbsp;&lt;/div&gt;&lt;div&gt;include_once "mysql.php";&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;if (isset($_SESSION['id'])) { &amp;nbsp;&lt;/div&gt;&lt;div&gt;$id = $_SESSION['id'];&amp;nbsp;&lt;/div&gt;&lt;div&gt;echo'you are logged in';&lt;/div&gt;&lt;div&gt;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;else {echo 'you are not logged in';}&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-weight: bold;"&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/create-video-chat-website-with-php.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-3219521053659501418</guid><pubDate>Sat, 18 Jun 2011 16:26:00 +0000</pubDate><atom:updated>2011-07-01T17:03:19.275-07:00</atom:updated><title>HOW TO CREATE A PAGE MARKUP WITH CSS3 AND JQUERY</title><description>&lt;pre&gt;&amp;lt;style type="text/css"&amp;gt;
&amp;lt;!--
body{
}
.menubar{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;height: 25px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;width: 450px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-left-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-right-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;background-color: #F9F9F9;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;overflow: visible;
}
.button{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border: 1px solid #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-left-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-right-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;display: inline-block;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 12px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;color: #333333;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;margin-right: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;text-align: center;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;width: 65px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;background-color: #E5E5E5;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;text-decoration: none;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;height: 17px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-top: 6px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-right: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-bottom: 6px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-left: 5px;
}
.selbutton{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-left-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-right-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;display: inline-block;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 12px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;color: #333333;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;margin-right: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;text-align: center;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;width: 65px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;background-color: #FFFFFF;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;text-decoration: none;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;height: 18px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-top: 6px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-right: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-bottom: 6px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-left: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-top-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;overflow: visible;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;visibility: visible;
}

.content{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;height: 27px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;width: 450px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-left-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-right-radius: 10px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;background-color: #FfFfFf;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding: 5px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-width: 1px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-style: solid;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-right-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-bottom-color: #CCCCCC;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;border-left-color: #CCCCCC;
}
--&amp;gt;
&amp;lt;/style&amp;gt;
&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
$(document).ready(function(){
&amp;nbsp;$('#Tab2').css('display', 'none');//hide tab2 div
&amp;nbsp;$('#Tab3').css('display', 'none');//hide tab3 div
});

function tab1(){//once tab1 clicked on
&amp;nbsp;$('a').removeClass("selbutton");//remove .selbutton class from all linkes
&amp;nbsp;$('a').addClass("button");//add .button class to all linkes
&amp;nbsp;$('#b1').removeClass("button");//remove .button
&amp;nbsp;$('#b1').addClass("selbutton");//add .selbutton (this button will selected)
&amp;nbsp;$('#Tab2').css('display', 'none');//hide tab 2
&amp;nbsp;$('#Tab3').css('display', 'none');//hide tab 3
&amp;nbsp;$('#Tab1').css('display', 'inline-block');//show tab 1
&amp;nbsp;}
&amp;nbsp;function tab2(){//once tab2 clicked on
&amp;nbsp;$('a').removeClass("selbutton");//remove .selbutton class from all linkes
&amp;nbsp;$('a').addClass("button");//add .button class to all linkes
&amp;nbsp;$('#b2').removeClass("button");//remove .button
&amp;nbsp;$('#b2').addClass("selbutton");//add .selbutton (this button will selected)
&amp;nbsp;$('#Tab1').css('display', 'none');//hide tab 1
&amp;nbsp;$('#Tab3').css('display', 'none');//hide tab 3
&amp;nbsp;$('#Tab2').css('display', 'inline-block');//show tab 2
&amp;nbsp;}
&amp;nbsp;function tab3(){//once tab3 clicked on
&amp;nbsp;$('a').removeClass("selbutton");//remove .selbutton class from all linkes
&amp;nbsp;$('a').addClass("button");//add .button class to all linkes
&amp;nbsp;$('#b3').removeClass("button");//remove .button
&amp;nbsp;$('#b3').addClass("selbutton");//add .selbutton (this button will selected)
&amp;nbsp;$('#Tab1').css('display', 'none');//hide tab 1
&amp;nbsp;$('#Tab2').css('display', 'none');//hide tab 2
&amp;nbsp;$('#Tab3').css('display', 'inline-block');//show tab 2
&amp;nbsp;}
&amp;lt;/script&amp;gt;

&amp;lt;div class="menubar"&amp;gt;&amp;lt;a id="b1" href="#" class="selbutton" onclick="return false" onmousedown="javascript:tab1();"&amp;gt;Tab1&amp;lt;/a&amp;gt;&amp;lt;a id="b2" href="#" class="button" onclick="return false" onmousedown="javascript:tab2();"&amp;gt;Tab2&amp;lt;/a&amp;gt;&amp;lt;a id="b3" href="#" class="button" onclick="return false" onmousedown="javascript:tab3();"&amp;gt;Tab3&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div class="content"&amp;gt;&amp;lt;div id="Tab1"&amp;gt;tab1 is shown tabs 2 &amp;amp; 3 are hidden&amp;lt;/div&amp;gt;&amp;lt;div id="Tab2"&amp;gt;tab2 is shown tabs 1 &amp;amp; 3 are hidden&amp;lt;/div&amp;gt;&amp;lt;div id="Tab3"&amp;gt;tab3 is shown tabs 2 &amp;amp; 1 are hidden&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/document.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-8136991853097132150</guid><pubDate>Fri, 17 Jun 2011 22:14:00 +0000</pubDate><atom:updated>2011-06-17T15:14:40.705-07:00</atom:updated><title>HOW TO GET FLASH MEDIA SERVER TO WORK WITH YOUR LOCAL SERVER</title><description>I would assume that you have already installed flash media server without apache. So what you would do is go to &amp;nbsp;this folder &amp;nbsp; &lt;span class="Apple-style-span" style="color: #783f04;"&gt;Adobe\Flash Media Server 3\conf\_defaultRoot_&lt;/span&gt; and look for the file called Adaptor.xml on line 42 you would set &lt;span class="Apple-style-span" style="color: #76a5af;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;ctl_channel="127.0.0.1:19350"&lt;/span&gt;&amp;nbsp;and in lines &amp;nbsp;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="color: #0b5394;"&gt;144&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Redirect enable="false" maxbuf="16384"&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;145&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;Host port="80"&amp;gt;:8080&amp;lt;/Host&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;146&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;Host port="443"&amp;gt;:8443&amp;lt;/Host&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;147&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/Redirect&amp;gt;&lt;/span&gt;&lt;br /&gt;
same with lines 182 to 185.&lt;br /&gt;
and then save it.&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;after that you would go to the text file called &lt;span class="Apple-style-span" style="color: #0b5394;"&gt;fms &lt;/span&gt;in the&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="color: #783f04;"&gt;Adobe\Flash Media Server 3\conf\&amp;nbsp;&lt;/span&gt;and set the &amp;nbsp;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;ADAPTOR.HOSTPORT = 127.0.0.1:1935 &lt;/span&gt;and then save the file.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;now with everything done you can enjoy your flash media server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/how-to-get-flash-media-server-to-work.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-2555684768401194176</guid><pubDate>Fri, 17 Jun 2011 15:53:00 +0000</pubDate><atom:updated>2011-06-17T08:53:59.996-07:00</atom:updated><title>my video comment system</title><description>this is demo for my upcoming tutorials&lt;br /&gt;
&lt;object style="height: 390px; width: 570px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6NZ7BJBZj9A?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/6NZ7BJBZj9A?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="570" height="390"&gt;&lt;/object&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/my-video-comment-system.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-5463556016216562795</guid><pubDate>Fri, 17 Jun 2011 01:21:00 +0000</pubDate><atom:updated>2011-07-03T04:47:17.632-07:00</atom:updated><title>LEARN HOW TO CREATE COMMENT SYSTEM WITH PHP AND JQUERY</title><description>&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;first create table and call it "comment" with 3 fields id, name and comment&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;mysql.php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;&amp;lt;?php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_connect("localhost","root","") or die ("could not connect to mysql");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_select_db("name of your database") or die ("no database");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;?&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;///////////page end here&lt;/b&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;index.php&lt;/b&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;//////render data that is already stored in the data base&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp;$sql_comments = mysql_query("SELECT * FROM comment ORDER BY id DESC");&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;while($row = mysql_fetch_array($sql_comments)){&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$comment = $row["comment"];&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-tab-span" style="line-height: 18px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$commentlist .= 'name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;//////////////&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;$(document).ready(function(){&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp;$('#loading').hide();&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;});&lt;/span&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;function wall(){&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;$('#loading').show();&lt;/span&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var name = $('#name').val();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;///#name is the input id from the form and will be equal the variable "name"&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var comment = $('#comment').val();&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;/////#comment is textarea&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;from the form&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;and will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; var URL = "post.php"; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;/////post.php will be equal the variable "comment"&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $.post(URL,{wall:"post",name1:name,comment1:comment},function(data){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//parameter wall will be equal "post", name1 will be equal to the var "name" and comment1 will be equal to the var "comment"&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $("#result").prepend(data).show();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;// the result will be placed above the the #result div&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; $('#loading').hide();&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;table width="500" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;div id='form'&amp;gt;&amp;lt;form&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; name&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="text" id="name" /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;comment&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;textarea id="comment" cols="45" rows="5"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="submit" name="button" id="button" value="Submit" onclick="return false" onmousedown="javascript:wall();"/&amp;gt;&amp;lt;img src="loading.gif" alt="" width="15" height="15" id="loading" /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id="result"&amp;gt;&amp;lt;?php print"$commentlist";?&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;/span&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;post.php&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;lt;?php&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; if ($_POST['wall'] == "post"){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $name = $_POST['name1'];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//name1 is parameter from the jquery function &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; $comment = $_POST['comment1'];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//comment1 is parameter from the jquery function&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; &amp;nbsp;if ($comment=="" || $name==""){exit();}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;// if no name or comment exit the script&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp;else{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//insert the name and comment into database&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$sql = mysql_query("INSERT INTO comment (name,comment)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;VALUES('$name','$comment')")&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;or die (mysql_error()); &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="color: #222222; white-space: pre;"&gt; &lt;/span&gt; &lt;span class="Apple-style-span" style="color: #e69138;"&gt;// the inserted comment will renderd by the "$("#result").prepend(data).show();" from jquery&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;echo 'name : '.$name.'&amp;lt;br /&amp;gt;comment : '.$comment.'&amp;lt;hr&amp;gt;';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #222222; font-weight: bold; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/learn-how-to-create-comment-system-with.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-7724703139760976570</guid><pubDate>Thu, 16 Jun 2011 21:28:00 +0000</pubDate><atom:updated>2011-07-03T04:49:13.458-07:00</atom:updated><title>PAGINATION TUTORIAL USING JQUERY AND PHP</title><description>&lt;pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object style="height: 340px; width: 570px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1H9aN-oKCgY?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/1H9aN-oKCgY?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="570" height="340"&gt;&lt;/object&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;first create table and call it&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;pagination with 3 fields &amp;nbsp;id,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;name and age and enter&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; white-space: nowrap;"&gt;&lt;b&gt;dummy data&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;mysql.php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;&amp;lt;?php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_connect("localhost","root","") or die ("could not connect to mysql");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;@mysql_select_db("name of your database") or die ("no database");&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;?&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;b&gt;///////////page end here&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;index.php&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;?php&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;include_once "mysql.php";//include the mysql connect script&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$pagen=0;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$sql_rec = mysql_query("SELECT * FROM pagination ORDER BY id DESC LIMIT $pagen,4");&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement mean that you chose the first 4 results&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;while($row = mysql_fetch_array($sql_rec)){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement fetch first 4 results&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$id = $row["id"];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$name = $row["name"];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$age = $row["age"];&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$namelist .= 'name : '.$name.' age : '.$age.'&amp;lt;br /&amp;gt;' ;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$sql_list = mysql_query("SELECT * FROM pagination");&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$num_rows = mysql_num_rows($sql_list);&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement to determine number of row we will paginate&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$pnumber = ceil($num_rows/4);&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- we will divide the number of rows by 4 which is the number of post we will render &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;style type="text/css"&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;body {&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;.link {&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;background-color: #FFFFFF;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;font-family: Arial, Helvetica, sans-serif;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;font-size: 12px;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;font-weight: bold;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;color: #003399;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;text-decoration: none;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;padding-right: 2px;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;padding-left: 2px;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;--&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$(document).ready(function(){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;//$('#loading').hide();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will hide loading gif&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;$('.link').first().css('background', 'grey');&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;//&amp;lt;----this will highlight the number 1&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;});&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;function pages(&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;page&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this function will run we clicked on the show more link &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;(&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;page =&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;'.$e.')&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;//$('#loading').show();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this loading gif will appear&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; $('.link').css('background', 'white');&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//&amp;lt;----this will remove&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;the&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;highlight&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #222222;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&amp;nbsp; $("#pages" + page).css('background', 'grey');&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//&amp;lt;----this will&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;highlight number that was clicked&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; var URL = "userslist.php";&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; $.post(URL,{&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #a64d79;"&gt;pages&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;:"&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #45818e;"&gt;paginate&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;",&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: lime;"&gt;pageNumber&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;:&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;page&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;},function(data){&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----will run the userslist.php&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; $("#OldComment").html(data).show();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----replace the old page with the new one&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; $('#loading').hide();&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; });&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;table width="500" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;div id='OldComment'&amp;gt;&amp;lt;?php print"$namelist"; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class="pagination"&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;for($i=0; $i&amp;lt;=($pnumber-1); $i++)&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----we run a for loop that start from 0 to $pnumber&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;{&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;$e= $i*4 ;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will replace $pagen in the userlist.php&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   $d=$i+1;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138; line-height: 18px;"&gt;//&amp;lt;----this will the number the pages&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;echo '&amp;lt;a class="link" id="pages'.$e.'" href="#" onclick="return false" onmousedown="javascript:pages('.$e.');"&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;'.$d.'&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;/a&amp;gt; ';&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----when you click on this link the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #bf9000;"&gt;javascript:pages('.$e.'); will run&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;}&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; &amp;lt;img src="loading.gif" alt="" width="15" height="15" id="loading" /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this loading gif will appear every time&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 18px;"&gt;
&lt;/span&gt;
&lt;/span&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;/////////////////////////////page end here&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;/div&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;userslist.php&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #222222; line-height: 18px;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;lt;?php&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$pagen = $_POST['&lt;span class="Apple-style-span" style="color: lime;"&gt;pageNumber&lt;/span&gt;'];&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----resulted from the jquery we ran in last script&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;include_once "mysql.php";&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;if ($_POST['&lt;span class="Apple-style-span" style="color: #a64d79;"&gt;pages&lt;/span&gt;'] == "&lt;span class="Apple-style-span" style="color: #45818e;"&gt;paginate&lt;/span&gt;"){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$sql_selfnews = mysql_query("SELECT * FROM pagination ORDER BY id DESC LIMIT $pagen,4");&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement will select next 4 results&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;while($row = mysql_fetch_array($sql_selfnews)){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$id = $row["id"];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$age = $row["age"];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="font-family: inherit; white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;$namelist .= 'name : '.$name.' age : '.$age.'&amp;lt;br /&amp;gt;' ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;lt;?php print"$namelist"; ?&amp;gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement will render next 4 results&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/pagination-tutorial-using-jquery-and.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-3041038377298986549</guid><pubDate>Wed, 15 Jun 2011 17:58:00 +0000</pubDate><atom:updated>2011-07-01T16:59:13.608-07:00</atom:updated><title>CHECK IF USER ONLINE OR AWAY SCRIPT</title><description>&lt;pre&gt;&lt;object style="height: 390px; width: 570px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/MhjFEa20RKw?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/MhjFEa20RKw?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="570" height="390"&gt;&lt;/object&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;this script will tell if user is online doing something on your site or if he is away. if user remained inactive for 10 seconds he will labeled away

create table in your data base called &lt;b&gt;members&lt;/b&gt; with 4 fields 1d, email, password and activity. and enter some dummy data

mysql.php

&amp;lt;?php
@mysql_connect("localhost","root","") or die ("could not connect to mysql");
@mysql_select_db("name of your database") or die ("no database");
?&amp;gt;

index.php (will contain the login script)

&amp;lt;?php
if ($_POST['email']) {
//Connect to the database through our include 
include_once "mysql.php";
$email = $_POST['email'];
$password = $_POST['password'];

$sql = mysql_query("SELECT * FROM members WHERE email='$email' AND password='$password'"); 
$login_check = mysql_num_rows($sql);
if($login_check &amp;gt; 0){ 
while($row = mysql_fetch_array($sql)){ 

$id = $row["id"]; 
session_register('id'); 
$_SESSION['id'] = $id;

header ("Location: profile.php?id=$id");
exit();
} // close while
}
}
?&amp;gt;

&amp;lt;style type="text/css"&amp;gt;
&amp;lt;!--
body {
}
--&amp;gt;
&amp;lt;/style&amp;gt;
&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;form action="index.php" method="post" class="body"&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name="email" type="text" class="textfield" id="textfield" value=""/&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name="password" type="password" class="textfield" id="textfield2" value=""/&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="submit" name="button" id="button" value="Sign In" /&amp;gt;
&amp;lt;/form&amp;gt;
////////////////////////

profile.php

&amp;lt;?php

session_start(); &lt;span class="Apple-style-span" style="color: #e69138;"&gt;// Must start session first thing&amp;nbsp;&lt;/span&gt;

if (!isset($_SESSION['id'])) { 
print 'you are not logged in';
exit(); 
} 

include_once "mysql.php";
if (isset($_SESSION['id'])) { 
$id = $_SESSION['id'];
$mid = $_GET['id'];
$time=time();&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//to get the timestamp&lt;/span&gt;
&amp;nbsp;}

mysql_query("UPDATE members SET lastactivity='$time' WHERE id='$id'");&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//every time this page refresh lastactivity will be updated&lt;/span&gt;

$sql = mysql_query("SELECT * FROM members WHERE id='$mid'"); 
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$email = $row["email"];
}
?&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;
&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//load check.php in the &amp;lt;span id="online"&amp;gt;&amp;lt;/span&amp;gt; and refresh every 1 second&lt;/span&gt;
$(document).ready(function(){
&amp;nbsp; &amp;nbsp;$("#online").load('check.php?id=&amp;lt;?php print"$id";?&amp;gt;');
&amp;nbsp; &amp;nbsp;setInterval(function(){
&amp;nbsp; $("#online").load('check.php?id=&amp;lt;?php print"$id";?&amp;gt;');
&amp;nbsp; &amp;nbsp;},1000);//
});
&amp;lt;/script&amp;gt;

this is &amp;lt;b&amp;gt;&amp;lt;?php print"$email";?&amp;gt;&amp;lt;/b&amp;gt; and he is &amp;lt;b&amp;gt;&lt;span class="Apple-style-span" style="color: #134f5c;"&gt;&lt;b&gt;&amp;lt;span id="online"&amp;gt;&amp;lt;/b&amp;gt;&lt;/b&gt;&lt;/span&gt;&amp;lt;/span&amp;gt;
////////////////////////////

check.php

&amp;lt;?php

session_start(); &lt;span class="Apple-style-span" style="color: #e69138;"&gt;// Must start session first thing&amp;nbsp;&lt;/span&gt;

if (!isset($_SESSION['id'])) { 
print 'you are not logged in';
exit(); 
} 

include_once "mysql.php";
if (isset($_SESSION['id'])) { 
$id = $_SESSION['id'];
$mid = $_GET['id'];
$time=time();
&amp;nbsp;}

$sql = mysql_query("SELECT * FROM members WHERE id='$mid'"); 
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$email = $row["email"];
$lastactivity = $row["lastactivity"];

if(time() &amp;gt; $lastactivity+10&lt;span class="Apple-style-span" style="color: #e69138;"&gt;/*10 is the number of seconds user stay online without doing activity on the page you can always change it */&lt;/span&gt;){$onlineStats = "away";}&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//if the last time you did something on your page + 10 seconds is less than the current time. your onlinestats will equal away or you can change to offline&lt;/span&gt;
else if(time() &amp;lt; $lastactivity+10){$onlineStats = "online";}&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//if the last time you did something on your page + 10 seconds is greater than the current time. your onlinestats will equal online&lt;/span&gt;
}
?&amp;gt;
&amp;lt;?php print"$onlineStats";?&amp;gt;
&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/check-if-user-online-or-away-script.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2147536258455714585.post-4227873857972225202</guid><pubDate>Wed, 08 Jun 2011 04:32:00 +0000</pubDate><atom:updated>2011-06-25T22:40:02.553-07:00</atom:updated><title>LEARN WRITE TWITTER LOAD MORE RESULT SCRIPT USING JQUERY AND PHP</title><description>&lt;pre&gt;&lt;object style="height: 390px; width: 540px;"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uqGKsEoHyT0?version=3"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/uqGKsEoHyT0?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="540" height="390"&gt;&lt;/object&gt;

first create table and call it&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: sans-serif; white-space: nowrap;"&gt;&lt;b&gt;pagination with 3 fields &amp;nbsp;id ,name and&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; white-space: nowrap;"&gt;&lt;b&gt;age and enter dummy data&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; white-space: nowrap;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; white-space: nowrap;"&gt;&lt;b&gt;mysql.php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: nowrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;b&gt;&amp;lt;?php&amp;nbsp;&lt;/b&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;b&gt;@mysql_connect("localhost","root","") or die ("could not connect to mysql");&lt;/b&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;b&gt;@mysql_select_db("name of your database") or die ("no database");&lt;/b&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;b&gt;?&amp;gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: sans-serif;"&gt;&lt;b&gt;///////////page end here&lt;/b&gt;&lt;/span&gt;

index.php

&amp;lt;?php
include_once "mysql.php";//include the mysql connect script

$pagen=0;

$sql_rec = mysql_query("SELECT * FROM pagination ORDER BY id DESC LIMIT $pagen,4");&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement mean that you chose the first 4 results&lt;/span&gt;
while($row = mysql_fetch_array($sql_rec)){&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement fetch first 4 results&lt;/span&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$id = $row["id"];
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$age = $row["age"];
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;
$namelist .= 'name : '.$name.' age : '.$age.'&amp;lt;br /&amp;gt;' ;
}

$sql_list = mysql_query("SELECT * FROM pagination");
$num_rows = mysql_num_rows($sql_list);&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement to determine number of row we will paginate&lt;/span&gt;
$pnumber = ceil($num_rows/4);&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- we will divide the number of rows by 4 which is the number of post we will render &amp;nbsp;&lt;/span&gt;

?&amp;gt;

&amp;lt;style type="text/css"&amp;gt;
&amp;lt;!--
body {
}
.link {
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;background-color: #FFFFFF;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-family: Arial, Helvetica, sans-serif;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-size: 12px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;font-weight: bold;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;color: #003399;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;text-decoration: none;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-right: 2px;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;padding-left: 2px;
}

--&amp;gt;
&amp;lt;/style&amp;gt;
&amp;lt;script type="text/javascript" src="js/jquery-1.4.2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
$(document).ready(function(){
//$('#loading').hide();&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will hide loading gif&amp;nbsp;&lt;/span&gt;
&amp;nbsp;$('.link').css('display', 'none');&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will hide .link anchor&lt;/span&gt;
&amp;nbsp;$('.link').first().css('display', 'none').next().css('display', 'inline-block');&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will show the second &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;.link anchor&amp;nbsp;&lt;/span&gt;
});

function pages(&lt;span class="Apple-style-span" style="color: red;"&gt;page&lt;/span&gt;){&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this function will run we clicked on the show more link &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;(&lt;span class="Apple-style-span" style="color: #e69138;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;page =&amp;nbsp;&lt;/span&gt;'.$e.')

//$('#loading').show();&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this loading gif will appear&lt;/span&gt;
&amp;nbsp; //alert("page" + page);
&amp;nbsp; $("#pages" + &lt;span class="Apple-style-span" style="color: red;"&gt;page&lt;/span&gt;).css('display', 'none').next().css('display', 'inline-block');&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----hide the link that you click and show the next if existed&lt;/span&gt;
&amp;nbsp; var URL = "userslist.php";
&amp;nbsp; $.post(URL,{&lt;span class="Apple-style-span" style="color: #a64d79;"&gt;pages&lt;/span&gt;:"&lt;span class="Apple-style-span" style="color: #45818e;"&gt;paginate&lt;/span&gt;",&lt;span class="Apple-style-span" style="color: lime;"&gt;pageNumber&lt;/span&gt;:&lt;span class="Apple-style-span" style="color: red;"&gt;page&lt;/span&gt;},function(data){&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----will run the userslist.php&lt;/span&gt;
&amp;nbsp; $("#OldComment").append(data).show();&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----show the new 4 results&lt;/span&gt;
&amp;nbsp; $('#loading').hide();
&amp;nbsp; });
&amp;nbsp;}
&amp;lt;/script&amp;gt;

&amp;lt;table width="500" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;
&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;div id='OldComment'&amp;gt;&amp;lt;?php print"$namelist"; ?&amp;gt;&amp;lt;/div&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class="pagination"&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php
&amp;nbsp; &lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;for($i=0; $i&amp;lt;=($pnumber-1); $i++)&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----we run a for loop that start from 0 to $pnumber&amp;nbsp;&lt;/span&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;{
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$e= $i*4 ;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this will replace $pagen in the userlist.php&lt;/span&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;echo '&amp;lt;a class="link" id="pages'.$e.'" href="#" onclick="return false" onmousedown="javascript:pages('.$e.');"&amp;gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;Show more&lt;/b&gt;&lt;/span&gt;&amp;lt;/a&amp;gt; ';&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----when you click on this link the&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #bf9000;"&gt;javascript:pages('.$e.'); will run&amp;nbsp;&lt;/span&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}
?&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; &amp;lt;img src="loading.gif" alt="" width="15" height="15" id="loading" /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----this loading gif will appear every time&amp;nbsp;&lt;/span&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&lt;div&gt;/////////////////////////////page end here&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;userslist.php&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt;$pagen = $_POST['&lt;span class="Apple-style-span" style="color: lime;"&gt;pageNumber&lt;/span&gt;'];&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;----resulted from the jquery we ran in last script&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;include_once "mysql.php";&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;if ($_POST['&lt;span class="Apple-style-span" style="color: #a64d79;"&gt;pages&lt;/span&gt;'] == "&lt;span class="Apple-style-span" style="color: #45818e;"&gt;paginate&lt;/span&gt;"){&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;$sql_selfnews = mysql_query("SELECT * FROM pagination ORDER BY id DESC LIMIT $pagen,4");&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement will select next 4 results&lt;/span&gt;&lt;/div&gt;&lt;div&gt;while($row = mysql_fetch_array($sql_selfnews)){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$id = $row["id"];&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$name = $row["name"];&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$age = $row["age"];&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;$namelist .= 'name : '.$name.' age : '.$age.'&amp;lt;br /&amp;gt;' ;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;?php print"$namelist"; ?&amp;gt;&lt;span class="Apple-style-span" style="color: #e69138;"&gt;//&amp;lt;---- this statement will render next 4 results&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/pre&gt;</description><link>http://phpcoderboard.blogspot.com/2011/06/page-is-under-construction.html</link><author>noreply@blogger.com (ebraam)</author><thr:total>2</thr:total></item></channel></rss>