2017-09-27 256 views

回答

1

.合併你的字符串,需要

<?php 
       if ($_POST['provincia']){ 
       echo "<option value=".$_POST['pronvicia']." selected='selected'>".$_POST['provincia']."</option>";} 

       else{ 
       echo "<option value='' selected='selected'>seleziona</option>";} 
      ?> 
0

無論何時使用'

echo "<option value='$_POST[pronvicia]' selected='selected'>$_POST[provincia]</option>";} 

或者:

echo "<option value=\"$_POST[pronvicia]\" selected=\"selected\">$_POST[provincia]</option>";} 
0

代碼看起來應該是這樣

<? 
      if ($_POST['provincia']){ 
      echo "<option value=".$_POST[pronvicia]." selected='selected'>".$_POST[provincia]."</option>";} 

      else{ 
      echo "<option value='' selected='selected'>seleziona</option>";}; 
     ?> 
0

使用此

<?php 
        if ($_POST['provincia']){ 
     echo '<option value="'.$_POST['pronvicia'].'" selected="selected">'.$_POST['provincia'].'</option>'; 
    } 
else{ 
     echo '<option value="" selected="selected">seleziona</option>'; 
    } 
      ?> 
相關問題