Vecteevs Posted May 27, 2010 Report Share Posted May 27, 2010 Sveiki, man tāds neliels jautājums. Kad piereģistrējos savā test lapā, it kā viss ir labi, bet datubāzē man uzrāda tukšumu pie vārda un uzvārda, bet visus pārējos datus rāda. Pārbaudīju, bet viss it kā ir kā vajag Quote Link to comment Share on other sites More sharing options...
codez Posted May 27, 2010 Report Share Posted May 27, 2010 vaarbūt pārbaudi vēlvienreiz, ja neatrodi kļudu, tad debugo aiz katra soļa, vai dati tiek padoti tālāk, līdz nonāc līdz problēmas cēlonim. Quote Link to comment Share on other sites More sharing options...
php newbie Posted May 27, 2010 Report Share Posted May 27, 2010 tev tur kur tiek ierakstīts vārds un uzvārds ir kļūda! bet izskatā it kā labi Quote Link to comment Share on other sites More sharing options...
briedis Posted May 27, 2010 Report Share Posted May 27, 2010 Ja pārbaudīji un likās, ka viss ir kārtībā, bet nebija, tad acīmredzot slikti pārbaudīji :) Varbūt parādi kodu, kas veic saglabāšanu db? Quote Link to comment Share on other sites More sharing options...
Vecteevs Posted May 27, 2010 Author Report Share Posted May 27, 2010 (edited) te ir datubāzes values mysql_query("INSERT INTO users (`full_name`,`user_email`,`user_pwd`,`country`,`joined`,`activation_code`) VALUES ('$_POST[full_name]','$_POST[email]','$md5pass','$_POST[country]',now(),'$activ_code')") or die(mysql_error()); un te ir html <table width="65%" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="d5e8f9" class="mnuheader"><strong><font size="5">Register Account</font></strong></td> </tr> <tr> <td bgcolor="e5ecf9" class="forumposts"><form name="form1" method="post" action="register.php" style="padding:5px;"> <p><br> Name: <input name="name" type="text" id="name"> Piem. Jānis Bērziņš</p> <p>Email: <input name="email" type="text" id="email"> Piem. john@domain.com</p> <p>Parole: <input name="pass1" type="password" id="pass1"> vismaz 5 simboli</p> <p>Atkārtot paroli: <input name="pass2" type="password" id="pass2"> </p> <p>Valsts: <select name="country" id="select8"> <option value="Afghanistan">Afghanistan</option> <option value="Albania">Albania</option> </select> </p> <p> <input name="user_code" type="text" size="10"> <img src="pngimg.php" align="middle"> </p> <p align="center"> <input type="submit" name="Submit" value="Register"> </p> </form></td> </tr> </table> datubāze: Edit: visu man uzkopē izņemot to vārdu :( Edited May 27, 2010 by Vecteevs Quote Link to comment Share on other sites More sharing options...
briedis Posted May 27, 2010 Report Share Posted May 27, 2010 (edited) $_POST[full_name] <input name="name" type="text" id="name"> Ieteiktu padomāt par drošību pret SQL injekcijām... Edited May 27, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
Vecteevs Posted May 27, 2010 Author Report Share Posted May 27, 2010 (edited) ehh neuzmanība :( Liels Paldies! Edit: A kādi pasākumi būtu jāveic? Edited May 27, 2010 by Vecteevs Quote Link to comment Share on other sites More sharing options...
briedis Posted May 27, 2010 Report Share Posted May 27, 2010 Jālieto mysql_real_escape_string() pirms liec string tipa datus kvērijā... 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.