Jump to content
php.lv forumi

vai nespej sagremot?


rumpels

Recommended Posts

zinu ka utf-8 viss butu daudz vieglak, nu nav man vel uzlikts editors kursh atbalstitu, tapec 1257 ar ascii, sakars ar mysql vistiesakais - db jau atrodas ieraksti, kur pie ievades izvelos valsti andora, ieraksts veikts un saglabats, tagad velos izmainjas veikt un automatiski vajadzetu paradit ka izveleta valsts ir andora, bet neatzime nevienu option ka selected..

 

khm visu kodu tiesham nelikshu 1500 rindas aptuveni..bet uz localo strada ar normalu atrumu un nav ne vainas, vienigi tas ka neatpazist ka mainigais $a11 = andora_ascii_formata

 

$query= MYSQL_QUERY("SELECT * FROM `regsys` WHERE `id` = '$skaitlis'");
while ($row = mysql_fetch_array($query)) {
$id = $row["id"];
$a1 = $row["a1"];
$a2 = $row["a2"];
$a3 = $row["a3"];
$a4 = $row["a4"];
$a5 = $row["a5"];
$a6 = $row["a6"];
$a7 = $row["a7"];
$a8 = $row["a8"];
$a9 = $row["a9"];
$a10 = $row["a10"];
$a11 = $row["a11"];
$a12 = $row["a12"];

Link to comment
Share on other sites

par utf8 redaktoru - pspad ieks windows vai quanta nixiem ar kde.

 

varbut tomer salidzinat pec valstu id nevis nevis stringiem

taa if`a un echo vietaa es rakstitu shitaa

<?=($a11 == 'kaut kas')?'selected="selected"':''?>

Link to comment
Share on other sites

lietas butibu tas nemaina un neizvada vienalga, ir ta ka tos id definet ir lieks chakars bet laikam naksies darit, bet pec visa spriezhot nespej sagremot, jo shis koda gabals identisks visu atlasa pareizi, bet garais ne

 

<select size="1" name="a12">
 <option value="" <?if($a12 == ""){echo "selected";}?>>--------------------------</option>
   <option value="Есть" <?if($a12 == "Есть"){echo "selected";}?>>Есть</option>
   <option value="Нет" <?if($a12 == "Нет"){echo "selected";}?>>Нет</option>
     </select>

 

zimejums te

Edited by rumpels
Link to comment
Share on other sites

Pietiekoshi viegls un tajaa pashaa laikaa funkcionaals editors, kursh atbalsta utf8, ir notepad2.

Taa kaa vinjsh aiznjem tikai 242kb, tad vinju vienmeer ir eerti ljoti aatri uzlikt pat pie ljoti leena interneta piesleeguma. Nu vismaz es to notepad2 diezgan biezhi izmantoju.

Edited by des
Link to comment
Share on other sites

×
×
  • Create New...