In the following code $strEmail is passed from a form. If I simply print $strEmail I get the string value so I know the variable is passing properly, however when I execute the full code below I get this for a result:
Resource id #2 - instead of the expected string value from field_name_A... I'm buggered.
if (isset($strEmail)) {
mysql_connect("localhost", "root", "")
or die ("Unable to connect to database.");
mysql_select_db("db_name")
or die ("Unable to select database.");
$sql = "SELECT field_name_A FROM table_name WHERE field_name_B='$strEmail';";
$result = mysql_query($sql);
echo($result);
Resource id #2 - instead of the expected string value from field_name_A... I'm buggered.
if (isset($strEmail)) {
mysql_connect("localhost", "root", "")
or die ("Unable to connect to database.");
mysql_select_db("db_name")
or die ("Unable to select database.");
$sql = "SELECT field_name_A FROM table_name WHERE field_name_B='$strEmail';";
$result = mysql_query($sql);
echo($result);