problems with php programming

I’ve done courses in java, C++, sql, etc.
First time using php and I’m stuck on the starting line, so to speak.
I’m using the Netbeans IDE with xdebug and I have a simple html form in a php file.
The file I included will run and display the echo statement and the form.
If I uncomment the other lines, I get a blank screen and the debugger options are all greyed out.
Yes this is homework, so I’n not asking for specific code, can someone explain to me why
this won’t run?
Kerry

[php]<?php
// if (isset (filter_input(INPUT_POST[‘submit’]))) {
echo"isset";
// $year = filter_input(INPUT_POST[‘years’])

// }else{
?>

quarterly report

Quarterly Report: Choose a year.

2013 2012 2011
<?php // } ?> [/php]

Try this instead :

[php]$submit = filter_input(INPUT_POST, ‘submit’, FILTER_SANITIZE_SPECIAL_CHARS);

if (isset($submit) && $submit == “Submit”) {

$year = filter_input(INPUT_POST, ‘years’, FILTER_SANITIZE_SPECIAL_CHARS);

}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service