xmas12 Posted May 12, 2009 Report Posted May 12, 2009 Sveiki. Man ir nepiesiesams salikt MYSQL quars lai es varetu caur php esit savaa profile lapaa savu vardu, uzvardu ,dzives vietu ,emailu, un utt un man vajag ielikt kodu un MYSQL tabulas kuras man veel jataisa... profile.php kods: <?php if(isset($_POST['bilde'])) { $bilde = quote_smart(htmlspecialchars($_POST['bilde'])); mysql_query("UPDATE lietotaaji SET bilde=$bilde WHERE id=$id"); echo "<span class='ok'>Bilde veiksmД«gi nomainД«ta!</span><br />"; } if(isset($_POST['vecaa_parole'])) { if(!empty($_POST['vecaa_parole']) and !empty($_POST['jaunaa_parole']) and !empty($_POST['jaunaa_parole_conf'])) { $result = mysql_fetch_row(mysql_query("SELECT parole FROM lietotaaji WHERE id=$id")); $vecaa_parole = $result[0]; $ievadiitaa_vecaa_parole = md5($_POST['vecaa_parole']); if($vecaa_parole == $ievadiitaa_vecaa_parole and $_POST['jaunaa_parole_conf'] == $_POST['jaunaa_parole']) { $jaunaa_parole = quote_smart(md5($_POST['jaunaa_parole_conf'])); mysql_query("UPDATE lietotaaji SET parole=$jaunaa_parole WHERE id=$id"); echo "<span class='ok'>Parole veiksmД«gi nomainД«ta!</span><br />"; } else { echo "<span class='error'>PaЕЎreizД“jДЃ parole nav derД«ga un/vai jaunДЃs paroles nesakrita!</span><br />"; } } else { echo "<span class='error'>Netika aipildД«ts kДЃds lauks!</span><br />"; } } // priekЕЎ bildes adreses $result = mysql_fetch_row(mysql_query("SELECT bilde FROM lietotaaji WHERE id=$id")); $img_url = $result[0]; ?> <form method="post"> MainД«t profila bildi: <input type="text" name="bilde" value="<?php echo $img_url; ?>" /> <input type="submit" value="MainД«t bildi" /> </form><br /> <form method="post"> <table> <center><b>Profila info...</b></center> <br> <tr><td>VecДЃ parole:</td><td><input type="password" name="vecaa_parole" /></td></tr> <tr><td>JaunДЃ parole:</td><td><input type="password" name="jaunaa_parole" /></td></tr> <tr><td>JaunДЃ parole vД“lreiz:</td><td><input type="password" name="jaunaa_parole_conf" /></td></tr> <tr><td></td><td><input type="submit" value="MainД«t iestatijumus" /></td></tr> </table> </form> Lietotaaju tabula ir lietotaaji un lietotaaji tabulaa man ir tabula vaards, uzvaards, emails, parole, un es veel gribu lai man rada skype,dzivesvieta, cs niks, un pasakiet ludzu kuras tabulas man veel buus jauztaisa Quote
anonīms Posted May 13, 2009 Report Posted May 13, 2009 Pats taču jau atbildēji un es veel gribu lai man rada skype,dzivesvieta, cs niks, Quote
xmas12 Posted May 13, 2009 Author Report Posted May 13, 2009 Pats taču jau atbildēji Nu ja es gribu lai rada tos arii bet es nezinu kas man jaarakstaa tajaa php kodaa lai man to arii raadiitu izlabojot visu. Quote
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.