Hello,
I have this code that is inserted into an option tag in a form drop down.
<?php if($_SESSION['session_name'] == "1" && $_SERVER['SCRIPT_NAME'] == "/index.php"){ echo "selected='selected'"; } ?>
Is there a better way to do this as there are many options that have this code in.
The only difference in each option is the session_name is different.
Maybe a function?
Thanks
Ben