Jump to content

Valid variables to pass to script


huajmbo

Recommended Posts

Hi guys, hopefully you can help with a question that I've been searching for for the last 2 hours.  :D

 

Can you pass a variable to a php script that includes '--'

 

If I call:  test.php?data=eQ--tR   My script fails to run with a time out

 

But: test.php?data=eQ-tR  Works fine

 

Is this a limitation of PHP ?

 

Many thanks,

 

Ed

 

Link to comment
https://forums.phpfreaks.com/topic/198942-valid-variables-to-pass-to-script/
Share on other sites

Hi TeddyKiller,

 

I was having problems with a script that keeps failing. So I'm now down to a "Hello World" script. If I put the url with Firefox: test.php?anything=aa--aa it fails. Unfortunately I need to be able to pass a variable that includes --

 

Thanks,

 

Ed

Thanks guys,

 

I've just tried $link = "hello.php?id=".urlencode("ak--bj");

 

<?php
$link = "hello.php?id=".urlencode("ak--bj");
header("Location: http://test.rarotech.net/$link"); 
?>

 

And that  fails too

 

With the link : $link = "hello.php?id=".urlencode("ak-bj");  it works

 

I also I can't change the -- in the url, it's calling my function from a bank system as a response to a query.

 

Any help appreciated.

 

Thanks Ed

 

 

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.