I have a very basic validation script using PHP, and I want to set a cookie with jQuery Cookie plugin if they are validated. Being very new to PHP, I don't know how to code a Javascript function here:
if($validated) {
//SET jQUERY COOKIE HERE: $.cookie('COOKIE_NAME', 'COOKIE_INFO', { expires: 1, path: '/' });)
header("Location: correct.php");
} else {
header("Location: incorrect.php");
}
I know I can use PHP for this, but later on I need to access the cookie in a jQuery function, and being far more familiar with client-side, I'd like it to be done using jQuery Cookie plugin.
Any guidance would be much appreciated!