I have very strange problem. Here is my php code
Code: Select all
<? // profil.php
include("include/common.php");
include("include/db.php");
if (!isset($_POST['submitok'])):
// Display the user profile
$email = $_SESSION['email'];
$haslo = $_SESSION['haslo'];
dbConnect("etcg_etcg");
$sql = "SELECT * FROM users WHERE
email = '$email' AND haslo = PASSWORD('$haslo')";
$result = mysql_query($sql);
if (!$result) {
error('error');
exit;
}
$name = mysql_result($result,0,'name');
echo "Hello : ", $name;
mysql_close();
?>
<center>
<h4>Twoj Profil: </h4>
<form method="post" action="index.php?action=Profil">
<table cellspacing="0" cellpadding="3" align="center" border="1" bordercolor="#333333" bgcolor="#272424">
<tr><td align="right" width="98">
<td align="right" width="98"><b>Nick:</b> </td><td><input type="text" name="nick" value="<?=$nick?>"></td></tr>
<tr><td align="right"><b>Imiê:</b> </td><td><input type="text" name="name" value="<?=$name?>"></td>
<tr><td colspan="2"><center><b>Pogrubienie</b> oznacza pola obowi±zkowe!</center></td>
<td colspan="2"><center><input type="Submit" name="submitok" value=" ZMIEN "></center></td>
</td></tr>
</table>
</form>
</center>
<?
endif;
?>Code: Select all
$$name = mysql_result($result,0,'name');
echo "Hello : ", $$name;Please help guys!
Burrito: Please use
Code: Select all
tags when [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting PHP Code In The Forums[/url][/size]