Jump to content

[SOLVED] Escpaing Charcters


Aravinthan

Recommended Posts

Hi,

 

I have a little problem.

 

I am fetching data from MYSQL database, with the fied name, Name.

Ok so the thing is some of the name have single quotes in them.

SO when I want to pass it via $GET to another page, it doesnt show the full name...

 

The other page, takes the value and prints information for that name...

 

I tried addslahses, without any help...

Is there a word-around?

 

 

Thanks for your help,

Ara

Link to comment
https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/
Share on other sites

Hi,

 

I have a little problem.

 

I am fetching data from MYSQL database, with the fied name, Name.

Ok so the thing is some of the name have single quotes in them.

SO when I want to pass it via $GET to another page, it doesnt show the full name...

 

The other page, takes the value and prints information for that name...

 

I tried addslahses, without any help...

Is there a word-around?

 

 

Thanks for your help,

Ara

 

Have you tried urlencode for the value you send via GET?

Hi,

OK so I dont get the problem.

 

The link says:

name=Ryan%20O%27Reilly

 

And %20 = Space

%27 = single quote...

 

So far so good right no?

 

Well not quite, I put it in a variable:

$player = $_GET['name'];

And when I echo it out:

Ryan O\'Reilly

 

Where did that slash comes from?

 

In the link, there is no slash....

 

Thanks for your help,

Ara

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.