473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP echo _POST problem

Hi,

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" />
</form>

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="www.myURL.com" entered into the form will submit and post like this on the following page: href=\"www.myURL.com\"

This form worked on my previous host just fine but not on my new one. Does anyone have any suggestions?
Feb 19 '07 #1
2 2998
cassbiz
202 100+
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
ronverdonk
4,258 Expert 4TB
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

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

Similar topics

2
by: ozeh | last post by:
Hi, when I used metod post in a form, then i read posted variable and try to print, I have : In FORM text(variable_nr1) = 'test_var' In php <?php echo $_POST; ?> on screen :
13
by: Tony | last post by:
I'm just wondering why it seems most people use "echo" instead of "print". I tend to use "print", probably because I started programming in BASIC back in 78, so it's just familiar. Echo can take...
3
by: news.tpi.pl | last post by:
Hi! What does it mean: <?php echo (isset($_POST) ? $_POST : ""); ?> I don't understand logic of that expression. Anybody can help me? Leszek
5
by: spaghetti | last post by:
Hi I'm still new to this but I think I'm making progress. Below is a functioning script that inserts 4 fields into a database. After advice from a previous post the form is being processed on the...
5
SHOverine
by: SHOverine | last post by:
Hello All. I have a problem with a form that I am trying to create. What happens is: I have a person enter a UserName and select some values using radio buttons. They submit the form, and the next...
2
by: webandwe | last post by:
Hi, Once I pressed submit to delete I want to echo, "record deleted". It is not displaying now, can someone tell me why....It code it at the bottom. Thanks
1
Odisey
by: Odisey | last post by:
Hello, I am still getting these concepts. Help me learn. What is wrong here? Most echos are for testing. Thank you, Odisey <?php #index php script 3.4
4
by: prosad | last post by:
hi; i have two tables in MySQL with: 1. TABLE(stat) column(c_id, FOREIGN KEY) referencing 2. TABLE (complaint) column (id_complaint, PRIMARY KEY). TABLE (complaint) also contain a second...
1
by: webandwe | last post by:
Hi, I got the page login.php that have a script that logs you in and then go to loggedin.php with a piece of code to validate your loged in. The validate stores the username, how can I echo the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.