I have this php code in my register.php file:
// include the Zebra_Form class
require 'system/Zebra_Form.php';
// instantiate a Zebra_Form object
$form = new Zebra_Form('register_form');
I now want to add action which will go to action=”?do=register”
This is the class Zebra_Form:
void Zebra_Form (
string $name ,
[ string $method = 'POST'] ,
[ string $action = ''] ,
[ array $attributes = ''] )
Please guide me where to write action URL.
Assuming you really want “?do=register” as your action:
The action in your Zebra_Form is the third parameter. You have to explicitly specify a value for the second option parameter in order to be able to set the third parameter. I’m assuming you want ‘POST’ here which you usually would.