Jump to content

I $_GET problems with a $_GET


phpretard

Recommended Posts

I am trying to pass this twice to a $_GET and it will only show the first word on the second pass.

 

When I pass it the first time is shows in the browser like so

 

?page=secure/main&Spage=admin/invoices&s=category&c=ENS%20Metals%20and%20Jewelry,%20Inc.

 

and it echos the full name...

 

When I send it again as a variable it only echos ENS

 

I think the %20 (spaces) are screwing it up

 

Does anyone know why?

 

$c=ENS Metals and Jewelry

 

?page=secure/main&Spage=admin/invoices&s=category&c=$c&p=products

Link to comment
https://forums.phpfreaks.com/topic/104677-i-_get-problems-with-a-_get/
Share on other sites

There really isn't much more code than what you see.

 

Page 1.

<a href=\"page2.php?c=ENS Metals and Jewelry\">GO TO PAGE 2</a>

--------------------------------------------------------------------------------------



[code]
Page 2.

<?

$c=$_GET['c'];

echo $c;    // ON PAGE 2 IT ECHOS: ENS Metals and Jewelry

echo"<a href=\"page3.php?c=$c\">GO TO PAGE 3</a>";

?>


NOTE: On page 2 the address bar reads: page2.php?c=ENS%20Metals%20and%20Jewelry
--------------------------------------------------------------------------------------



Page 3.

<?

$C=$_GET['c'];

echo $c; // ON PAGE 3 IT ECHOS: ENS

?>

[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.