FT3 Posted October 23, 2009 Report Share Posted October 23, 2009 Visu ustajsiju ka nakas bet rada tukša lap wtf ? PhpMyAdmin userinfo.php <?php include("includes/db_connect.php"); if(isset($_GET['UserID'])) { $id = $_GET['UserID']; $query = "SELECT * FROM users WHERE id = '$id'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo "Username:"; echo $row['Username']; echo "<br />"; echo "Your password:"; echo $row['Password']; echo "<br />"; echo "Your E-mail:"; echo $row['EmailAddress']; echo "<br />"; echo "Your name:"; echo $row['Name']; } ?> <br> [<a href="logout.php">Logout</a>] ka lai izlabo ? :/ Link to comment Share on other sites More sharing options...
rATRIJS Posted October 23, 2009 Report Share Posted October 23, 2009 Un tev ir tāds $_GET["UserID"]? Tam būtu jāizskatās šādi - http://tava.adrese.lv/profils.php?UserID=4 Tev lapā ko atver rāda Logout? Link to comment Share on other sites More sharing options...
FT3 Posted October 23, 2009 Author Report Share Posted October 23, 2009 isti nezinu ar to UserID meginaj usavienot un sanaca itka ta ;/ Link to comment Share on other sites More sharing options...
rATRIJS Posted October 23, 2009 Report Share Posted October 23, 2009 Adreses laukā tev ir kāda adrese ierakstīta? Šāda tipa (ne tieši tāda, skaties uz to jautājuma zīmi un kas seko pēc tam)? http://localhost/profile.php?UserID=3 Un kad tu atver to lapu, kur vajadzētu parādīties tam lietotājam - tev rādās tur [Logout] links? Link to comment Share on other sites More sharing options...
Val Posted October 23, 2009 Report Share Posted October 23, 2009 kāda jēga no mysql_error, ja tu tos nelasi? nevaru ieraudzīt tabulā tādu lauku, kā "id". pārējo izdomāsi... Link to comment Share on other sites More sharing options...
FT3 Posted October 23, 2009 Author Report Share Posted October 23, 2009 (edited) pasties mana PhpMyAdmin tur ir UserId un es ari padomaju ka id iet no turienes ;/ Edited October 23, 2009 by FT3 Link to comment Share on other sites More sharing options...
rATRIJS Posted October 23, 2009 Report Share Posted October 23, 2009 Taisnība ir Val (nepaskatīju attēlu). Tev vajag rakstīt nevis: "SELECT * FROM users WHERE id = '$id'" bet gan "SELECT * FROM users WHERE UserID = '$id'" Link to comment Share on other sites More sharing options...
FT3 Posted October 23, 2009 Author Report Share Posted October 23, 2009 viss kods tagad iskatas ta <?php include("db_connect.php"); if(isset($_GET['UserID'])) { $id = $_GET['UserID']; $query = "SELECT * FROM users WHERE UserID = '$id'" $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo "Username:"; echo $row['username']; echo "<br />"; echo "Your password:"; echo $row['password']; echo "<br />"; echo "Your E-mail:"; echo $row['email']; echo "<br />"; echo "Your name:"; echo $row['name']; } ?> <br> [<a href="logout.php">Logout</a>] bet rada eroru Parse error: syntax error, unexpected T_VARIABLE in C:\AppServ\www\v2\includes\user_cp.php on line 10 Link to comment Share on other sites More sharing options...
Aleksejs Posted October 23, 2009 Report Share Posted October 23, 2009 semikoliņš aizmirsies.... Link to comment Share on other sites More sharing options...
FT3 Posted October 23, 2009 Author Report Share Posted October 23, 2009 kur :? Link to comment Share on other sites More sharing options...
Aleksejs Posted October 23, 2009 Report Share Posted October 23, 2009 īsi pirms 10. rindiņas... Link to comment Share on other sites More sharing options...
FT3 Posted October 25, 2009 Author Report Share Posted October 25, 2009 jautajums ir atrisinats :) Link to comment Share on other sites More sharing options...
Recommended Posts