Jump to content

[SOLVED] PHP & MySQL use of Hyphen/Quotes in Data


TRI0N

Recommended Posts

So I'm taking that the following will work then?

 

mysql_query("INSERT INTO clients VALUES('NULL','$client_id','$l_name','$f_name','mysql_real_escape_string($event_name)')") OR die(mysql_error());

 

This will allow the correct input of a form for Event Name to be placed into the MySQL data field with the value of: Mike's Party

 

Rather then: Mike

MySQL Error?

 

Thanks I will give it a shot.

So I'm taking that the following will work then?

 

mysql_query("INSERT INTO clients VALUES('NULL','$client_id','$l_name','$f_name','mysql_real_escape_string($event_name)')") OR die(mysql_error());

 

This will allow the correct input of a form for Event Name to be placed into the MySQL data field with the value of: Mike's Party

 

Rather then: Mike

MySQL Error?

 

Thanks I will give it a shot.

It's a PHP function... you can't pass it to mysql.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.