I am creating a polling system. Its operation likes this:
when the people vote the item, it updates the database by adding 1 for the item automatically.
The part of code is showed here:
<?php
$colname_rsAddVote = "1";
if (isset($HTTP_POST_VARS['Vote'])) {
$colname_rsAddVote = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['Vote'] : addslashes($HTTP_POST_VARS['Vote']);
}
mysql_select_db($database_cnTesting, $cnTesting);
$query_rsAddVote = "UPDATE Testing SET GetVotes = GetVotes + 1 WHERE VoteID = %s", $colname_rsAddVote);
$rsAddVote = mysql_query($query_rsAddVote, $cnTesting) or die(mysql_error());
?>
In fact, I use Dreamweaver MX to create the page.
But When I run the page, it shows an error. I don't how to reform it. Thanks!!
Terry
_________________________________________________________________
今日星座 http://www.msn.com.hk/fortune/west/ 運程
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php