2 Questions, Form handling and Reflection
Posted: Fri Jan 08, 2010 5:12 pm
Hello
I want to create something which I called automatic form handling system
using only xml file.
All I want to is to create xml file that contains all validation properties (length, regex etc), so a js script and php can refer to it.
I want to find correct form by name attribute, which when I want to use with php I must use hidden field.
Is this possible that somebody can change tag attribute name? ex. <input type="hidden" name="frmname" value="frm1">
If yes how can I else know that request came by a form submitting? I know about $_POST['submit'], I don't know about $_GET, but have no idea that I can trust to it.
About Reflection
I wonder if I can use reflection for dynamic creating basic sql statements from model object,using the same names of properties that db tables has,
what about efficiency (in using xml for validation too)??
Could somebody give me advice?
I want to create something which I called automatic form handling system
All I want to is to create xml file that contains all validation properties (length, regex etc), so a js script and php can refer to it.
I want to find correct form by name attribute, which when I want to use with php I must use hidden field.
Is this possible that somebody can change tag attribute name? ex. <input type="hidden" name="frmname" value="frm1">
If yes how can I else know that request came by a form submitting? I know about $_POST['submit'], I don't know about $_GET, but have no idea that I can trust to it.
About Reflection
I wonder if I can use reflection for dynamic creating basic sql statements from model object,using the same names of properties that db tables has,
what about efficiency (in using xml for validation too)??
Could somebody give me advice?