Search
Left Quote    A clever person solves a problem. A wise person avoids it.
- Einstein    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: Porblems with Member Script
  This user is offline  coolcat50
  Subject: "Porblems with Member Script" Posted: @ 9:22 pm on Oct 15 2007   
Member #: 439
Rank: User - (3)
Since: 10/15/07
Posts: 3

I am having problems with your member script and I have basically just copy and pasted it. For some reason my register page isn't logging people into the database. Also, your page_header sript isn't working and is saying something about encapsed or something on line 23 which is where the
$_SESSION['logg ed_in']=1;
is.

Also, i am using a include for my db connection simply because DOCUMENT_ROOT doesn't work.
Also, I am using this with my PHP game. Is there a possible way to make this intergrate with member-only pages and hide member-only content from guest.
Thanks


    Viewed: 11,798 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Porblems with Member Script" Posted: @ 12:55 pm on Oct 16 2007    

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

  coolcat50 said...

< i> I am having problems with your member script and I have basically just copy and pasted it.

Shame on you. Read the article, learn it, implement it. Beyond that, im here to help with problems along the way. In that case, I would need the line which contains the error.

  coolcat50 said...
< i> For some reason my register page isn't logging people into the database.

This is probably because you just copied and pasted without reading the article.

  coolcat50 said...
< i> Also, your page_header sript isn't working and is saying something about encapsed or something on line 23 which is where the
$_SESSION['log ged_in']=1;
is.


My script works fine, you broke it. Read each page of the article, try again, paste specific lines of code that may contain an error.

  coolcat50 said...
< i> Also, i am using a include for my db connection simply because DOCUMENT_ROOT doesn't work.
Also, I am using this with my PHP game. Is there a possible way to make this intergrate with member-only pages and hide member-only content from guest.
Thanks


DOCUMENT_ROOT works just fine, I'm seeing a pattern here...




-bs0d | AllSyntax.com

    Viewed: 11,788 Times | Reply to This | To top
  This user is offline  coolcat50
  Subject: "re: Porblems with Member Script" Posted: @ 1:01 am on Oct 17 2007    
Member #: 439
Rank: User - (3)
Since: 10/15/07
Posts: 3

WTF!!! I read the article. I had to modify it and make it work now. Currently it is all fixed up and i even plan on making my own MySQL integrated system where login storage is done with MySQL. Jeez. I read the article but I wrote down the article, fixed it to fit my RPG. Also, the DOCUMENT_ROOT doesn't work nor does PHP_SELF. Aight.




    Viewed: 11,773 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Porblems with Member Script" Posted: @ 3:57 am on Oct 17 2007    

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

Ok, your latest statement contradicts your initial post. Again, paste the specific lines of code that have errors and also the error message. I can help with this part. I know nothing about your specific site, so I must assume their could be a potential conflict. Nobody would know until we start digging into the details.

What leads you to believe DOCUMENT_ROOT does not work? Create a test page, with just this code: <? echo($_SERVER[ 'DOCUMENT_ROOT ']); ?> if you see a path, then document root is working.




-bs0d | AllSyntax.com

    Viewed: 11,768 Times | Reply to This | To top
  This user is offline  coolcat50
  Subject: "re: Porblems with Member Script" Posted: @ 11:34 pm on Oct 17 2007    
Member #: 439
Rank: User - (3)
Since: 10/15/07
Posts: 3

Well, I can't copy + paste directly. I use my Wii for site management. Here is the url to my site.
http://warfield rpg.x10hosting. com

The site's register page is working now just not putting people in the database. Also, I manually inserted me into the database and the Login page processes my error. I do not know what to do. Also, how do I make a member-only content page for this?



Edited at 11:37:52 pm on 10/17/07


    Viewed: 11,742 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Porblems with Member Script" Posted: @ 10:21 pm on Oct 18 2007    

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

to make a page members only, try something like this:

if($_SESSION[' logged_in'] == 0) die('You must be logged in to view this page.');

How does register work, but not put people in the database? Isn't there code after the insert query of the register script to error out if it could'nt add them? You created all of the tables with the appropriate names and fields and such, right?

what specific error is it again?




-bs0d | AllSyntax.com

    Viewed: 11,709 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