close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Issue validating apostrophe in a form

Thread began 3/10/2011 3:27 am by Thomas Hill | Last modified 3/11/2011 1:06 pm by Thomas Hill | 2160 views | 4 replies

Thomas Hill

Issue validating apostrophe in a form


I am having an issue validating apostrohpes in a form. Naturally the form works without validation and apostrophes are inserted into the database and displayed correctly. However, as soon as I add validation using alphanumeric and add '?!@ as other characters which I allow, the form returns the following:

user types: it's amazing
Form reloads to show errors with validation: it\'s amazing

To counteract the validation show issue when the existing form reloads, I have used stripslashes so that the \ does not show BUT the apostrophe simple won't take.

I have also tried adding the following at line 1 of my page but the problem persists:


Incidentally, say Warning: This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

I am almost at the point of removing the alphanumeric validation but I know this is bad practise.

Any ideas?


Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...