Page 1 of 1

%24 where is it coming from...

Posted: Fri Aug 08, 2003 1:30 pm
by 420greg
I am building this page in dreamweaver:

http://www.occompt.com/vab/lookup.php

It is my first attempt and using MX for php/mysql. So far so good except when you try to do a lookup (use 0001) the url has a %24 in it (is this a /, like %20 is a space?) if you remove the %24 from the url it works fine.

I have been thru the code 100 times and can not find the problem.

Code: Select all

<?php
$colname_Recordset1 = "1";
$colname_Recordset1 = "1";
if (isset($HTTP_GET_VARS&#1111;'PetitionNumber'])) &#123;
  $colname_Recordset1 = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS&#1111;'PetitionNumber'] : addslashes($HTTP_GET_VARS&#1111;'PetitionNumber']);
&#125;
mysql_select_db($database_vab, $vab);
$query_Recordset1 = sprintf("SELECT * FROM MainTable WHERE PetitionNumber = '$petnum'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $vab) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
Thanks!

Greg

Posted: Fri Aug 08, 2003 3:53 pm
by qartis
%24 is a dollar-sign ($), so I'm not sure why you would get that in your code. Check the data in your db, maybe you're storing more than you think.

Posted: Fri Aug 08, 2003 7:13 pm
by McGruff
I can't figure out the problem from what you've posted.

It sounds like a string value for a GET var is not being urldecode()'d?

If you pass strings as GET vars, always urlencode() first, then urldecode() at the other end.