In a form,
I am displaying a select box value , based on that select box value i show two more select boxes using ajax in div id.
And I don not know about session, I want to save that in session using ajax . How to do?
AntonyRayan 15 Posting Whiz in Training
Recommended Answers
Jump to PostTrigger an ajax to post to a process.php with the code
process.phpif(isset($_POST['myVal']){ session_start(); $_SESSION['myRef'] = $_POST['myVal']; }
Jump to Postajax:
$.ajax({ url:"process.php", type: 'POST', data: {"myVal":"The data I wish to be store into session"} });
myVal will be the key of posting that contain the things you wish to store.
myRef will be the key of the session variable that you wish to access it …
All 5 Replies
ryantroop 177 Practically a Master Poster
AntonyRayan 15 Posting Whiz in Training
lps 71 Posting Pro in Training
AntonyRayan 15 Posting Whiz in Training
lps 71 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.