Jump to content
php.lv forumi

wtf


FT3

Recommended Posts

Visu ustajsiju ka nakas bet rada tukša lap wtf ?

PhpMyAdmin

afvd0ugtsf3ncj4kdc1q_thumb.gif

 

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

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

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

×
×
  • Create New...