I'm hoping that the solution is obvious and that one of you knowledgable devleopers will just be shaking your head at my silliness but I've been pounding my head over this for way too long (read hours).
Being very new please forgive me if the semantics of my explanation is poor.
My problem is in passing a variable to a SELECT statement. The variable in the code is $x_smn_author. The value should be "Curtis Young".
I can get the rem'd out variable to be echoed correctly, however even if I type in the expected string (non-rem'd variable) I cannot get it to be accepted in the SELECT statement.
The non-rem'd SELECT statement does work.
What am I not understanding about the string value of a variable? I even tried using strval($x_smn_author) with no change.
Code snippet:
//$x_smn_author = @$row["smn_author"];
$x_smn_author = "Curtis Young";
$x_smn_title = @$row["smn_title"];
$x_smn_body = @$row["smn_body"];
break;
}
//$strsql2 = 'SELECT * FROM use_statement WHERE author ='.strval($x_smn_author);
//$strsql2 = 'SELECT * FROM use_statement WHERE author ='. $x_smn_author;
$strsql2 = 'SELECT * FROM use_statement WHERE author = "Curtis Young" ';
$rs2 = mysql_query($strsql2,$conn) or die(mysql_error());