output is blank screen no errors displays

this is the code which shows blank screen in my machine i am using php-v5.4 and IIS EXPRESS as my webserver on windows 8.1

<?php ?> logintest <?php /* if the "submit" variable doesn't exist. so form has not been submitted yet display initial page. */ if(!isset($_POST['submit'])) { ?> Enter a number : <? } else { /* if the "submit" variable exist. so form has been submitted. process the form data and display result */ $number = $_POST['number']; if($number > 0) echo "You entered a positive number"; elseif($number < 0) echo "You entered a negative number"; else echo "You entered 0";
        }
    ?>
</body>

The only issue I see quickly, since you didn’t post the code in the proper code tags for the forum like the rules say, is you’re missing a ; here
[php]<?=$_SERVER['PHP_SELF']?>[/php]
Least I’m pretty sure there should be one there, never used that syntax before. Also using that var is a big no no, it’s a security risk.

Sponsor our Newsletter | Privacy Policy | Terms of Service