public function editVC(){
//echo"HELLO";
if(isset($_GET['userID'])){
$currentUserID = $_GET['userID'];
}
$vaccineID = $_POST['vaccines'];
$ageID = $_POST['ages'];
$dcomment=$_POST['drcomment'];
if(VaccineModel::editDChildVC($vaccineID,$ageID,$dcomment,$currentUserID)) {
header('Location: https://autovaccines-peldorri.c9users.io/Classes/Views/viewChildVC.php?userID= $currentUserID');
} else {
echo $vaccineID;
echo $dcomment;
echo $currentUserID;
echo"cant add";
}
When it redirects, this is the resulted url
https://autovaccines-peldorri.c9users.io/Classes/Views/viewChildVC.php?userID=%20$currentUserID
I can't seem to figure out why the variable won't be sent to the url, although I have tried echoing the variable $currentUserID and it did echo the correct ID, this means the if condition applies and there is a value in the variable.
