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 6000265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:40:07+00:00 2026-05-23T00:40:07+00:00

im letting my users type in texts, then take them to server side php

  • 0

im letting my users type in texts, then take them to server side php and process them, and if everything goes as it should, i just append the text with jquery without the page having to load all over again.

This is the procedure:

$post_text = htmlspecialchars(mysql_real_escape_string($_POST['post_text']));

some logic…

everything ok!

stripslashes(str_replace("\\n", "", $post_text))

and then i send all the nessesary data witj json

echo json_encode($return); 

on the client side i append the html chunk saved in a variable from the server side.

this seems to work on localhost, it removes all the slashes and so on, but online it just doenst remove the slashes, and they keep coming up, when i hit refresh they dissapear becouse then its a

stripslashes($comment['statusmsg_text'])

written out with php straight from the database. Is it the json that adds some extra stuff? i dont get it becouse it works perfectly on localhost.

best of regards,
alexander

  • 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-05-23T00:40:08+00:00Added an answer on May 23, 2026 at 12:40 am

    It may be, that on your server and your localhost the magic_quotes_gpc directive is set differently, so your string is double encoded on server side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're letting users search a database from a single text input and I'm having
I'm using Forms Authentication (and the built in Login controls) and letting users click
I have a strange phenomenon while continuously instantiating a com-wrapper and then letting the
It is causing so much trouble in terms of development just by letting database
I'm letting users search my database for data by city. My query looks like:
I am trying to update mysql data by letting users submit a form. The
I have some ad-hoc reporting users hitting some SQL Server views. Occasionally the read
Summary We have an ASP.NET application that allows users to query a SQL Server
I'm letting users select a date/time for a scheduled task to run, using two
I am letting users upload a file and i am storing the name of

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.