473,395 Members | 1,452 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,395 software developers and data experts.

text field double quotes

Lets say we have double quotes in a string and we want to set a
textfield to that value:

$string = ' my "string"';

<input type="text" value="$string">

The double quotes will wreck havoc.

I thought of this:

$string=addcslashes($string'],'"');

But that didn't work. There must be a php function for doing this.

Jeff
Jun 27 '08 #1
1 3608
..oO(Jeff)
Lets say we have double quotes in a string and we want to set a
textfield to that value:

$string = ' my "string"';

<input type="text" value="$string">

The double quotes will wreck havoc.

I thought of this:

$string=addcslashes($string'],'"');

But that didn't work. There must be a php function for doing this.
htmlspecialchars()

Micha
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Drifter | last post by:
The quote below is part of the information i want to save to a MS Access database - or update, as the case may be. The original database was built a long time ago, and looking at the code for...
1
by: Thomas Matthews | last post by:
Hi, My goal is to extract a text field into a string type. The text field is from a buffer (array) of characters and delimited by white space or double quotes. *** I'm looking to perform this...
8
by: threepins | last post by:
Hi, I have a website using a SQL Server database to store all of it's data. Retrieving data and writing basic data back is fine, however, when i go to update one table that has a text field in...
3
by: Luke Chung | last post by:
When I try to enter "" in a field or text box, it disappears. Is it possible to enter a pair of double quotes with no spaces between the quotes into a field? Luke
13
by: Richard Hollenbeck | last post by:
To prevent future apostrophe bugs and errors, isn't it just simpler to forbid an apostrophe from being entered into a text field? For example, couldn't "Alice's Restaurant" be changed to "Alices...
5
by: geotso | last post by:
Here is the scenario: 1. I have a table (tblCalendar) with the following fields: caldID caldDate caldTitle caldInfo nWinW nWinH
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
1
by: Marc Miller | last post by:
Hello everyone, First I'll address this as a textfile manipulation question and if there is no answer there, then I'll need to ask it as a vb ADO question. I have a text file that I'm reading...
2
by: lwhite | last post by:
MS SQL 2000 sp4 on WinXp Pro SP2 I am very new to this so please let me know what I can do to make it easier for you to understand the problem. I have a non delimited text file. This text...
2
by: Denise | last post by:
Front end is Access 2002, back end is linked Oracle tables. My users need to describe things in feet and inches and want to use the standard ' and " abbrevations. On a testing form I go to a...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.