%24 where is it coming from...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
420greg
Forum Newbie
Posts: 1
Joined: Fri Aug 08, 2003 1:30 pm
Location: Orlando, FL

%24 where is it coming from...

Post 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
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post 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.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post 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.
Post Reply