Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help correct this code
11-10-2013, 09:32 PM,
Post: #1
Please help correct this code
this code shows me comment left empty, please how do i make it insert data into mysql...please help me pals
PHP Code:
if(isset($_GET["action"]))
{
if(
$_GET["action"]=="comment")
{
$id $_GET["id"];
$message htmlspecialchars($clean["message"],ENT_QUOTES);
$user $_SESSION["username"];
if(empty(
$message))

{
echo 
'<br/><div class="error">comment left blank</div><br/>';
echo 
'<br/><div class="center"><a href="reply.php?id='.$id.'">Back</a></div>';
include 
"inc/foot.php";
exit();

}
$smiley get_string($message"-""-");
if(
file_exists('img/smilies/1/'.$smiley.'.gif')){
$message str_replace($smiley,'<img src="img/smilies/1/'.$smiley.'.gif" alt="-"/>',$message);
$message str_replace('-','',$message);
}
else
{
$date=time();
mysql_query("INSERT INTO forumreply SET id='', message='$message', forum='.$id.', user='$user', date='$date'");
}

header("Location: reply.php?id='.$id.'");

exit();
}

here is the form
PHP Code:
<form action="reply.php?action=comment&id='.$id.'" method="post"><div class="center">
      
Comment<br/><textarea name="message" type="text" maxlength="500"/></textarea>
      <
div align="top"><input type="submit" value="Add!"/></div></form
Reply
11-11-2013, 05:28 AM,
Post: #2
RE: Please help correct this code
$message = htmlspecialchars($clean["message"],ENT_QUOTES);

should be like:
$message = htmlspecialchars($_POST["message"],ENT_QUOTES);
Reply
11-22-2013, 06:44 PM,
Post: #3
RE: Please help correct this code
thanks man
Reply
05-22-2019, 01:39 PM,
Post: #4
RE: Please help correct this code
I got some codes that was available on this that was among the all generation that was good to have the all formats. I have to copy the all data from this that was available on https://www.resumewriterslist.com/resume...rg-review/ this was use at all languages specially PHP that was good to have.
Reply
08-13-2020, 01:24 PM,
Post: #5
RE: Please help correct this code
If you want to feel the colorful night with a blonde beauty then visit our escorts agency. Here you will get all the type of girl who are ready to give her entire body into your arms just visit
http://www.dohaescortsservice.com/
Reply
08-13-2020, 01:49 PM,
Post: #6
RE: Please help correct this code
Our girl not able to wait more. So, visit now and take a very sensational services from her. She will totally seduce you in just one minute and you will not able to ignore her for a second also. Visit now
http://www.qatarescortsservice.com/
Reply
08-29-2020, 09:49 AM,
Post: #7
RE: Please help correct this code
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. Concrete contractors in Delaware
Reply
08-29-2020, 10:13 PM,
Post: #8
RE: Please help correct this code
I really enjoyed reading this post, big fan. Keep up the good work andplease tell me when can you publish more articles or where can I read more on the subject? blue punisher pill
Reply
08-31-2020, 05:46 PM,
Post: #9
RE: Please help correct this code
I liked your article and I hope you will have many entries or more  ideas list
Reply
09-01-2020, 09:54 PM,
Post: #10
RE: Please help correct this code
I read your post and I found it amazing! thank! What is Alex Ojjeh's Twitter
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)