Hello all,
I'm having trouble figuring something very little out that is driving me nuts. I have two files: input.html and dbcheck.php.
input.html looks like this:
<html...
<form method="GET" action="dbcheck.php">
<input type="text" name="id">
<input type="submit" name="submit value="go">
So when they enter say, "11" into the box and hit enter, it should send the data via "http://blah/dbcheck.php?id=11". It does that... here is my problem:
dbcheck.php:
<?php
$db = mssql_connect("server","user","pass");
mssql_select_db("BLAH",$db);
$result = mssql_query("SELECT * FROM TABLE1 WHERE Requested_ID='$id'",$db);
$USERNAME= mssql_result($result,0,"Username");
Your username is: <?= $USERNAME ?>
Now the problem is that the file doesn't return anything.. according to SQL 7.0 (tracing) the query is: SELECT * FROM TABLE1 WHERE Requested_ID="
Which is clearly wrong and should be the one in dbcheck.php. It seems the ...Requested_ID='$id'" does not get parsed.
Any suggestions?
Thanks in advance. PHP 4.1.x, SQL 7.0, Apache on Windows 2000.
-Sopan