This is my php file where it creates a session for the user:-
<?php
//starting the session
session_start();
//checking if session of user is set ot not
if(isset($_SESSION['UID'])) {
echo "Welcome, ".$_SESSION['UID'];
}
else {
header("Location: ErrorPage.html");
}
?>
And this is my jQuery file:-
$(document).ready(
function hiding() {
$("#links").hide();
}
);
I want my "#links" to be hidden after a user logs in. How do I include the jQuery file in my if statement in php? I tried:-
include("jqueryFile.js");
require("jqueryFile.js");
But it didn't work.