SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: php poll errors

  1. #1
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have created a poll with phpPolls script for my site..i modified it a little and everything should work well but this code doesn't. I want to show the poll when someone comes to my site,but when he votes the page reloads and it should show the results, however if i comment out everything below else { then it works but if i leave the code like this

    <?php
    if(isset(!$show_results)) {
    require('phpPolls\phpPollConfig.php3');
    require('phpPolls\phpPollUI.php3');
    poll_generateUI(1,"http://localhost/Celisvet/index.php?show_results=1"); }
    else {
    require('phpPolls\phpPollConfig.php3');
    require('phpPolls\phpPollUI.php3');
    poll_viewResults(1); }
    ?>

    then it doesn't. I tried several ways of writing this if...else statement, I even tried <?php if(...): .. else: ..
    , but nothing works. this is the error i get from the above code: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\inetpub\wwwroot\Celisvet\index.php on line 909
    This is really annoying me.
    any ideas?

    Mare

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had to fight a bit with some files to get it to work too. Here's what I used, and it worked..

    http://www.aboutpcs.com/p/poll

    Of course, feel free to copy any code you like. No credit required

    Hope this helps, and if you need any specific explanation about what I did, just ask.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •