I have a login script in PHP that works very well and redirects the user back to the page they requested before login.
What I have done recently is added some Javascript to give instant errors if the user inputs something wrong, This is working as expected also.
What I would like to do is run a very small piece of PHP code only if Javascript is disabled but not to run otherwise.
This is because I am trying to make my site seamless for those who have javascript disabled also...
The piece of code on my PHP page is:
Code: Select all
$returntopage = 'pageiwant.php';
include('anotherpage.php');I have tried <noscript> tags around it but that did not work...
I know there is no way in PHP to check if javascript is disabled or not but was hoping someone here would have another idea for just including the above in my php page if javascript is disabled?
thanks for any help and if you need more info please ask...
Many Thanks