1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sql unexpected mysql_query IF then

Discussion in 'Databases' started by Sql_novice, Feb 18, 2016.

  1. #1
    Parse error: syntax error, unexpected 'mysql_query' (T_STRING)

    Line 30:

    if($count == 1 && $row[3]==md5($upass) && $row[2] == 1)
    {
    $row[1] = $email;

    $signedin = 1
    mysql_query("UPDATE `users` SET `signedin`=1 WHERE `Team`=1");

    header('Window-target: content');
    header('Location: oma_admin.php');



    }
    elseif($count == 1 && $row[3]==md5($upass) && $row[2] == 2)
    {
    $row[1] = $email;

    $signedin = 1

    mysql_query("INSERT INTO users(signedin) VALUES('$signedin') WHERE team='$row[2]'");

    header('Window-target: content');
    header('Location: fbk_admin.php');



    }

    cant seem to figure this out by searching the internet

    last part of the php

    else
    {

    <script>alert('Username / Password Seems Wrong !');</script>
    }
    ?>
     

    Attached Files:

    Sql_novice, Feb 18, 2016 IP
  2. bazilez

    bazilez Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    Just put ;

    $signedin = 1;
    mysql_query("UPDATE `users` SET `signedin`=1 WHERE `Team`=1");
     
    bazilez, Feb 18, 2016 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    The original mysql functions are deprecated in php 5.5+. You should look at using PDO, or MySQLi, or another method to handle the database interaction.
     
    jestep, Feb 19, 2016 IP
  4. Sql_novice

    Sql_novice Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    thx guys
     
    Sql_novice, Feb 20, 2016 IP