ziedinjsh Posted October 19, 2009 Report Share Posted October 19, 2009 šāds ir kods: <?php include "misc/config.php"; include "header.php"; include "left.php"; if (isset($_POST['edit'])) { $username = strip_tags($_POST['username']); $email = strip_tags($_POST['email']); $query = mysql_query("UPDAET users SET username='$username',email='$email' "); die("Profile is change"); } $result = mysql_query("SELECT * FROM users WHERE ID = '{$_SESSION['user_ID']}'"); while($data = mysql_fetch_array($result)) { echo "<form method='post' action='".$_SERVER['PHP_SELF']."'>"; echo "<input type='text' name='username' value='".$data['username']."'><br>"; echo "<input type='text' name='email' value='".$data['email']."'><br>"; echo "<input type='submit' name='edit' value='Edit profile'>"; echo "</form>"; } include "footer.php"; ?> nospiežo pugu.. parāds ziņa profile is change, bet izmaiņas nenotiek Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted October 19, 2009 Report Share Posted October 19, 2009 $query = mysql_query("UPDAET users SET username='$username',email='$email' "); Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted October 19, 2009 Report Share Posted October 19, 2009 UPDAET ??? Lai zinātu kāpēc tieši, kaut kas kaut kur nenotiek, der paskatīties, kāds tad ir kļūdas paziņojums... ;) Quote Link to comment Share on other sites More sharing options...
Val Posted October 19, 2009 Report Share Posted October 19, 2009 nākamais jautājums būs, kāpēc tagad visiem lietotājiem vienāds username un epasts... Quote Link to comment Share on other sites More sharing options...
waplet Posted October 19, 2009 Report Share Posted October 19, 2009 Val, kāpēc tu domā? ka tā būs? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted October 19, 2009 Author Report Share Posted October 19, 2009 Paldies, es saprtu kurir vaina! 1. Kļūdaini uzrakstīju UPDATE 2. pieliku vēl klāt, lai updeto tikai lietotājam kurš ielogojies. $query = mysql_query("UPDATE users SET username='$username',email='$email' WHERE ID = '{$_SESSION['user_ID']}'"); 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.