PHP Classes

AddInput "TYPE"=>"select"

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  All threads  >  AddInput "TYPE"=>"select"  >  (Un) Subscribe thread alerts  
Subject:AddInput "TYPE"=>"select"
Summary:AddInput "TYPE"=>"select"
Date:2014-03-26 17:59:07
Update:2014-03-28 04:24:02

  1. AddInput "TYPE"=>"select"   Reply   Report abuse  
francesco - 2014-03-26 17:59:08
Hi, I have try to input an array with special characters like a etc, latin chars, and I have as result an empty value.
Every help will be appreciate

Best regards

  2. Re: AddInput "TYPE"=>"select"   Reply   Report abuse  
Manuel Lemos - 2014-03-26 18:17:49 - In reply to message 1 from francesco
Can you please show the complete command you are using to call the AddInput function?

  3. Re: AddInput "TYPE"=>"select"   Reply   Report abuse  
francesco - 2014-03-27 08:18:32 - In reply to message 2 from Manuel Lemos
this is the code,
"pick"=>"Pick a credit card type",
"mastercard"=>"Master Card",
"amex"=>"American Express",
"dinersclub"=>"Diners Club",
"carteblanche"=>"Carte Blanche",
"0"=>"L rout "
"Pick the credit card type or set to Unknown if you do not know the type.",
"ValidationErrorMessage"=>"It was not specified a valid credit card type.",
"LABEL"=>"Credit card t<u>y</u>pe",
As you can see, in OPTIONS I've put latin char, you can see the result in at this page:, as you can the last voice in the menu select is empty, the php's version is 5.4.4, before with 5.3 I hadn't this problem, am I missing something?

Thank you

  4. Re: AddInput "TYPE"=>"select"   Reply   Report abuse  
Manuel Lemos - 2014-03-27 11:04:39 - In reply to message 3 from francesco
Yes, PHP 5.4 changed the default encoding of HTMLSpecialChars and HTMLEntities, so it was failing.

I just uploaded a fixed version that assumes the encoding to be whatever you put in the class variable $encoding.

Thanks for reporting. Just let me know if you find any more issues.

  5. Re: AddInput "TYPE"=>"select"   Reply   Report abuse  
francesco - 2014-03-27 14:12:04 - In reply to message 4 from Manuel Lemos
Thank you, but, I don't understand what I have to do to see the value.
I've fixed the problem with utf8_encode.

  6. Re: AddInput "TYPE"=>"select"   Reply   Report abuse  
Manuel Lemos - 2014-03-28 04:24:02 - In reply to message 5 from francesco
You just need to download and install the latest version.

It seems you are also using text in your source code encoded as iso-8859-1. In that case you need to make sure your page HTML is outputted also in iso-8859-1 character set.

In that case make sure your page has a statement like this in the <head> section:

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">