Hey everyone,
I just recently found out that PW exists, and I really like it so far, but I am still in the "get-used-to"-Phase
I am creating a small Website for a Friend, and stumbled across this Thread while trying to get a Email-Form done for him.
There is just a little part of the Code that is not exactly clear to me:
//to sanitize input
$name = $sanitizer->text($input->post->name);
$email = $sanitizer->email($form->get("email")->value);
I understand what it does, but why is the syntax so different, considering both lines do almost the same?
To be more specific why is it not:
//to sanitize input
$name = $sanitizer->text($input->post->name);
$email = $sanitizer->email($input->post->email);
or:
//to sanitize input
$name = $sanitizer->text($form->get("name")->value);
$email = $sanitizer->email($form->get("email")->value);
?
Thanks in advance!
PS: Great work <- for this Tutorial, this CMS and this community!