arvix Posted October 1, 2007 Report 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..
Val Posted October 1, 2007 Report Posted October 1, 2007 (edited) <option value='izveeleetaa_veertiiba' selected='selected'>bla bla bla</option> Edited October 1, 2007 by Val
arvix Posted October 1, 2007 Author Report 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.
xPtv45z Posted October 1, 2007 Report Posted October 1, 2007 if $_POST['kautkas']==$row['nr'] {selected}
Recommended Posts