*

Recent

Author Topic: custom login..  (Read 6242 times)

Trasion

  • Guest
custom login..
« on: September 04, 2009, 03:06:00 PM »
I made a custom login box. The links are all messed up though, for some reason.

Code: [Select]
<table cellpadding="0" cellspacing="0" width="100%" >




<?php
if(!isset($suserid)){
echo 
'
<tr>
<td class="header2">Login</td>
</tr>
<tr>
<td class="content2">
<form action="'
.$domain.'/login/" method="POST"><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>Username:</strong><br /> 
<center><input type="text" name="username"></center><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>Password:</strong><br /> 
<center><input type="password" name="password"></center><br />
<div align="right"><input type="submit" name="submit" value="Login">&nbsp;&nbsp;</div><br /><center>Need an account?<br /><a href="'
.$domain.'/signup/">Sign up</a> now.</center>
</form>
</td>
</tr>'
;
}else{
echo 
'
<tr>
<td class="header2">Welcome</td>
</tr>
<tr>
<td class="content2">
Hello, <b>'
.$usrdata['username'].'</b> (<a href="http://zoovix.com/myaccount/">edit</a>)<br /><br />Enjoy the arcade, and have a great time!<br /><br /> Had enough of the arcade?
Click <a href="'
.$domain.'/logout/">here</a> to logout.<br /><br /></td></tr>';
}
?>
</table>

When I click logout, or try to login, or try to edit my account, or anything, it takes me to an "invalid page" message. Can someone fix all of the links to the real links?

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: custom login..
« Reply #1 on: September 04, 2009, 03:13:21 PM »
I see you have SEO turned off so you should use index.php?action= links so heres the code revised:
Code: [Select]
<table cellpadding="0" cellspacing="0" width="100%" >



<?php
if(!isset($suserid)){


if(
$seo_on == 1){
$signuplink ''.$domain.'/signup';
$accountlink ''.$domain.'/myaccount';
$logoutlink ''.$domain.'/logout';
else{
$signuplink 'index.php?action=signup';
$accountlink 'index.php?action=myaccount';
$logoutlink 'index.php?action=logout';
}
echo 
'
<tr>
<td class="header2">Login</td>
</tr>
<tr>
<td class="content2">
<form action="index.php?action=login" method="POST"><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>Username:</strong><br /> 
<center><input type="text" name="username"></center><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>Password:</strong><br /> 
<center><input type="password" name="password"></center><br />
<div align="right"><input type="submit" name="submit" value="Login">&nbsp;&nbsp;</div><br /><center>Need an account?<br /><a href="'
.$signuplink.'">Sign up</a> now.</center>
</form>
</td>
</tr>'
;
}else{
echo 
'
<tr>
<td class="header2">Welcome</td>
</tr>
<tr>
<td class="content2">
Hello, <b>'
.$usrdata['username'].'</b> (<a href="$accountlink">edit</a>)<br /><br />Enjoy the arcade, and have a great time!<br /><br /> Had enough of the arcade?
Click <a href="$logoutlink">here</a> to logout.<br /><br /></td></tr>'
;
}
?>
</table>
« Last Edit: September 04, 2009, 03:18:55 PM by Professor Hubert J. Farnsworth »

Trasion

  • Guest
Re: custom login..
« Reply #2 on: September 04, 2009, 03:18:59 PM »
It gives me this..

Code: [Select]
Parse error: syntax error, unexpected T_ELSE in /home/zoovix/public_html/arcade/templates/default/header.php on line 103

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: custom login..
« Reply #3 on: September 04, 2009, 03:22:56 PM »
hmm.. can I see the entire header.php?
or just what ever is on line 103?

Trasion

  • Guest
Re: custom login..
« Reply #4 on: September 04, 2009, 03:23:57 PM »
Actually I fixed it!

Thank you so much. :)

God, those names you all use are so annoying. I'm guessing you're Adam, but I never know anymore. I hate you guys changing your names, it's so unprofessional and difficult..

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: custom login..
« Reply #5 on: September 04, 2009, 03:29:49 PM »
No problem.
Well we change our names for fun but I can see you're difficulty in trying to find out whos who, umm... I usually have a photo, Kurt has no avatar, and Robbie has the FAS avatar.
I don't know how else we could let people know whos who.. maybe post a topic when we change them lol. I change mine monthly which I think is what everyone else has been doing.

(oh and yep im Adam  :))

Trasion

  • Guest
Re: custom login..
« Reply #6 on: September 04, 2009, 03:30:45 PM »
It's so confusing. I think you guys should stick to one username. Especially on a website like this, where it's supposed to be professional.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: custom login..
« Reply #7 on: September 04, 2009, 03:35:31 PM »
I don't know who said its supposed to be professional or not lol but yea like I said I see you're difficulty in knowing whos who, I guess we could go back to regular names... if everyone else is willing... I find it to be a fun way to express yourself or whatever but...