UPDATE
Bu uyarının ekran görüntüsü:
i başarıyla user_submit.php dosyaya POST verileri için aşağıdaki JQuery işlevini kullanıyorum, onun php dosya sadece unable to receive the data.
$(function() {
$("#submit_js").click(function() {
$.post("user_submit.php", {
comment: $("#comment").val()
});
});
});
Firebug consoloe bittiğindeki bunu gösterir:
<html>
<body>
Your vote was successfully registered!any text but this
</body>
</html>
Ben burada tüm user_submit.php dosya yapıştırarak ediyorum:
<html>
<body>
<?php
$vote = $_REQUEST['vote'];
$aid = $vote;
//$comment = $_REQUEST['#comment'];
//$comment = print_r($_POST);
$comment = htmlspecialchars($_POST["comment"]);
//$comment = $_POST['comment'];
//echo htmlspecialchars($comment);
//$comment = $_POST['comment'];
//echo $comment;
// include configuration file
include('config.php');
// open database connection
$connection = mysql_connect($host, $user, $pass) or die('ERROR: Unable to connect!');
// select database
mysql_select_db($db) or die('ERROR: Unable to select database!');
// update vote counter
$query = "UPDATE answers SET acount = acount + 1 WHERE aid = $vote";
$result = mysql_query($query);
$cadd = "INSERT INTO comments (comment,aid) VALUES ('$comment', '$aid')";
mysql_query($cadd);
// close connection
mysql_close($connection);
// print success message
echo 'Your vote was successfully registered!';
echo $comment;
//print_r(array_count_value($comment));
?>
</body>
</html>
bana yardım edin. ben şimdi saatlerce bu ile sıkışmış edilmiştir.
** EDIT: Gönder Button HTML istediği gibi **
<div id="greetings">
You are voting out <b style="color: #00b0de;" id=roadiename></b>. Care to explain why?<br/><br/>
<textarea name="textarea" id="comment" cols="38" rows="7">textarea</textarea><br>
<a href="#" id="submit_js"><img src="images/submit.gif" style="border: none; float:right; padding-top: 10px;padding-right: 10px;"/></a>
</div>