> 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);
The above line is probably causing an error. You have $var = "string", $var); What are you trying to do? > $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. WHAT'S THE ERROR? It helps us tremendously if you actually tell us what the error is, what line it's on, and then show the relevant line with 5 or so lines before it also. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php