Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7968565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:05:50+00:00 2026-06-04T07:05:50+00:00

This is my code: URL: http://www.mysite.com/t.php?title=The%20Police%20-%20Don’t%20Stand%20So%20Close%20to%20Me%20’86%20- PHP: <?php if(!empty($_GET[‘title’])){ > <form method=post action=t.php?done=yes enctype=multipart/form-data>

  • 0

This is my code:

URL:

http://www.mysite.com/t.php?title=The%20Police%20-%20Don't%20Stand%20So%20Close%20to%20Me%20'86%20-

PHP:

<?php if(!empty($_GET['title'])){ >
<form method="post" action="t.php?done=yes" enctype="multipart/form-data">
<input type="text" name="title" 
<?php echo "value=\"".htmlspecialchars($_GET['title'])."\""; ?> 
> 
<input name="submit" value="Submit" type="submit" />
</form>
<?php } >


<?php if(!empty($_POST['title'])){ 
echo mysql_real_escape_string($_POST['title']);
// I have to put the string in a database ( I haven't added that part )
 } >

If I follow the first URL and then submit the form, I get this string:

The Police - Don\\\'t Stand So Close to Me \\\'86 -

instead of:

The Police - Don't Stand So Close to Me '86 -

Why ? How can I get the last string ?

Thanks

.

EDIT:

I have just discovered that magic_quotes_gpc is ON because get_magic_quotes_gpc() return TRUE.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:05:50+00:00Added an answer on June 4, 2026 at 7:05 am

    It may because this string

    The Police - Don't Stand So Close to Me '86 -
    

    By magic_quotes_gpc on on your php.ini give you qoute escape

    The Police - Don\'t Stand So Close to Me \'86 -
    

    And then

    echo mysql_real_escape_string($_POST['title']);
    

    escape the ' and \ become

    The Police - Don\\\'t Stand So Close to Me \\\'86 -
    

    Try on your code to set

    ini_set ( 'magic_quotes_gpc', '0' );
    

    If not, you can check it by coding and remove slashes

    if (get_magic_quotes_gpc()) {
        $title = stripslashes($_POST['title']);
    }
    else {
        $title = $_POST['title'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to reqwrite a URL www.mysite.com/this/index.php to www.mysite.com I knwo it's a bit
This is the current URL of my images - http://www.mysite.com/files/thumb/133/595 While inspecting it in
When I run this code url = ('http://maps.google.com/maps/nav?'+ 'q=from%3A'+from_address+ '+to%3A'+to_address+ '&output=json&oe=utf8&key='+api_key) request = urllib2.Request(url)
I keep getting this Magento error emailed to myself: URL: http://mysite.com/sendfriend/product/send/id/1/ IP Address: 66.249.65.69
I am having difficulty with code igniter routing. http://www.mysite.com goes to the right controller
I'm trying to retrieve articles through wikipedia API using this code $url = 'http://en.wikipedia.org/w/api.php?action=parse&page=example&format=json&prop=text';
I have these links on my site <a rel=nofollow href=http://www.facebook.com/share.php?u=<;url> class=fb_share_button onclick=return fbs_click('http://site.com/profile/4') target=_blank
I have a code lik this <?php $jsonurl = http://api.tamilmagazine.com/; $json = file_get_contents($jsonurl,0,null,null); $json_output
This is my code: $('body').css('cursor','url(http://5211.91.tc/imcur/020.cur),auto'); Thanks
The html code is pasted into this url http://jsfiddle.net/nzYjV/ The div (id=input) contains the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.