i don't see anything wrong with it... what's the deal? this is the results page that displays the results of a search query.
Parse error: parse error in ../../../../merchandise/testreg/results.php on line 21

@ $db = mysql_connect("localhost", "apache", "R3GP@SS!");

    if(!$db)
    {
    echo "Error: Could not connect to the database. Please try again later.";
    exit;
    }

    mysql_select_db("registry_DB, $db);
    $sql = mysql_query("SELECT brideLname, groomLname FROM my_search_table WHERE brideLname LIKE '%". $lname ."%' OR groomLname LIKE '%". $lname ."%'") or die(mysql_error();//<--- LINE 21 (entire SQL statement is on one line
    $result = mysql_query($sql);
    $num_result = mysql_num_rows($result);


    echo "Number of matches: ". $num_result ."<br />";

You are missing a ')'

die(mysql_error()[b])[/b]

you're the man...

You are missing a ')'

die(mysql_error()[B])[/B]

the tables don't exist yet, but the database does... i get the following error when i click the submit button for a search. it seems to be combining my database name AND my table name....

Table 'registry_DB.my_search_table' doesn't exist


my database name is 'registry_DB'. my table name is 'my_search_table'. what's the deal here?

That's just good error reporting. It helps that it is so specific as to avoid any confusion with similar table names in other databases.

i don't see anything wrong with it... what's the deal? this is the results page that displays the results of a search query.
Parse error: parse error in ../../../../merchandise/testreg/results.php on line 21

@ $db = mysql_connect("localhost", "apache", "R3GP@SS!");
 
    if(!$db)
    {
    echo "Error: Could not connect to the database. Please try again later.";
    exit;
    }
 
    mysql_select_db("registry_DB, $db);
    $sql = mysql_query("SELECT brideLname, groomLname FROM my_search_table WHERE brideLname LIKE '%". $lname ."%' OR groomLname LIKE '%". $lname ."%'") or die(mysql_error();//<--- LINE 21 (entire SQL statement is on one line
    $result = mysql_query($sql);
    $num_result = mysql_num_rows($result);
 
 
    echo "Number of matches: ". $num_result ."<br />";

you have no text box... how would you search and your html form?

The form may be on another page!

You can then use $_REQUEST; to get the information.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.