I am trying to use the following code to pass information to another site but it keeps giving me 开发者_StackOverflow社区an error:
Invalid Code:
$a = $b->doIt("James",$_SESSION['JNum'],"Frank"); 
Valid Sample Code:
$a = $b->doIt("James","123456","Frank");
In the first example, the page returns "number field is required". The second piece of sample code returns valid results. Do to the nature of this project though I need to pass the id number as they are stored in SESSION variables.
What am I missing?
Did you start the session with:
session_start();
you're missing $_SESSION['JNum']
var_dump($_SESSION['JNum']);
Not only see if $_SESSION['JNum'] is set, using var_dump, but also make sure sessions are started at the top of yours script:
session_start();
var_dump($_SESSION['JNum']);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论