Original Post
I'm trying to make a very simple poll useing PHP. The problem I'm haveing is that I want the poll and the results to appear on the same page (ie, if the user hasn't voted, show the poll, if he has, show the results). My attempt to make this happen looks a little like this...
function make_poll(){
if(!isset(HTTP_POST_VARS['vote'])){
display_poll();
}
else
{
display_poll_results();
}
}
where the function display_poll() is a simple HTML form with radio buttons whos name is vote and value varries depending on what you vote for. But, for some reason, PHP doesn't like this as it never registers a value for 'vote'. I've tried changing the submit action of the form to an inbetween page which uses HTTP_SESSION_VARS['vote'] = HTTP_POST_VARS['vote'] (which seems to work) and then have that page forward back to the poll page, but when I try to pass the session var vote back, PHP keeps seeing it as empty... what could I possibly be doing wrong?
[edited by - Cygnus_X on April 18, 2004 6:39:40 PM]