Syntax error using

I use php and mysql for this application.

<?php
include_once('config.php');

$user = $_POST['username'];
$pass = md5($_POST['password']);

$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
$sql = "SELECT usr_id FROM $tb_users WHERE usr_username = '$user' and usr_password = '$pass'"; //line 12
$result = @mysql_query($sql,$connection) or die(mysql_error());
$num_rows = mysql_num_rows($result);
?>

I get the following error:

Parse error : syntax error, unexpected '=' in /home/admin/public_html/Smet/scripts/config.php online 12

I can't locate the question where this problem occurs, any help would be appreciated.

p.s. I've just included the portion of code that is carried out when my script and marked line 12 as a comment.

~ justin

He tells you that the error is in config.php. You should post the content of this script instead.

Tags: Dreamweaver

Similar Questions

  • Error: you have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ')' at line 5

    Original title: how to solve this problem:

    System error

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ')' at line 5

    Hi Roger,

    It seems that you have problems with the SQL syntax. The question you have posted is related to encoding and it would be better suited to the MSDN Community. Please report it in the community below.

    http://social.msdn.Microsoft.com/forums/SQLServer/en-us/home

    Hope this is useful.

  • Syntax error when you use 'let '.

    HI gentlemen,

    I have a small XQuery file that works A1 if I do not use leash $p... However, the scheme is deeply nested and I tried to do for the sake of readability. Now I always get a syntax error - it will put in place with 'let' and 'element' together. Here is a test for a single line. By removing $p and re - his replacement by its content, it's OK.
    <?xml version="1.0" encoding='windows-1252'?>
    <!--<?xml-stylesheet type="text/xsl" href="icd.xsl"?>-->
    <page xmlns:xsql="urn:oracle-xsql"  connection="gksconnection">
    <xsql:include-xml xmlns:xsql="urn:oracle-xsql">
    SELECT XMLSerialize(DOCUMENT
    XMLQuery(
      'xquery version "1.0"; (: :)
       declare namespace n1="urn:ehd/001"; (: :)
       declare namespace n2="urn:ehd/icd/001"; (: :)
    
    let $p := /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel
    
       element h 
       {  
         /n1:ehd/n1:header/n1:provider/n1:organization/n1:id/@EX,
         element kap 
         {
           $p[n2:gruppen_liste/n2:gruppe/n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:nummer,
           /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel[n2:gruppen_liste/n2:gruppe/n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:bezeichnung,
           /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel[n2:gruppen_liste/n2:gruppe/n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:von_icd_code,
           /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel[n2:gruppen_liste/n2:gruppe/n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:bis_icd_code,
           element group 
           {
              /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel/n2:gruppen_liste/n2:gruppe[n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:bezeichnung,
              /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel/n2:gruppen_liste/n2:gruppe[n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:von_icd_code, 
              /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel/n2:gruppen_liste/n2:gruppe[n2:diagnosen_liste/descendant::n2:diagnose/n2:icd_code/@V="{@icd_code}"]/n2:bis_icd_code, 
              element diag
              {
                 /n1:ehd/n1:body/n2:icd_stammdaten/n2:kapitel_liste/n2:kapitel/n2:gruppen_liste/n2:gruppe/n2:diagnosen_liste/descendant::n2:diagnose[n2:icd_code/@V="{@icd_code}"]
              }
           }
         }
       }'
      PASSING xml_document
      RETURNING CONTENT
    )
    AS CLOB INDENT SIZE = 2
    ) as result
    FROM icd
    where id = {@idno} 
    </xsql:include-xml>
    </page>
    Can someone help me find the cause of the error? Unfortunately, I need some 'header' < chapter > and < group > data too, which lies over the "core" of the query: < diagnose > node. That's why I chose the technique of qualification.

    Thank you, best regards

    Miklós HERBOLY
     RESULT
     --------------------------------------------------------------------------------
     
       
         
       
                                                                                                                         
    

    OK, you get the empty elements on 11.2.0.2, so there is certainly a problem on this version.
    The fact that the NO_XML_QUERY_REWRITE indicator work means that there is a problem with the optimizer tries to use the internal binary XML structure to deal with the XQuery.

    I can't say much more than that, but since the test case is simple enough, you probably connect a SR with Oracle Support on that one.

  • Flash complains about XML? IM using AS3 why are there errors XML? Unknown syntax errors.

    Sorry to keep spamming these forums with my stupid mistakes, but I'm trying really hard to learn Flash/AS3 and when I got to wrestling with it, I will definitely love.

    I am a rookie flash trying to make a simple computing device and I'm doing me a world of errors, I've never seen before.

    My Code (excuse me, but maybe it's my bad syntax):

    import flash.ui.Mouse;

    var Hnum:String;

    var PCnum:String;

    var calc:Number = 25;

    var Total: Number;

    NUM1. Restrict = "0-9";

    num2. Restrict = "0-9";

    Est_btn.addEventListener (MouseEvent.Click, Calculate);

    function PartCount(event:MouseEvent):void {}

    PCnum = num2.text;

    If (PCnum > 0 & & < 10) {}

    parseInt (PCnum) * 10;

    }

    or if (PCnum > 11 & & < 20) {}

    parseInt (PCnum) * 5;

    }

    or if (PCnum > 21) {}

    parseInt (PCnum) * 1;

    }

    }

    Est_btn.addEventListener (MouseEvent.Click, Calculate);

    function calculate(event:MouseEvent):void {}

    Hnum = num1.text;

    PCnum = num2.text;

    Total = parseInt (Hnum) * calc + parseInt (PCnum);

    Total.toString ();

    Total_txt. Text = String (Total);

    }

    }

    I had all this work, I was only calculation Hnum by 25. But when I try to intergrate the fi or statement so bad, and I get these 5 mistakes.

    Scene 1, Layer 'Actions', frame 1, line 151104: invalid xml name

    Scene 1, Layer 'Actions', frame 11084: syntax error: expected xmltagendend before the end of the program.

    Scene 1, Layer 'Actions', frame 11084: syntax error: expected rightparen before the end of the program.

    Scene 1, Layer 'Actions', frame 11084: syntax error: expecting identifier before the end of the program.

    Scene 1, Layer 'Actions', frame 11084: syntax error: expected rightbrace before the end of the program.

    I don't understand what these errors are emphasizing? Why XML? What is my variable names?

    Here is the code that I had before the second function that worked well:

    var Hnum:String;

    var PCnum:String;

    var calc:Number = 25;

    var Total: Number;

    NUM1. Restrict = "0-9";

    num2. Restrict = "0-9";

    Est_btn.addEventListener (MouseEvent.Click, Calculate);

    function calculate(event:MouseEvent):void {}

    Hnum = num1.text;

    PCnum = num2.text;

    Total = parseInt (Hnum) * calc;

    Total.toString ();

    Total_txt. Text = String (Total);

    }

    Any help would be greatly appreciated! I'll get the hang of this!

    MrB

    Maybe is a parsing problem

    Date of arrival:

    PCnum = num2.text;

    If (PCnum > 0 &)< 10){ =""><   you're="" comparing="" text="" against="" numbers="" and=""><10 es="" comparing="" agaist="" nothing="" this="" can="" be="" a="">

    Use rather

    PCnum = int (num2.text);

    If (PCnum > 0 & PCnum)<>

  • When I test my recordset I get the data, but when I try to use it I get syntax error

    Hello

    My recordset looks like this and it works when I test it in the "links/Recordset' but when I locked it and I try to click on the + I get an error message. MySQL Error #: 1064

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near "on line 2

    SELECT AuthorID,AuthFname, AuthInitial, AuthLName, @name := (SELECT concat_WS(', ',AuthFname, AuthInitial, AuthLName)
    FROM BookAuthor B
    WHERE A.AuthorID = B.AuthorID )  FROM BookAuthor A
    ORDER BY AuthLName, AuthFname, AuthInitial 
    

    What I'm trying to do is to use the AuthorID as value and the name concatenated for label in a list/menu and choose several authors if necessary when I sign up a book.

    Maybe there's an easier way to do this?

    I tried concatenate fields in the list/menu Dynamics (label), but I could not.

    Any suggestions?

    Best regards

    Anna

    Sorry, your post is very confusing and you have yet to explain why you use a derived table query.

    It seems that you need a simple select statement.

    Select AuthorID, AuthFname, AuthInitial, AuthLName, CONCAT_WS (",", AuthFname, AuthInitial, AuthLName) as an author

    Of BookAuthor

    Note that I do not use MySQL and so not really familiar with its CONCAT_WS function but you get the idea. Am I missing something here?

  • Why my emails sent to customers yahoo and mindspring rejected for syntax errors?

    Here is the error message:

    Delivery to the following recipient failed permanently:

        Lisa@[email protected]
    

    Technical details of permanent failure:
    Google has tried to convey your message, but it was rejected by the server for domain yahoo.com by mta7.am0.yahoodns.netrecipient. [98.138.112.37].

    The error that the other server returned was:
    501 Syntax error in parameters or arguments

    Having two ' @' characters seems quite problematic.

    What version of Thunderbird do you use? I read a different view today where there was apparently stray characters being added to the email address.

    Can you identify which parts of the address are correct, and the bits seem to have been added?

  • Calculator HP 35s - wind power program "syntax error".

    I have concluded the following equation to wind mode ALG one program on my 35 s HP and get "Syntax Error" when RUNNING.

    Wind chill (° F) = 35.74 + 0.6215 T - 35.75(V^0.16) + 0.4275 T(V^0.16)

    The equation can be referenced at http://www.srh.noaa.gov/ssd/html/windchil.htm

    Here's my schedule:

    W001 LBL W

    W002 T OF ENTRY

    ENTRY W003 V

    W004 35.74 + 0.6215 T - 35.75(V^0.16) + 0.4275 T(V^0.16) ►W

    W005 RTN

    I'm a newbie when it comes to programming on the 35 HP s, but I entered the same equation in a TI-83 and a Casio fx - 4200P and it works very well on these calculators without error.

    I use a similar program on my 35 HP s for the calculation of dew point, and it works very well without any problems either. I've listed below for reference:

    D001 LBL D

    D002 F ENTRY

    D003 OF ENTRY R

    D004 (F - 32) x5÷ 9► C

    ► 1-(0.01xR) D005 X

    D006 C-(14.55 + 0.114xC) xX xX-((2.5+0.007xC)) ^ 3-(15.9+0.117xC) xX ^ 14► D

    D007 Dx1.8 + D 32►

    D008 RTN

    Any help on this will be greatly appreciated!

    Thank you.

    Hello

    You have to put a sign of multiplication between the 0.6215 and T, & 0.4275 and T for the W004 line looks like this:

    W004 35.74 + 0.6215xT - 35.75(V^0.16) + 0.4275xT (V ^ 0.16) ►W

    Concerning

    BartdB

  • Downgrade from Windows 7 to XP. "Syntax error in the .sif file.

    Every afternoon.

    I wasn't totally sure what forum to put this in.

    My boss bought a new laptop of A11 - 11: my my line manager and asked that he be demoted to XP and put it on our network. (usually, it didn't network.)

    It's Windows 7, so I know that's not easy to downgrade.

    I changed the SATA setting in bios compatibility (IDE) and that allowed me to start running the installation CD.

    Then, I got this error;

    "There is a syntax error in the." SIF file used by Setup Online: 8971.

    Setup cannot continue. Stop or restart your computer. »

    I have this with 3 different original discs

    Looking around without decommissioning is to get rid of all the recovery partitions. So, I have that one hidden and now I have a large main drive to NTFS.

    I still get the same error. No recovery disk. Original discs and now I'm totally stumped.

    Are there any other settings in the Bios maybe I need to change?

    Anyone has an idea what I might try?

    See you soon
    Stu

    You should try to install Windows XP Home (SP2 or SP3) using SATA driver to start loading. In this case do not use the compatibility mode but AHCI mode.

    Without load the driver (F6 option at startup to install of WXP) SATA disk HARD will be not visible to Windows XP Home edition.
    Option of job search on this forum and you will find so many threads on the installation of Windows XP Home on the latest portable Win7 supported.

  • DB connectivity Kit: syntax error in a SELECTION of data from joined tables

    Hello everyone

    I'm putting in labview a SQL query on joined tables.

    As an example I take a database to store the data of basketball 2on2 matches, which tables are

    corresponds to (matchId, Thomas, teamB)

    teams (teamId,PlayerAname, PlayerBname, nationality)

    nationalities (NatId, natName)

    To get an array of result with the game as well as the names of player as well as their nationality, I use this query on MySQL (which works on command line interface)

    SELECT MatchID,
    T1. PlayerAName, t1. PlayerBName, n1.natName,
    T2. PlayerAName, t2. PlayerBName, n2.natName
    MATCHES m
    INNER JOIN teams t1 ON t1.teamID = m.teamA
    INNER JOIN teams t2 ON t2.teamID = m.teamB
    INNER JOIN nationalities L1 ON n1.natID = t1.nationality
    INNER JOIN nationalities n2 ON n2.natID = t2.nationality

    When I put it in labview, using the block 'select data', I get a syntax error as shown in the attached screenshot.

    Am I something mistanking using the JOIN examples statements or aliases?

    Thanks in advance!

    The select VI is designed to be a simple way to select from a table. I doubt that he can do joins (and would not certainly need the 'FROM', even if it can). What you can do instead calls the query execute VI and give him the complete SQL query. I don't remember if it returns the data in the recordset object, so you must do so separately.

  • MathScript syntax error

    Can someone let me know what the syntax error in the present

    If ((A > = 1,70) & (a)<>
    A = 1
    If ((A > = 1.34) & (a)<>
    A = 1
    If ((A > = 0,925) & (a)<>
    B = 1
    If ((A > = 1.305) & (a)<>
    B = 1
    If ((A > = 1,935) & (a)<>
    C = 1
    If ((A > = 1,72) & (a)<>
    D = 1
    If ((A > = 1,70) & (a)<>
    E = 1
    If ((A > = 1,65) & (a)<>
    F = 1
    If ((A > = 1,29) & (a)<>
    G = 1
    If ((A > = 1.0) & (a)<>
    H = 1
    on the other
    I have = 1
    end

    Thank you chris

    I suppose you want all these s if (except the first) to be an elseif.  If this isn't the case, then you want to terminate after each individual case.

    In addition, it is not a bad idea to start one; at the end of each statement.  (Not the lines containing if, elseif or end)

    In addition, you probably want to use & instead of &.  I don't know if mathscript makes a distinction between the two, but I know some languages.  The help file for use mathscript &, then I'd go with that.  Someone at - it care to confirm if there is a difference?

  • that means "syntax error" - I often get this message on the commissioning

    Often, I get a "syntax error" message when I start my pc - whhat does that mean?

    Hi Gerald,

    1. What is the full error message that you receive?

    2. did you of recent changes on the system?

    3 Windows operating system you are using?

    4. are you able to boot into normal mode after receiving the error message?

    This means an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.

    Because you receive the error message at Windows startup, you can try to perform a clean boot and check if the problem occurs.

    A clean boot to check if startup item or services to third-party application is causing this issue.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    After you resolve the problem, see step 7 in the article above to restore your computer to a Normal startup mode.

  • LDIF syntax error: what is the reason of this failure when you try to import the new user

    What is the reason of this failure when you try to import the new user, followed the book syntax

    C:\Users\Administrator\Documents>ldifde-i f Newusers.ldf
    Connecting to "practice01.testa01.com".
    Registration as current user using SSPI
    Import directory of the file "Newusers.ldf".
    Loading entries.
    There is a syntax error in the input file
    Failure on line 3.  The last token starts with 'C '.
    0 entries modified with success.
    An error has occurred in the program

    Hello

    The question you have posted is related to LDIFDE with Active Directory in a domain environment, and would be better suited to the TechNet community. Please visit the link below to find a community that will provide the best support.

    http://TechNet.Microsoft.com/en-us/default.aspx

  • IAM trying to get a pdf file to open, but it keeps telling me that I have a sql syntax error, how can I solve this

    Hello I have an email in outlook express I need to open a pdf file to, whenever I try to open the pdf file, told me that I have a SQL syntax error, how can I fix this problem

    Hello

    I suggest you to follow the steps in this link and check if it helps:

    http://answers.Microsoft.com/en-us/Office/Forum/office_2010-Outlook/cannot-open-preview-of-PDF-attachment-in-Outlook/a68e5aa4-F730-4b5d-b1ca-b8670d679240?page=3

    It will be useful.

  • I install windows xp on a sony laptop. I created a new formatted partition but I get a fatal error message: "syntax error:"D:\I386\asms\10\MSFT\WINDOWS\GDIPLUS\GDIPLUS. " MAN. "

    I install windows xp on a sony laptop. I created a new formatted partition but I get a fatal error message.  one of the components that windows needs to continue Setup could not be installed. Manifest Parse Error: an invalid character was found in text content. Connect the system configuration error: SXS. DLL:syntax error in manifest or policy file "D:\I386\asms\10\MSFT\WINDOWS\GDIPLUS\GDIPLUS. MAN 'at line 0. I bought the oem software installation disc. I bought the computer used and did not get any disk with it. Help, please

    1 person got this response
    Shawn thought it was bad media so I'm a new disc and received the same error does anyone have an idea what might cause this error?

    original title: install windows xp

    Hi sptusch,

    Thanks for posting. Is it a burned disc? If this is you please redownload the image. Also, try the following.

    1. place your Windows XP installation CD and start to her...
    2. Press any button to start the Windows installation (don't worry... we do not actually use the installer at this point)
    3. wait a few moments for the installation program starts, when you see repair an installation of Windows XP using the Recovery Console, and then press the R key
    4. wait until you see this screen, enter the number of your master installation. (Typically 1 to C:\Windows)
    5. press ENTER.
    6. If you are prompted to do so, enter your administrator password. If you don't have one, leave the field blank and press to enter.
    7. from the command prompt, type: chkdsk/r (note the space between chkdsk and / r)
    Allow it to complete undisturbed.
    8. remove the disc, then restart.

    I hope this helps!
    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Syntax error in example VB2010 help

    With the help of VB2010, I get a syntax error when trying to use the maze tutorial (Tutorial2 step 3), the error is on the handles of Word in the following text
    Handles finishLabel.MouseEnter
    Thank you all,
    Stem

    You can find help in the programming on the MSDN forum: http://social.msdn.microsoft.com/Forums/en/category/visualbasic

Maybe you are looking for