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
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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.