registration login prob

Discussion in 'PHP' started by dougvcd, May 11, 2007.

  1. #1
    this is ther error i get
    Parse error: syntax error, unexpected T_STRING in /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/registration.php on line 41

    this is line 40,41,42

    // now we insert it into the database $insert = "INSERT INTO users (username, password)
    VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
    $add_member = mysql_query($insert);
    ?>
     
    dougvcd, May 11, 2007 IP
  2. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Replace this:

    // now we insert it into the database $insert = "INSERT INTO users (username, password)
    VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
    $add_member = mysql_query($insert);
    ?>
    Code (markup):
    with this:

    // now we insert it into the database
    $insert = "INSERT INTO users (username, password)
    VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
    $add_member = mysql_query($insert);
    ?>
    Code (markup):
     
    SoKickIt, May 11, 2007 IP
  3. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    big thank you for that
    got a bit further now got another prob
    will post later
    cheers
    Doug
     
    dougvcd, May 11, 2007 IP
  4. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Warning: Cannot modify header information - headers already sent by (output started at /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php:1) in /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php on line 87

    Warning: Cannot modify header information - headers already sent by (output started at /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php:1) in /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php on line 88

    Warning: Cannot modify header information - headers already sent by (output started at /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php:1) in /misc/34/000/087/930/6/system/frontpage/caravan-holiday-exchange.com/login.php on line 91
    these are the rrors now getting


    $hour = time() + 3600;
    setcookie(ID_my_site, $_POST['username'], $hour);
    setcookie(Key_my_site, $_POST['pass'], $hour);

    //then redirect them to the members area
    header("Location: members-area.php");

    when i check database details have been inserted
     
    dougvcd, May 11, 2007 IP
  5. Chris.

    Chris. Guest

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    add this to the top of your page, THE VERY TOP, BEFORE EVERYTHING.

    
    <?php
    ob_start();
    ?>
    
    PHP:
    That should fix the header problem.
     
    Chris., May 11, 2007 IP
  6. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok just about to give up on this project
    i thought it would be simple but every time i get a prob solved another pops up
    if any one in uk can help me i dont mind ringing them as it takes a while to get answers
    just email me your number or msn and a time and date and just may be we can sort it
    cheers
    Doug
     
    dougvcd, May 11, 2007 IP