Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP to MySQL drop down list no longer passing value
- <tr><td align='right'>Mother Tongue:</td>
- <td><select name="MotherTongue">
- <?
- while($row = mysql_fetch_array($mothertonguesql)) {
- if ($row['Language'] == $mothertongue){
- ?>
- <option selected value="<?=$row['Language']?>"><?=$row['Language']?></option>
- <?
- }
- else {
- ?>
- <option value="<?=$row['Language']?>"><?=$row['Language']?></option>
- <?
- }}
- ?>
- </select>
- </td>
- </tr>
- $MotherTongue=$_POST['MotherTongue'];
- $MotherTongue = mysql_real_escape_string($MotherTongue);
- $sql="UPDATE Teacher SET Password='$Password', FirstName='$FirstName', Surname='$Surname', Address1 = '$Address1', Address2='$Address2', PLZ='$PLZ', City='$City', Country='$Country', TelNo='$TelNo', EmailAddress='$EmailAddress', MotherTongue='$MotherTongue', CanTeachLang1='$CanTeachLang1', CanTeachLang2='$CanTeachLang2', CanTeachLang3='$CanTeachLang3', CanTeachLang4='$CanTeachLang4', CanTeachLang5='$CanTeachLang5', Profile='$Profile', HourlyRate='$HourlyRate', TeachingAddress='$TeachingAddress', WillTravelToStudent='$WillTravelToStudent', idMailFrequency = '$idMailFrequency' WHERE Username = '$Username'";
- if (!mysql_query($sql, $link))
- {
- die('Error:' . mysql_error());
- }
Add Comment
Please, Sign In to add comment