Page 1 of 1

due to space it gives above error- Parameter passing

Posted: Mon Aug 21, 2006 7:18 am
by ujbandara
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

Using java program I send values as parameter of URL.
Ex- as customer name I send “ Saman Silva” and send.

But because of space between first name and last name, it gives error. As error it says “The Parameter is incorrect”

Code: Select all

<?php 

$cName 		= $_GET['cName'];  

Echo $Name

?>

cName value should be Saman Silva, but due to space it gives above error.


Thanks,
Upul

:?:


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Re: due to space it gives above error- Parameter passing

Posted: Mon Aug 21, 2006 8:59 am
by feyd
ujbandara wrote:cName value should be Saman Silva, but due to space it gives above error.
Who is "it"? I doubt it'd be PHP. The only error I see if you echoing a nonexistant variable: $cName vs $Name, two different things.

Posted: Mon Aug 21, 2006 11:19 pm
by ujbandara
ok ok...
we say that it is

Echo $cName

but even though it gives didnt acess space character...

Posted: Mon Aug 21, 2006 11:23 pm
by feyd
echo $_SERVER['QUERY_STRING'] and post it please.

You may need to look at your page source to get the full output of the echo.