Search
Left Quote    Copy from one, it's plagiarism; copy from two, it's research.
- Wilson Mizner    
Right Quote
 
[login] | [Register]
Forum Index » Site and Forum Bugs » Viewing Topic and Replies
Post Reply


        Viewing Topic: I cant Register and Member System Errors
  This user is online  Guest
  Subject: "I cant Register and Member System E..." Posted: @ 11:11 am on Oct 31 2005   
Unregistered
For some reason i try to register and i enter the code in the box Exactlya s ir is on the image and it tells me its wrong! (on this site)

Member system error :- I have used the PHP meber system on my site and fixed a few bugs, but when i go to log in i get these errors

Warning: Cannot modify header information - headers already sent by (output started at /home/spiterz/d omains/roleplay ersunited.canko o.com/public_ht ml/db_connect.p hp:13) in /home/spiterz/d omains/roleplay ersunited.canko o.com/public_ht ml/footer.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /home/spiterz/d omains/roleplay ersunited.canko o.com/public_ht ml/db_connect.p hp:13) in /home/spiterz/d omains/roleplay ersunited.canko o.com/public_ht ml/footer.php on line 39


    Viewed: 23,538 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 1:08 pm on Oct 31 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

hey spiderz,
those "cannot modify header information... " errors can likely be resolved with to ob_start(); put ob_start as the very first code of your page, right after <?

on the registration, i'll check it out- sometimes the code is hard to read. If you cant read it, just hit refresh before you fill in any fields and another code will be generated.

Again, i'll check it out and good luck




-bs0d | AllSyntax.com

    Viewed: 23,531 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 1:48 pm on Oct 31 2005    
Unregistered

Hi its me again Spiterz,

Which page do i ad ob_start(); to? Because in footer.php its already there.



    Viewed: 23,527 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 1:53 pm on Oct 31 2005    
Unregistered

I tried to register again 3 times and i copied the exact code but its still didnt work.



    Viewed: 23,524 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 2:03 pm on Oct 31 2005    
Unregistered

Ive sorted my login thing now, thanks. Still cant register.

A question though, how would i make it so that when the user is logged in the login box dissapears and instead there is links. And then when they log out the links dissapear and the login box comes back?

Also how would i make it so they have an account setup page? And there is member list, listing all of the members and when you click there name it shows there profile, which is changed in account setup?



    Viewed: 23,520 Times | Reply to This | To top
  This user is offline  Spiterz
  Subject: "re: I cant Register and Member Syst..." Posted: @ 12:45 pm on Nov 01 2005    
Member #: 98
Rank: User - (8)
Since: 11/01/05
Posts: 8

Yay, i managed to apply. Im having trouble on the logout system now in the member coding.




    Viewed: 23,509 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 5:53 pm on Nov 01 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

I think i answered this questions indirectly in my last post in the other thread you started. If you setup your scripts like this tutorial indicates, you will have a session variable calle: $_SESSION['log ged_in']. set this variable to 1 when logged in, and 0 when logged out.

Then on your sitebar, show login box if $_SESSION['log ged_in'] = 0, ELSE show member links (logout, view profile, member only page links, etc).




-bs0d | AllSyntax.com

    Viewed: 23,500 Times | Reply to This | To top
  This user is offline  Spiterz
  Subject: "re: I cant Register and Member Syst..." Posted: @ 7:48 pm on Nov 01 2005    
Member #: 98
Rank: User - (8)
Since: 11/01/05
Posts: 8

Right, ill give it a go... did i have to manually set these values... or were they already set in the coding?



Edited at 07:49:26 pm on 11/01/05


    Viewed: 23,497 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 11:02 pm on Nov 01 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

if you look at the scripts, they should be set already through the processes. in the login script, their should be code somewhere that says: $_SESSION['log ged_in'] = 1;

in the logout script, their should be code that says: $_SESSION['log ged_in'] = 0;

so from that point, in your sidebar or something you can display things if they're logged in, and other things if they're not.




-bs0d | AllSyntax.com

    Viewed: 23,492 Times | Reply to This | To top
  This user is offline  Spiterz
  Subject: "re: I cant Register and Member Syst..." Posted: @ 12:57 pm on Nov 03 2005    
Member #: 98
Rank: User - (8)
Since: 11/01/05
Posts: 8

Now its juts logging out thats not working...




    Viewed: 23,482 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 10:46 pm on Nov 03 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

show me what you're using for logout code - remember to use the bbcode code tags so it dont flood the forum.




-bs0d | AllSyntax.com

    Viewed: 23,472 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 6:33 pm on Nov 04 2005    
Unregistered

i use exactly what it says in your tutorial... except for the yoursite.com bit



    Viewed: 23,466 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 6:40 pm on Nov 04 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

so do I, and it works

just double check everything...

ob_start(); is the first line before ANYTHING in your page_header

and again, this is the code:


Code:


$_SESSION['log ged_in'] = 0;
setcookie('lo gin_cookie', "", time() - 60, '/', '.yoursite.com ');
session_destro y();
header(" Location: http://www.your site.com"< img src=/forums/ima ges/smilies/win k.gif border=0>;



first line sets the session variable 'logged_in' to zero, because when they login, you give it the value of one.

the 2nd line is the setcookie function, but notice the time is negative, so in essence it is deleting the cookie set when logged in.

finally, the session_destroy function is ending their logged in session



Edited at 06:48:21 pm on 11/04/05


-bs0d | AllSyntax.com

    Viewed: 23,463 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 1:47 pm on Nov 11 2005    
Unregistered

Hi, i've pasted the code into the login.php script and it returned:
Parse error: parse error in /home/www/jussa v0.freefronthos t.com/try/login .php on line 8

why? all my scripts is copied from the page where all codes are i one place.. what shold i do?!



    Viewed: 23,415 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 4:40 pm on Nov 11 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

what is the code for line 8?




-bs0d | AllSyntax.com

    Viewed: 23,407 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: I cant Register and Member Syst..." Posted: @ 4:20 am on Nov 28 2005    
Unregistered

I keep getting :
Parse error: parse error, unexpected '`', expecting ')' in register.php on line 20.
The line is copied here:


Code:


//array of invalid characters
$junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' , ']' , '-',
'*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')',
'|', '{', '}', '<', '>', '?', ':', '"', '=');


I have played with it but no luck in getting it to work...
Great tutorial none the less...



    Viewed: 23,355 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: I cant Register and Member Syst..." Posted: @ 4:27 pm on Dec 01 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA




-bs0d | AllSyntax.com

    Viewed: 23,342 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank