How can I destroy a session in php which set by jquery.
The code to register the session is:
$('#psubmit').click(function() {
$.post("single-us_portfolio.php", {"myusername": "myusername"});
});
and to access session on custom.php the code is:
session_start();
$_SESSION["myusername"] = $_POST["myusername"];
if(!session_is_registered(myusername)){
echo '<meta http-equiv="Refresh" content="1; url=http://www.ididthisfilm.com/lex_tmp2/the-lexicon/">';
}
Now I want to destroy this session on the this form submission:
<form >
<input type="file" class="js-file-validation-image" name="file" id="filed" required="required">
<input type="submit" value="PUBLISH PHOTO" id="hello" name="publishpost" >
</form>