It isn't inserting the module corretly in the database
<p>I have dropdown menu below where it retrieves the possible modules id's and their module'name which the user can select from, from the database.</p>

<p>Below is the code for this:</p>

<pre><code> $moduleHTML = ""; 
       $moduleHTML .= '&lt;select name="module" id="modulesDrop"&gt;'.PHP_EOL;
       $moduleHTML .= '&lt;option value=""&gt;Please Select&lt;/option&gt;'.PHP_EOL;      
            foreach ($courseData['Modules'] as $moduleId =&gt; $moduleData) {        

            $moduleHTML .= "&lt;option value='".$moduleId.' '.$moduleData['ModuleName']."'&gt;" . $moduleId . " - " . $moduleData['ModuleName'] ."&lt;/option&gt;".PHP_EOL;        
  } 
            }
            $moduleHTML .= '&lt;/select&gt;';
</code></pre>

<p>Now when the form is submitted, on the NEXT PAGE I want only the 'ModuleId' to be inserted into the 'ModuleId' field. But instead what it is doing is that it is inserting the moduleId and the first letter of the ModuleName. </p>

<p>For example if the user selects the module 'CHI2520 Systems Strategy' from the drop down menu, then when I insert this in the database, instead of 'CHI2520' being inserted in the 'ModuleId' field, it inserts 'CHI2520 S' in the 'ModuleId'.</p>

<p>How can the insert be fixed so that it only inserts the Module Id and not the Module Id and the first letter of the Module Name?</p>

<p>Below is the code on the INSERT VALUES into the database:</p>

<pre><code>$sql="INSERT INTO Session (ModuleId)
VALUES
(' ". mysql_real_escape_string( $_POST['module'] ) . "')";
</code></pre>
