🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.golive.dynamic.content
Article #118

Simple voting question

#118
From: Jeremy_M._Cox
Date: Mon, 09 Aug 2004 15:01
12 lines
1949 bytes
I have a simple interface where a user can click on a students name which is a link to the next page, a details page if you will. A page parameter is passed to fill the next page with the information pulled from the db table with the corresponding primary key in this case the student's ID.

This information is inside a form with only a hidden field named "vote" and a value of // '<?php echo pageParameter("showme",""); ?>' The showme contains the primary key so that when the submit button is pressed the students's ID is posted.

The form action is linked to the next page which is a simple thank you for voting. It also contains some php script.
// <?php $vote = $_POST['vote']; //		$query = "update tbaotw set atw_votes = atw_votes + 1 where atw_ID = '$vote' "; //		?>

I know the ID is being posted because I can use the echo command to display the current ID that was passed. The script executes but the db isn't updated. The query works with in phpMyAdmin but not in GoLive.

Am I doing something wrong. Do I have to create a select statement to retrieve the value for atw_votes and then add 1 to it. then add it to the db.

Any help would be appreciated. Thanks
Technical Details
Message-ID: <3bb564f0.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Thread: 11ffd2,5693a7824df0323c,start
X-Google-Attributes: gid11ffd2,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Jeremy_M._Cox@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.golive.dynamic.content
Subject: Simple voting question
Message-ID: <3bb564f0.-1@webx.la2eafNXanI>
Date: Mon, 9 Aug 2004 08:01:31 -0700
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit