SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: sql help

  1. #1
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sql help

    i dont know what is the error in this

    //entering the job seeker data in the user table
    $sql="INSERT INTO user2 (name, Addr, Nation, dob, Gen, cnt, mar, mil, phone, mobile, mail, user)
    VALUES
    ('$fn','$_POST[add]','$_POST[nat]','$_POST['dd']','$_POST[gg]','$_POST[cnt]','$_POST[Mar]','$_POST[Mil]','$_POST[ph]','$_POST[mo]','$_POST[mail]','$_POST[user]')";

    error
    Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\apache\htdocs\gp1\jsreg.php on line 112

    //line 112 is last line here

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by einSTein View Post
    i dont know what is the error in this

    //entering the job seeker data in the user table
    $sql="INSERT INTO user2 (name, Addr, Nation, dob, Gen, cnt, mar, mil, phone, mobile, mail, user)
    VALUES
    ('$fn','$_POST[add]','$_POST[nat]','$_POST['dd']','$_POST[gg]','$_POST[cnt]','$_POST[Mar]','$_POST[Mil]','$_POST[ph]','$_POST[mo]','$_POST[mail]','$_POST[user]')";

    error
    Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\apache\htdocs\gp1\jsreg.php on line 112

    //line 112 is last line here
    The problem lies here: '$_POST['dd']',
    after second quote the php tinks that your string ended.

  3. #3
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx man


Bookmarks

Posting Permissions

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