arvix Posted October 1, 2007 Report Share Posted October 1, 2007 Sveiki. Problema ir sekojosa... Ir divi selecti (htmla), kuri mainas atkariba no orta vertibas. <select name="kautkas" onchange="form.submit()" >'; while($row = mysql_fetch_array($result)) { echo "<br>"; echo' <option value ="'.$row["nr"].'">'.$row["nosaukums"].'</option><br>'; }; echo' </form>' Bet pec submit izpildisanas 1. selecta ieraksts parlec uz pirmo vertibu, bet man gribetos lai vins paliktu tads ka es vinu izvelejos.. Link to comment Share on other sites More sharing options...
Val Posted October 1, 2007 Report Share Posted October 1, 2007 (edited) <option value='izveeleetaa_veertiiba' selected='selected'>bla bla bla</option> Edited October 1, 2007 by Val Link to comment Share on other sites More sharing options...
arvix Posted October 1, 2007 Author Report Share Posted October 1, 2007 Ja, bet tad es varu tikai kadai 1 noteiktai vertibai so "selected='selected'" piesskirt, bet man vajag lai vina tiktu pieskirta tikai tai vertibai kuru es izvelesos, tas ir, vina varetu but dazadiem ierakstiem. Link to comment Share on other sites More sharing options...
xPtv45z Posted October 1, 2007 Report Share Posted October 1, 2007 if $_POST['kautkas']==$row['nr'] {selected} Link to comment Share on other sites More sharing options...
Recommended Posts