drellout Posted December 26, 2009 Report Share Posted December 26, 2009 Laba nakts ! es te sastapos ar probleemu <?php function dbConnect(){ mysql_connect("localhost","root","pw"); mysql_select_db("clanwars"); if(isset($_POST['edit'])){ if(!empty($_POST['km2']) && !empty($_POST['km1_rez'])&& !empty($_POST['km2_rez'])&& !empty($_POST['km2_taut'])&& !empty($_POST['karte'])&& !empty($_POST['cikxcik'])&& !empty($_POST['tip'])){ $km2 = mysql_real_escape_string($_POST['km2']); $km1_rez = mysql_real_escape_string($_POST['km1_rez']); $km2_rez = mysql_real_escape_string($_POST['km2_rez']); $km2_taut = mysql_real_escape_string($_POST['km2_taut']); $karte = mysql_real_escape_string($_POST['karte']); $cikxcik = mysql_real_escape_string($_POST['cikxcik']); $tip = mysql_real_escape_string($_POST['tip']); $kve = mysql_query("UPDATE cw SET km2=$km2, km1_rez=$km1_rez, km2_rez=$km2_rez, km2_taut=$km2_taut, karte=$karte , cikxcik=$cikxcik , tip=$tip") or die(mysql_error()); if($kve == true){ echo "editots!";} if($kve == false){ echo "Kkads suds !";} }else{echo "huj";} } while($cw = mysql_fetch_array($select_cw)){ ?> <form action="" method="post"> <input name="km2" type="text" value="<?php echo $cw['km2']; ?>"><br/> <input name="km1_rez" type="text" value="<?php echo $cw['km1_rez']; ?>"><br/> <input name="km2_rez" type="text" value="<?php echo $cw['km2_rez']; ?>"><br/> <input name="km2_taut" type="text" value="<?php echo $cw['km2_taut']; ?>"><br/> <input name="karte" type="text" value="<?php echo $cw['karte']; ?>"><br/> <input name="cikxcik" type="text" value="<?php echo $cw['cikxcik']; ?>"><br/> <input name="tip" type="text" value="<?php echo $cw['tip']; ?>"><br/> <input name="edit" type="submit"></form><?php } ?> neko nerāda vnk baltu lapu Būtu ļoti pateicīgs ja jūs man spētu palīdzēt Quote Link to comment Share on other sites More sharing options...
404 Posted December 26, 2009 Report Share Posted December 26, 2009 (edited) 1) Ieslēdz kļūdu paziņojumus. 2) Iemet aiz visiem mysql pieprasījumiem echo mysql_error(); vai arī: or die(mysql_error()); 3) Nokomentē pirmo rindiņu: function dbConnect(){ Jo viņai nav šeit redzams pielietojums,un nav aizverošā } 4) Atrodi neeksistējošo selektu $select_cw :) Edited December 26, 2009 by 404 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.