Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    96
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Need a quick syntax correction

    PHP Code:
        $sql="INSERT INTO frm_users (`username`, `password`, `user_email`, `user_level`, `user_dateformat`, `user_allowhtml`, `user_allowbbcode`, `user_allowsmile`, `user_allowavatar`, `user_allow_pm`, `user_allow_viewonline`) VALUES ('$username', '$md5password', '$email', '0', 'D M d, Y g:i a', '1', '1', '1', '1', '1', '1', )"
    I'm trying to incorporate a registration from my game to make an account on a phpbb2 forum.

    As far as I can see the code its fine, however is says something about line 1 having incorrect syntax or something?

    $Any_help == appreciated;

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You should always post the exact error message. Help a lot. Also the context of your code should be posted; what's happening before and after the one line of code you gave us?

    That said, a quick glance at your query shows you have an errant trailing comma that shouldn't be there. Remove that comma and your query should work.

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    96
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thanks

    Took the comma out and it worked fine!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •