KingB
11-07-2003, 03:57 PM
I'm a bit of a noob so any code help is greatly appreciated!! I'm trying to have my url array values (sent by a form via GET) get to my sql query. The problem is that the "&" and the "=" are encoded to "%26" and "%3D". I think I need some sort of rawurldecode function prior to my sql. However, whatever I've tried doesn't seem to work and I can't find an exact answer along the forum.
Here's my recordset:
@$phonejoin = " '".join("' OR dnc.phone = '", $HTTP_GET_VARS['ph'])."' ";
$colph_DNC = "1";
if (isset($_GET['ph'])) {
$colph_DNC = (get_magic_quotes_gpc()) ? $_GET['ph'] : addslashes($_GET['ph']);
}
mysql_select_db($database_DNC_01, $DNC_01);
$query_DNC = sprintf("SELECT * FROM dnc WHERE phone = $phonejoin", $colph_DNC);
$DNC = mysql_query($query_DNC, $DNC_01) or die(mysql_error());
$row_DNC = mysql_fetch_assoc($DNC);
$totalRows_DNC = mysql_num_rows($DNC);
?>
Any ideas? Thanks in advance!
Here's my recordset:
@$phonejoin = " '".join("' OR dnc.phone = '", $HTTP_GET_VARS['ph'])."' ";
$colph_DNC = "1";
if (isset($_GET['ph'])) {
$colph_DNC = (get_magic_quotes_gpc()) ? $_GET['ph'] : addslashes($_GET['ph']);
}
mysql_select_db($database_DNC_01, $DNC_01);
$query_DNC = sprintf("SELECT * FROM dnc WHERE phone = $phonejoin", $colph_DNC);
$DNC = mysql_query($query_DNC, $DNC_01) or die(mysql_error());
$row_DNC = mysql_fetch_assoc($DNC);
$totalRows_DNC = mysql_num_rows($DNC);
?>
Any ideas? Thanks in advance!