Variable Appended To The End of a URL Is Not Working in SQL Query

From: Date: Tue, 02 Apr 2002 04:41:03 +0000
Subject: Variable Appended To The End of a URL Is Not Working in SQL Query
Groups: php.general 
Request: Send a blank email to php-general+get-91067@lists.php.net to get a copy of this message
I have a variable which is appeneded to the end of a URL, like http://www.your_web_site.com/your_page/?your_variable=your_value This would return "your_value"; echo $your_variable; But this wouldn't work, and returns an error $sql = "SELECT * FROM fldField WHERE IDField = " . $id; What could possibly be wrong? If you need more info, then tell me. Here's my code: <?php $db = @odbc_connect('ReviewDatabase', 'root', '') or exit)("Error occured:<br>$php_errormsg"); $sql = "SELECT * FROM tblArt WHERE IDArt = $id"; $cursor = @odbc_exec($db, $sql) or exit ("Error occrued:<br>$php_errormsg"); odbc_close($db); ?>

« previous php.general (#91067) next »