SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: option values

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    Melbourne Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    option values

    Hi

    I want to do a dropdown box with managers' names in it. When I insert the code, below, I get the following message. Can anyone tell me what I'm doing wrong? Any help would be appreciated.



    Parse error: parse error, expecting `','' or `';'' in c:\apache\htdocs\best\admin.php on line 252



    # Start form header
    echo "<form method=\"post\" action=\"admin.php\">\n";
    # Build the table header
    echo "<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\">\n";
    # Populate the table
    echo "<!-- Begin MySQL data presentation -->\n";

    echo "<tr>\n";
    echo "\t<td>Date</td>\n";
    echo "\t<td><input type=\"text\" size=\"20\" name=\"f_date\"> </td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "\t<td>Manager</td>\n;"
    echo "\t<td><select name=\"f_manager\">"; this is line 252
    echo "<option>Gary";
    echo "<option>Elizabeth";
    echo "<option>Phillip";
    echo "<option>Janelle";
    echo "<option>Julie";
    echo "<option>Carole";
    echo "<option>Ian";
    echo "\t</select></td>\n";
    echo "</tr>\n
    signature

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On line 251, you have ;" instead of ";. You need to add a semicolon to end the statement beginning on line 251.

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, also the last line should be
    PHP Code:
    echo "</tr>\n"
    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    Melbourne Australia
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    option dropdown box

    Thanks. It worked.
    signature


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
  •