How to display module name in an echo on a separate page?
<p>I have this code below in the "module.php" script where it displays options in a drop down menu of each ModuleId and Module Name:</p>

<pre><code> $sql = "
    SELECT cm.CourseId, cm.ModuleId, 
    c.CourseName,
    m.ModuleName
    FROM Course c
    INNER JOIN Course_Module cm ON c.CourseId = cm.CourseId
    JOIN Module m ON cm.ModuleId = m.ModuleId
    WHERE
    (c.CourseId = ?)
    ORDER BY c.CourseId, m.ModuleId
    "; 

     $sqlstmt=$mysqli-&gt;prepare($sql);

     $sqlstmt-&gt;bind_param("s",$course);

     $sqlstmt-&gt;execute(); 

     $sqlstmt-&gt;bind_result($dbCourseId,$dbModuleId,$dbCourseName,$dbModuleName);


    $moduleHTML  = "";  

     while($sqlstmt-&gt;fetch()) { 
        $moduleHTML .= "&lt;option value='$dbModuleId'&gt;" . $dbModuleId . " - " . $dbModuleName . "&lt;/option&gt;".PHP_EOL;   
    } 


    echo $moduleHTML; 

     $sqlstmt-&gt;execute();
</code></pre>

<p>Now I want to echo the ModuleId and Module Name on a separate page (editsession.php), now I have managed to echo the Module Idwhen doing <code>$_POST['modules']</code> but my question is that how do I echo the Module Name as well?</p>

<pre><code>    $moduleHTML = "";  
    $moduleHTML .= '&lt;select name="modules" id="modulesDrop"&gt;'.PHP_EOL; 
    $moduleHTML .= '&lt;option value=""&gt;Please Select&lt;/option&gt;'.PHP_EOL;  
    $moduleHTML .= '&lt;/select&gt;'; 

if (isset($_POST['moduleSubmit'])) {    

$outputmodule = ""; 
$outputmodule = "&lt;p&gt;&lt;strong&gt;Module:&lt;/strong&gt; " . $_POST['modules'] .  " - "  . "//module name" . "&lt;/p&gt;"; 
</code></pre>
