open url while passing post data with jquery

Solutions on MaxInterview for open url while passing post data with jquery by the best coders in the world

showing results for - "open url while passing post data with jquery"
Federica
13 Apr 2016
1$(button).click(function(){
2    var s_name=$("#txtbox").val(); 
3 $.post("http://localhost/AJAX/save_session.php",
4{
5  student_name: s_name,
6
7},
8function(data){
9
10  location.href='http://localhost/AJAX/result.php';
11});
12  
13  //    On http://localhost/AJAX/save_session.php
14  <?php
15session_start();
16$_SESSION["name"]=$_POST['student_name'];
17
18?>
19  // On result.php
20  
21  <?php
22  session_start();
23  include("config.php");
24  $name=$_SESSION["name"];
25?>