how to include a jQuery file in php session file? -
This is my php file where it creates a session for the user: -
& Lt ;; PHP / session session_start () start; // Check if the user's session is not set then there is no OT (if isset ($ _ session ['UID'])) {echo "Welcome," $ _ Session ['UID']; } Other {header ("location: error page html"); }? & Gt; And this is my jQuery file: -
$ (document) .ready (hide the function () {$ ("# link"). ( );}); I want a user to log in after hiding my "#links". How do I include a jQuery file in my if statement in PHP? I tried: - include
("jqueryFile.js"); Required ("jqueryFile.js"); But it does not work.
Requirement and include for server-side files, such as php.
All you need to do is
echo & lt; Script type = "text / javascript" src = "jqueryFile.js" & gt; & Lt; / Script & gt; '; If you want to include in the requirement / usage, you should cache your javascript in a .php file
'JqueryFile.php') ;
Comments
Post a Comment