PDA

View Full Version : usersystem help



iNicks
16-04-2006, 03:14 PM
ok i used the usersystem tut on techtuts.com and have the whole thing up - but whrn i log in - it goes to the welcome page liek i made it but when i click edit profile it just says you are not logged in :S

i dont know why

www.werehabbo.com <- on there

retrocore
16-04-2006, 03:58 PM
Have you included config.php, have you started the buffering?

iNicks
16-04-2006, 04:02 PM
yes i added the config.php - if i didnt - the page wouldnt of worked ... buffereing?

D3stroyer
16-04-2006, 04:03 PM
Edit : just read your post, if you followed the tutorial Correctly it should work!

Daza

iNicks
16-04-2006, 04:05 PM
i did follow the tut right - i added the config.php and members only page code :s bah im lost :s

D3stroyer
16-04-2006, 04:28 PM
At the top of members only page code did you include the config.php in the members only page code.

Daza

iNicks
16-04-2006, 04:43 PM
ok this what I got


<?
ob_start();
include("config.php");
if ($logged[username])
{
// the user is logged in! We continue...
if (!$_POST[update])
{
// the form hasn't been submitted. We continue...
$profile = mysql_query("SELECT * from users where username = '$logged[username]'");
$profile = mysql_fetch_array($profile);
// the above lines get the information so that it can be displayed in the html form.
echo("
<center><form method=\"POST\">
<table width=\"100%\">
<tr>
<td align=\"right\" width=\"25%\">
<font size=\"1\" face=\"verdana\" color=\"#000000\">Location</font>
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$profile[location]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
<font size=\"1\" face=\"verdana\" color=\"#000000\">Hotel</font>
</td>
<td align=\"left\">
<input size=\"25\" name=\"msn\" value=\"$profile[msn]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
<font size=\"1\" face=\"verdana\" color=\"#000000\">Favorite Piece of furni</font></td>
<td align=\"left\">
<input size=\"25\" name=\"aim\" value=\"$profile[aim]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
<font size=\"1\" face=\"verdana\" color=\"#000000\">Habbo Name</font></td>
<td align=\"left\">
<input size=\"25\" name=\"email\" value=\"$profile[email]\"></td>
</tr>
<tr>
<td align=\"center\">
</td>
<td align=\"left\">
<input type=\"submit\" name=\"update\" value=\"Update\"></td>
</tr>
</table>
</form>
</center>");
}
else
{
$email = htmlspecialchars($_POST[email]);
$aim = htmlspecialchars($_POST[aim]);
$msn = htmlspecialchars($_POST[msn]);
$locate = htmlspecialchars($_POST[locate]);
// the above lines get rid of all html.
echo ("Your profile has been updated!");
$update = mysql_query("Update users set email = '$email',
msn = '$msn', aim = '$aim', location = '$locate' where username = '$logged[username]'");
// updates the information in the database.
}
}
else
{
// They aren't logged in!
echo ("<a href=\"login.php\"><font size=\"1\" face=\"verdana\" color=\"#000000\">You must login</font></a>");
}
?>

anyone tell me whats wrong - i didnt add the members only code at top - but where do i add - can someone combine the codes for me

and this is the code for members page only


<?
ob_start();
include("config.php");
if ($logged[username])
{
echo("You are logged in");
}
else
{
echo("You are not logged in");
}
?>

D3stroyer
16-04-2006, 05:11 PM
In the codes, you're not ament to just copy and paste and i can see that because the comments are still in delete them and that will help other than that i can't see any problems.

Daza

iNicks
16-04-2006, 05:21 PM
let me try this

iNicks
16-04-2006, 05:28 PM
Ok I tryed what you said -

Still dont work - I get this when I log in, it works

http://img215.imageshack.us/img215/521/logged10sj.png

Then when I click Edit Profile - it goes to

http://img436.imageshack.us/img436/1479/logged22um.png

Mr.Comedian
16-04-2006, 05:29 PM
Are you using the bottom tutorials? I had exactly the same problem. Im gonna try it again for HxTV 4.8

iNicks
16-04-2006, 05:33 PM
Yea im using the very bottom tut, and whenever I get this fixed im going to add on ... but ive been trying to fix this problem for liek 2 days - but couldnt so i posted here!

D3stroyer
16-04-2006, 05:35 PM
hmm i don't know then why not registr on techtuts and ask in a commment.



Daza

iNicks
16-04-2006, 05:38 PM
its like the oldest tut on there :P i dont think people would respond

DMB-Hosting
16-04-2006, 05:44 PM
Sorry this is completely of topic BUT thats a nicesiteyou have there

D3stroyer
16-04-2006, 05:45 PM
Ask in the shoutbox :)



Daza

Mr.Comedian
16-04-2006, 05:51 PM
Yea im using the very bottom tut, and whenever I get this fixed im going to add on ... but ive been trying to fix this problem for liek 2 days - but couldnt so i posted here!
Yes, thats what I was using, If i fix mine ill let you know

iNicks
16-04-2006, 05:56 PM
@Dan - Thanks
@Comedian - Ok ;) I live in Halifax too :o
@Destroyer - Ill try :)

Mr.Comedian
16-04-2006, 05:58 PM
Yes, Halifax Nova Scotia, I live in West Yorkshire, England :D

iNicks
16-04-2006, 05:59 PM
I used to live in England :(

Want to hide these adverts? Register an account for free!