Hi List
I don't know what I'm doing wrong:
Firstly, I upgraded from 4.0.1 to 4.3.1 and made sure that I have
similar settings in php.ini wrt register_globals and magic_quotes.
I now have problems with some of my apps:
For instance:
IN a mysql db, I would have a name like :[ whatever
IN a mysql db, I would have a name like :[ whatever whatever ]
I do a select on the table and then echo the name on a page, as well as
add it to a url:
page.php?myvar=$myvar
where $myvar contains the [ whatever whatever ]
Now, when I try to echo $myvar on the page.php, I don't get the entire
?PHP
if ($_GET['x']=='')
{$i='whatever Whatever';
echo 'a href=get.php?x='.urlencode($i).'link/a';
}
else
echo 'x is '.urldecode($_GET['x']);
Incomming GET values are urldecoded automaticaly, no need to do this.
?
and the url looks
like:http://www.X.nl/get.php?x=whatever+%22Whatever%22
OK, this is the URL that my code produces after it get's the my_var from
the mysql table.
my_var in the table is = whatever whatever whatever whatever
So I do a select and I do a $my_var = $myrow['my_var'] (after all the
proper mumbo jumbo about the $myrow = mysql_fetc_assoc...etc.)
I then do a
(cutted the part about sending a var as get)
page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=blabla
ok so here the variable is still complete, including slashes and quotes.
And now, on page.php
If I do an
echo stripslashes($my_var);
I get exactly this:
whatever
Hi lists ( and all the guys trying to help me)
Firstly
SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.
What i failed to mention in my stupidity, was that I echoed the variable
as the value of a form input text field, so I actually messed up
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!
Hi lists ( and all the guys trying to help me)
Firstly
SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.
What i failed to mention in my stupidity
, 2003 8:49 AM
To: Chris Hayes
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!
Hi lists ( and all the guys trying to help me)
Firstly
SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.
What i
8 matches
Mail list logo