I'm trying to pass a variable from one php file to a second one. The second php file is called via a javascript popup like this:
<input type="button" name="opener" value="Volunteer" onClick="popUp();">
The PopUp code is as follows:
function popUp(){
if (wi) wi.close();
var level= $level;
wi=window.open('adddata.php?'+level,"","width=800,height=400,left=50,top=400,location=no,scrollbars=no,status=no");
}
Iwant to use the level variable in the second popup php page to get data from a db. Here is how I am calling the $level variable in the second php page:
<?php $level = $_GET['level'];
echo "level is $level"; ?>
This is not working, so I'm obviously not doing something right. Does anyone have any suggestions?
Oh, the level variable itself is passed from another php page - this is being passed correctly, so I'm sure it's my javascript (ok, not so sure....:-)