what is the best way to check a parameter is set in PHP within jQuery template?
I have this code:
var custID = '<?php echo htmlentities( $_GET['custID'] ); ?>';
I need to check that it is set, if it is set then echo that value, if it is not produce an error.
i'd say:
<?php
if(isset($_GET['custID']))echo "var custID = '".$_GET['custID']."';";
else echo "alert('error');";
?>