Jump to content

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

 

 

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.