Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

PHP coding and MySql database table character help

Codes here !

Moderators: macek, egami, gesf

PHP coding and MySql database table character help

Postby ianhaney » Tue Oct 30, 2012 5:14 am

Hello

I have got a feedback form on my website that when a customer writes a testimonial it gets automatically added to my testimonials.php page but have noticed that if a customers writes the word can't for example, the testimonial is not displayed on the website due to the character ' in the word betwen the n and t and have found out it is to do with the following line I think

Code: Select all
$query    =    "insert into testimonials(name,testimonial)values('$name','$testimonial')";


How would I change that line or insert a bit of coding so that characters like ' and others are displayed when words that have them characters in are added to the database table

Kind regards

Ian
ianhaney
New php-forum User
New php-forum User
 
Posts: 27
Joined: Tue May 01, 2012 12:30 pm

Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron