SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Php Voting poll

  1. #1
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php Voting poll

    Hey guys
    I am creating a voting system using My SQL and PHP

    I created the Database db_polls

    2 tables

    My problem is adding this script:

    The Switch statement

    switch(@$HTTP_GET_VARS["method"])
    {
    case "ShowAdd":
    GetNewPollDetails();
    break;
    case "AddFinal":
    AddPoll();
    break;
    case "ShowDelete":
    GetPollToDelete();
    break;
    case "DeleteFinal":
    DeletePoll();
    break;
    default:
    GetChoice();
    }


    I saved it in a text document as managepoll.php
    location of file: C:\Program Files\Apache Group\Apache2\htdocs


    Then to preview:
    http://localhost/managepoll.php

    (error)

    What am I missing here?

  2. #2
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you put something like:
    Code:
    <!-- Save this as index.html -->
    <html>
    <head>
    <title>Hello world!</title>
    </head>
    <body>
    <p>Hello world!</p>
    </body>
    </html>
    in that directory, does it work?

    Greetings

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  3. #3
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php Voting Poll

    I saved the file in the following location:
    C:\Program Files\Apache Group\Apache2\htdocs\index.html


    and went looking for it here:
    -------------------------------|
    http://localhost/index.html |
    -------------------------------|

    I received the same HTTP 404 error

    But when I type http://localhost I can see


  4. #4
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Php Voting Poll

    Originally posted by hebisr
    I saved the file in the following location:
    C:\Program Files\Apache Group\Apache2\htdocs\index.html


    and went looking for it here:
    -------------------------------|
    http://localhost/index.html |
    -------------------------------|

    I received the same HTTP 404 error

    But when I type http://localhost I can see

    indeed! That doesn't make any sense to me at all!

    Are you 110% sure you typed it in correctly?

    Greetings

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  5. #5
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi hebisr,

    This is in answer to your pm. As I explained in my pm to you I will answer here because I don't like to brake a thread.

    Quote from your pm:
    let me clear this up real quick when I type
    http://localhost

    I can see

    ____________________
    The index of/


    Parent Directory
    phpMyAdmin/
    test.php
    It looks like your webroot is not C:\Program Files\Apache Group\Apache2\htdocs. You should search for the folder containing the file 'test.php' it. That is your webroot. Different installations put the webroot folder in different places.

    Greetings

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  6. #6
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks buddy

    You are absolutely correct Sir I checked and guess where I found it?


    C:\Program Files\Apache Group\Apache \htdocs\index.html

    Instead of...

    C:\Program Files\Apache Group\Apache2\htdocs\index.html

    They both possess a "htdocs" folder("interesting"...umm?)

    But anyway i made a few test runs and it looks like I am on my way...........

    Peace to you,
    And thanks a bunch for all your help.


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
  •