close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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 Jason Byrnes | 2044 views | 4 replies |

Thomas Hill

Issue validating apostrophe in a form

Hi,

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:

<?php
ini_set('magic_quotes_gpc','on');
?>

Incidentally, php.net 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?

Tom

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of your page so I can see how it is configured.

Sign in to reply to this post

Thomas Hill

File attached

Attached Files
page.zip
Sign in to reply to this post

Thomas Hill

Solved

Hi,

After 2 days of playing around I discovered if I put the characters in the following order in the "Other" box of the Alphanumeric Validation, it works. However, the characters must be enclosed by [] or it will not work.

[!\"#£$%'()*+,.:;?_`-]

Why is this? Or is it a bug?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

that's odd, I have not been able to reproduce the error, the square brackets should not have an effect on the validation of extra characters except to add the square brackets as a part of the allowed extra characters.

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...