473,385 Members | 1,813 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.

a textbox with character like ", how to insert it to database?

123 100+
a textbox with character like ", how to insert it to database?


when form submit, it seem the insert data to database is okay
but it skip everything after the character ", why?

thanks.
Nov 7 '09 #1
1 2022
TheServant
1,168 Expert 1GB
mysql_real_escape_string() will escape characters that are unfriendly for MySQL and PHP generally, but you should be filtering and checking every input from the user to protect yourself from SQL injection. That link is a good beginners tutorial, but you should read some other articles which will be revealed by a quick Google search.

You should also look into htmlspecialchars() which will convert common symbols to their HTML character code. Useful tools on your PHP journey.
Nov 7 '09 #2

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

Similar topics

3
by: Bill MacLean | last post by:
-- Example Schema posted at end of message: --- For reporting purposes, I need to build a single comma delimited string of values from the "many" table of a database. The easiest way to see...
10
by: M Bourgon | last post by:
I'm trying to figure out how to find the last whitespace character in a varchar string. To complicate things, it's not just spaces that I'm looking for, but certain ascii characters (otherwise,...
6
by: shariffshiraz | last post by:
I am using a FormView, Insert Template. I have 3 textboxes which are bound. I would like to use a default (static) value in one of the textboxes. Here's the (relevant) sample code: ...
4
by: jason.awlt | last post by:
Greetings, I recently being bugged by the following error on my DB2. SQL0902C SQLSTATE = 58005 Reason Code = 14 This error comes out everytime i tried to insert some record to a table...
5
by: ameen.abdullah | last post by:
Hi Guys, I have a textbox in windows form that should only accept alphabets, numbers, spaces and underscore. If the textbox contains anyother character it should display a msg at the time of...
3
by: =?Utf-8?B?YWVzcGVy?= | last post by:
I have a windows forms application with a TextBox display. I use the following code to display a line in the TextBox: ...... statusTextBox.AppendText(message + "\n"); ....... I just want the...
0
by: jeoffh | last post by:
Background: I am trying to "merge" some attributes into an existing XML column in my MS SQL 2005 database. The general idea is that I have an XML column in a table and I would like to update/delete...
3
by: blazeboy | last post by:
Hello, I am using a SQL data source to insert records into a table. The table uses a GUID as the primary key (GoalEventID), and a GUID for a second field (GoalID) as a foreign key. When I call...
1
by: Kageoni2 | last post by:
I'm trying to add new records to my database using 4 textboxes, one for each field in my databases table. I've got ID, Firstname, Surname and Course. But I can't figure out at all how to link...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.