Stuck for months.... Passing values from .php to Storyline

Oct 13, 2015

Hi, we managed to return values from an ID number entered by learner in storyline course from our msql dbase. The values returned from the dbase is correct in the .php.

We are now stuck on how we can set the variables in storyline with the values in the .php file.  How can we pass this values into storyline and set the variables within storyline?

So far if we push it to the URL is only adds these values on the URL (address) and not the variables within storyline.

Below is the .php code with the values.

<?php

$IDNum = @ $_GET['idvalue'];
//var_dump ($IDNum);
$connect = new mysqli("192.168.0.1", "root", "", "GTSSchool");

$sql = "SELECT l.na_id_number AS na_id_number, l.first_name AS firstname, l.last_name AS lastname, tc.testing_centre_name AS testingcenter FROM learners l, testing_centres tc WHERE l.testing_centre_id = tc.id AND na_id_number='$IDNum';";
$rec = $connect->query($sql);
if(!$rec || !$rec->num_rows)
{
echo "No data";
}else
{
while($row = $rec->fetch_array())
{
$idvalue = $row['na_id_number'];
$firstname = $row['firstname'];
$lastname = $row['lastname'];
$testingcenter = $row['testingcenter'];
}
header("Location: http://localhost/CLLT/story.html?firstname=$firstname&lastname=$lastname&testingcenter=$testingcenter&idvalue=$idvalue");
}

?>

3 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.