Hello everyone!
I am building a site using Drupal and I was hoping to pick some brains here to see what i'm doing wrong...
My page here is working fine (outside of Drupal):
http://sanluisrealtor.studiocreek.com/search2.php?City=cayucos
But when I put the code into drupal it just doesn't work... any ideas why? Here is the full code i'm using:
<?php
$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());
?>
<?php
$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);
?>
<?php
do {
?>
<?php
echo $row_Recordset1['ML_Number'];
?>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
<?php
mysql_free_result($Recordset1);
?>
What am I missing here? Any help would be greatly appreciated! Thanks!