I am trying to pass a variable to a test script through a URL. Its php 4.1.1 on a windows 2k server, and accessing SQL Server 7
I am getting an error that says undefined variable when I try this query. I want to pass this variable through a URL ie..
http://myserver.com/test.php?techid=001001
If I were to do this same query on mysql and a unix box it works fine..I have done this a billion times. But on this windows install using SQL Server it gives me an undefined error message.
Thanks in advance..the script is below.
Here is the script:
<?PHP
mssql_pconnect ("USA-SVR1BOF-BDC","sa","");
mssql_select_db ("USACleanApp");
$result = mssql_query("select * from xtechzips where TechID = '$techid' ");
if($row = mssql_fetch_array($result)){
do {
echo "<table width=100% border=0 cellspacing=0 cellpadding=1>
<tr bgcolor=>
<td>
<table width=100% border=0 cellspacing=0 cellpadding=3>
<tr bgcolor=>
<td width=20%><font face=Verdana, Arial, Helvetica, sans-serif size=-1>",$row[TechID],"</font></td>
<td width=20%><font face=Verdana, Arial, Helvetica, sans-serif size=-1>",$row[ZipCode],"</font></td>
</table>
</td>
</tr>
</table><br>";
}while($row = mssql_fetch_array($result));
}else{
echo "<font face=verdana size=-1><b>No Results Available</font></b>";
}?>