Why wont this work: '$_SERVER['PHP_AUTH_USER']'
Posted: Tue Jan 28, 2003 10:28 pm
I am pretty sure I have to have the single qoutes around the text. Its for when I am inserting something into a database.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$sql = "SELECT this FROM that WHERE something = '$_SERVER['PHP_AUTH_USER']'";Code: Select all
$sql = "SELECT this FROM that WHERE something = '$_SERVER[PHP_AUTH_USER]'";Code: Select all
$sql = "SELECT this FROM that WHERE something = '{$_SERVER['PHP_AUTH_USER']}'";Code: Select all
$sql = "SELECT this FROM that WHERE something = '".$_SERVER['PHP_AUTH_USER']."'";