Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. AimeeAult

    echo reveals 1, but follows if statement for 0?

    Yeah, I tried that. That worked fine for some reason. I've been having weird issues like this lately on my server. Same thing happened with some code for a session variable. Code was fine, didn't work. Oh well. Thanks for the input :) Aimee
  2. AimeeAult

    echo reveals 1, but follows if statement for 0?

    if ($type == "E-mail Address"){ $sql = "SELECT * FROM user_driver WHERE driver_email = '$search'"; $result = mysql_query($sql) or die ("#1 err."); $num = mysql_num_rows($result); echo($num); if ($num == 0) // no matches { echo ("Sorry, no matches!"); } elseif ($num > 0) // login name...
  3. AimeeAult

    echo reveals 1, but follows if statement for 0?

    I have a database search. $search comes from post data, as does $type. Whenever I have it echo the number after it does the query, it returns 1, but for some reason it tells me I have no matches. Does anyone have any ideas on what may be going on with this? if ($type == "E-mail Address"){ $sql...

Part and Inventory Search

Back
Top