My page here is working fine (outside of Drupal):
http://sanluisrealtor.studiocreek.com/search2.php?City=cayucos
When I put the code into drupal however I cannot get it to work... any ideas why? Here is the full code i'm using:
$hostname_mls_connection = "localhost";
$database_mls_connection = "...";
$username_mls_connection = "...";
$password_mls_connection = "...";
$mls_connection = mysql_pconnect($hostname_mls_connection, $username_mls_connection, $password_mls_connection) or die(mysql_error());
$colname_Recordset1 = "1";
if (isset($HTTP_GET_VARS['City'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['City'] : addslashes($HTTP_GET_VARS['City']);
}
mysql_select_db($database_mls_connection, $mls_connection);
$query_Recordset1 = sprintf("SELECT * FROM res WHERE City = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $mls_connection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
do {
echo $row_Recordset1['ML_Number']; |
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
mysql_free_result($Recordset1);
What am I missing here? Any help would be greatly appreciated!