post a blog entry
prepare("SELECT blog.ID,blogurl,blogtitle,blogtext,mid,girls.mainpic,girls.fname,girls.username FROM blog LEFT JOIN girls ON blog.mid=girls.ID WHERE blog.blogurl=:blogurl ORDER BY blog.ID desc"); $stmt->bindParam(':blogurl',$_REQUEST["pl"]); $stmt->execute(); $count == 0; echo '
'; ?> fetch()) { $blogid = $i3["ID"]; echo '

'.$i3["blogtitle"].'

'; echo '
'.nl2br($i3["blogtext"]).'


'; } echo ''; $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY blog SET views=views+1 WHERE blog.ID=:blogid "); $stmt->bindParam(':blogid',$blogid); $stmt->execute(); ?>
0){ if($_REQUEST["blogtext"] <> ""){ $stmt = $pdodb->prepare("INSERT INTO blogcomments (replytext,mid,blogid) VALUES(:blogtext,:mid,:blogid)"); $stmt->bindParam(':blogtext',$_REQUEST["blogtext"]); $stmt->bindParam(':blogid',$blogid); $stmt->bindParam(':mid',$_SESSION["uid"]); $stmt->execute(); $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY blog SET comments=comments+1 WHERE blog.ID=:blogid "); $stmt->bindParam(':blogid',$blogid); $stmt->execute(); } $stmt = $pdodb->prepare("SELECT replytext,mid,girls.mainpic,girls.fname FROM blogcomments,girls WHERE blogcomments.mid=girls.ID AND blogcomments.blogid=:blogid ORDER BY blogcomments.ID desc"); $stmt->bindParam(':blogid',$blogid); $stmt->execute(); while($i3=$stmt->fetch()) { echo '
'.$i3["replytext"].'

'; } ?>
Your comment:


login to comment'; } ?> prepare("SELECT blog.blogurl,blog.blogtitle,blog.blogtext,blog.mid,girls.mainpic,girls.fname,blog.comments,blog.views FROM blog LEFT JOIN girls ON blog.mid=girls.ID ORDER BY blog.ID desc"); $stmt->execute(); $count == 0; echo '
'; while($i3=$stmt->fetch()) { echo '
'.$i3["blogtitle"].'
'; echo '
'.$i3["blogtext"].'
'; echo '
'.$i3["comments"].' comments - '.$i3["views"].' views
'; echo '

'; } echo '
'; ?>