This is the code that i've been using.. Please see below
The code works fine but have problems when a field contain quotes, double quotes and commas.
Ex : when $addr = "address 1, sample's street."
This would cause an error when i try to save it into the database. the query string would give me this. Please see below
<?php
/* for example the implode results would be ('thomas','17','5 feet','60 kilograms','address 1, sample's street.') */
$query = "INSERT INTO table_name
(`name`, `age`, `height`, `weight`, `address`)
VALUES ('thomas','17','5 feet','60 kilograms','address 1, sample's street.');
?>
as you can see the string on Values has an error since the bold information has a wrong format..
can someone help me modify the code so that i could save my information whether or not it has a comma, quote and double quote?
thanks guys