Thread: Error Message

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    7
    Rep Power
    0
    Could anyone explain what this might mean?

    Warning: 0 is not a MySQL result index

    I have a simple form set up where a user types in a keyword and then a page is displayed based on the keyword. See below

    HTML page:
    <html>

    <head>
    <title></title>
    </head>
    <body>
    <form action="submitform.php3" method="GET">
    <p><strong><font face="verdana, arial, ms sans serif" size="1">id#</font>:</strong> <input
    type="text" name="keyword" size="15" maxlength="25"> <input type="submit" value="Go!"> </p>
    </form>
    </body>
    </html>

    submitform.php3 page:
    <?php

    mysql_connect ("localhost", "username", "password");

    mysql_select_db (dbname);

    $result=mysql_query("SELECT $url FROM table
    WHERE keyword LIKE '%$keyword%'");
    list($url)=mysql_fetch_row($result);

    ?>

    The concept is really simple. A user types in an keyword and that page is displayed. There is a database set up with a table that has two columns. One is "keyword" and the other is "url" For example row 1 the keyword is abc, and the url is http://www.abc.com.

    Help?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    7
    Rep Power
    0
    Please ignore this posting. The problem has been fixed. A big thank you goes out to rod k for all of his technical help!

IMN logo majestic logo threadwatch logo seochat tools logo