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
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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.