By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

PHP echo _POST problem

P: 1

I'm having a little trouble using a simple for to post information.
Here is my form.

<form action="testing.php" method="post" target="_blank">
<b>Your Code:</b><br />
<textarea name="code" rows="5" cols="50"></textarea>
<input type="submit" value="Preview" />

Landing page.

<?php echo $_POST["code"]; ?>

When you submit anything with a single or double quotation ( ' or " ), on the landing page a slash ( \ ) is inserted right before the quotation.

This: href="" entered into the form will submit and post like this on the following page: href=\"\"

This form worked on my previous host just fine but not on my new one. Does anyone have any suggestions?
Feb 19 '07 #1
Share this Question
Share on Google+
2 Replies

P: 202
I can't see what the problem is. I uploaded it onto my server, PHP version 5.1.6, and it worked great.

I recommend that you call your host and find out.
Feb 19 '07 #2

Expert 2.5K+
P: 4,258
Just means that magic_quotes is on on you new host server.

Use [php]<?php echo stripslashes($_POST["code"]); ?>[/php] to remove the quotes.

Ronald :cool:
Feb 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.