Insert Text with apostrophies

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mistux
Forum Newbie
Posts: 5
Joined: Wed Oct 22, 2003 6:54 pm
Location: Indiana, USA

Insert Text with apostrophies

Post by mistux »

I have the following query that does not work when the text that is past to it from a form has apostropies, or pound signs, or other kinds of characters in the '$new_url' or the $new_note'.

Code: Select all

(!mysql_query( "insert into onmylist_person (username, person, notes) values ('$valid_user', '$new_url', '$new_note')"))


What do I need to do to it to make it work?

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply