When I am trying to list all the employee names from the database to assign a job for a particular person in the dropdown box. The Output value only show the initial or the First name of Employee. The other names of the employee (Last names) are not posted in the php.
Actually the names after first spaces are missing.
Here is my code...
<pre>
<tr>
<td><label>Assigning To</label></td><td><label>:</label></td>
<td>
<?php
$result = mysqli_query($conn, "SELECT * FROM userdetails WHERE UserGroup='DigitizationArtist' || UserGroup='DigitizationArtistQC' || UserGroup='GraphicArtist' || UserGroup='GraphicArtistQC')");
echo "<select name='ArtistName' value=''>";
echo "<option value=''></option>";
while($r = mysqli_fetch_array($result))
{
echo "<option value=" .$r['Name'] .">".$r['Name']. "</option>";
}
echo "</select>";
?>
</td>
</tr>
<pre>
This is the getting value php code...
$ArtistName = mysqli_real_escape_string($conn, $_POST['ArtistName']);
I am getting the out for "S Gowri Shankar" is "S" I am getting the out for "Selva Kumar" is "Selva"
Please advise. What is wrong in these coding? Else the php always ignore the space after text in checkbox values.