PDA

View Full Version : [SOLVED] I think I broke PHP ( '&&' must mean '||' )



pqwoerituytrueiwoq
July 7th, 2013, 03:35 AM
EDIT: needed parenthesis on the fist condition
----------------

here is a screenshot of my issue:
http://i.imgur.com/8kH3gzc.png
and here is the source code:

<?php
echo "type=".$_GET['type']."\nraw=".(isset($_GET['raw'])?$_GET['raw']:'NOT SET')."\n";

if(isset($_GET['type'])?$_GET['type']:0=='pdf' && !isset($_GET['raw']))
echo "Condition passed";
else
echo "Condition failed";
?>