PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
eyal
Forum Newbie
Posts: 19 Joined: Mon Jun 19, 2006 11:03 am
Post
by eyal » Sun Sep 24, 2006 10:01 am
Hello,
When I'm inserting the char ' php thinks I'm done writing, altough it's only part of my sentence.
For example, if I have a want to enter a sentece: I'm here
Php will read it like this
Code: Select all
mysql_query("INSERT INTO table(field) VALUES('I'm here')")
What should I do?
Thank you.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Sep 24, 2006 10:16 am
eyal
Forum Newbie
Posts: 19 Joined: Mon Jun 19, 2006 11:03 am
Post
by eyal » Sun Sep 24, 2006 10:43 am
Thank you, Altough I'm having an error when I'm using the function:
Fatal error: Call to undefined function: mysql_real_escape_string() in c:\apache\htdocs\direct_site\try3\3.php on line 45
After I wrote:
Code: Select all
$var=mysql_real_escape_string($var);
Any Idea what should I do?
Thank once again.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Sep 24, 2006 10:45 am
It would appear you're using a fairly old version of PHP.
mysql_escape_string() then.