Php....*sigh*

Discussion in 'Gaming' started by Ruler46, Jan 20, 2007.

  1. Ruler46

    Ruler46 Well-Known Member

    Age:
    32
    Posts:
    583
    Likes Received:
    0
    Joined:
    Oct 25, 2005
    PHP is being a ***** again >.<

    I started with 7 errors.... I've now cut it down to 3... (Im only just learning PHP, Much of it, as i need it in making my site, or improvising on HTML/Premade PHP)


    Warning: Cannot modify header information - headers already sent by (output started at /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php:7) in /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php on line 93

    Warning: Cannot modify header information - headers already sent by (output started at /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php:7) in /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php on line 94

    Warning: Cannot modify header information - headers already sent by (output started at /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php:7) in /www/1111mb.com/u/g/n/ugnetwork/htdocs/index2.php on line 97

    And heres line 87 - 104.... So much writing.. my brain hurts.

    Any ideas anyone?

    (BTW: I get this when i try to login after ive entered my details (username and pass)
     
  2. Under619Taker

    Under619Taker Senior Member

    Posts:
    542
    Likes Received:
    0
    Joined:
    Dec 10, 2004
    not sure if this will work. i would prefer if you would post the whole script cause you might be duplicating variables, and are you connecting to your database and using query's, etc.?

     
  3. Ruler46

    Ruler46 Well-Known Member

    Age:
    32
    Posts:
    583
    Likes Received:
    0
    Joined:
    Oct 25, 2005
    K, The Whole script is

    Ill try that what you said now
     
  4. Phili G

    Phili G Well-Known Member

    Age:
    33
    Posts:
    1,498
    Likes Received:
    0
    Joined:
    Oct 5, 2005
    Location:
    England!
    Its because php has started to render the page and then you are trying to using cookies. There is this php code;
    ob_start()
    php.net link
     
  5. MockingMonkey

    MockingMonkey Well-Known Member

    Posts:
    312
    Likes Received:
    0
    Joined:
    Oct 29, 2005
    Try removing the cookies and see if that helps in anyway. If it doesn't just make it so that it forces its way through.
     
  6. Ruler46

    Ruler46 Well-Known Member

    Age:
    32
    Posts:
    583
    Likes Received:
    0
    Joined:
    Oct 25, 2005
    Soo thats soo complicated in that link lol...... >.<

    You need to have the cookie saved inorder to acsess the members part, thats how I stop people just rewriting the URL to the next page, and I think it'll be needed too.

    Would, Once they've entered their login info they got redirected to a new page, that page saves the cookie then redirects them to the members area work? And if yeah, could anybody give me a little hint how to do that...
     
  7. johndapunk FTW

    johndapunk FTW Senior Member

    Age:
    32
    Posts:
    2,513
    Likes Received:
    0
    Joined:
    Jan 19, 2006
    Location:
    Palm Beach
    - http://www.php.net/manual/en/function.header.php
    Common stuff to know.
    Anyway, if you did/didn't make that code, there are some things you can/should change.

    For instances, unless you plan on allowing more then one member to have the same Username, then you can just change:
    Code:
    while($info = mysql_fetch_array( $check ))
    to
    Code:
    if($info = mysql_fetch_array( $check ))

    Merged Post:


     
  8. Ruler46

    Ruler46 Well-Known Member

    Age:
    32
    Posts:
    583
    Likes Received:
    0
    Joined:
    Oct 25, 2005
    I dont use that other page, I was just wondering... Im pretty new to PHP, and this was a premade code, man, half of it needed to be fixed to get the other ones fixed...

    Thanks, I get it a little btter, Ill read that whole link tomorrow and try to fix then.
     
  9. Under619Taker

    Under619Taker Senior Member

    Posts:
    542
    Likes Received:
    0
    Joined:
    Dec 10, 2004
    if you have MSN, pm me it, and i will help you with the script over MSN. i am currently working on a script similar to yours for a class/experiment.
     
  10. johndapunk FTW

    johndapunk FTW Senior Member

    Age:
    32
    Posts:
    2,513
    Likes Received:
    0
    Joined:
    Jan 19, 2006
    Location:
    Palm Beach
    a simple login script for an experiment?
     
  11. Under619Taker

    Under619Taker Senior Member

    Posts:
    542
    Likes Received:
    0
    Joined:
    Dec 10, 2004
    no. a entire member system, written from scratch with php and mysql. i am only about a month and a half working with real php instead of just includes, and echos, etc.
     

Share This Page