I like to use forms the same way it's used in registerview.php. I find it more simple and I think it's a good example.
Unless it's ajax, you don't need to have the action code in a different function at all:
In registerview.php you will notice this line:
$securityField->add(new Button("Register", "submit", "submit"));
The form is sending through POST and you might notce the "submit" in the button above:
if($mysidia->input->post("submit"){
//means the button was clicked, check sent data here
}
And all inputs can be checked like that:
$requiredField->add(new TextField("username"));
$mysidia->input->post("username");//in register.php
---
You want a class in the classes folder or to create a new page?
__________________
asp.net stole my soul.
Last edited by IntoRain; 07-04-2014 at 02:50 PM.
|