Closed Thread
Results 1 to 2 of 2

Thread: PHP & MySQL Problem

  1. #1
    tearsfall is offline x10Hosting Member tearsfall is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    7

    Question PHP & MySQL Problem

    I'm using PHP to insert data into MySQL and I'm running into bit of a problem. My script executes just fine, but when it comes to my query ... the query doesn't insert information into my database:

    Here's my site: http://tearsfall.pcriot.com

    here's my database table (within my forums database):

    users(userID,firstName,middleIn,lastName,userAddress,userState ,userCountry,userbirthDate,username,password,valid code,email,usergroup)

    my userID column is set on auto_increment and it's the primary key.

    and here's my PHP script:

    mysql_query("INSERT INTO users VALUES('NULL,$firstName','$middleIn','$lastName',' $userAddress','$userState','$userCountry','$userna me','$password','$validate_key','$email',1");

  2. #2
    bugfinder's Avatar
    bugfinder is offline Retired bugfinder is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    2,260

    Re: PHP & MySQL Problem

    mysql_query would return an error and looking at it..

    You have values('NULL,$firstName' .. there ' in front of NULL needs to go to in front of $

    Im also hoping theres more in your php script than that, but other issues for example should be returned by mysql_error
    :rant2:
    Please do not send me personal messages unless I have requested you to do so.
    Thank you.

    You can join us on irc for support and chat
    2 - connnect to irc either by the web interface or direct irc://irc.x10hosting.com:6667

Closed Thread

Similar Threads

  1. Problem with PHP support ticket system (Fantastico)
    By Jarryd in forum Free Hosting
    Replies: 4
    Last Post: 03-10-2008, 01:35 AM
  2. PHP issues after Global Crossing problem
    By eliasr in forum Free Hosting
    Replies: 4
    Last Post: 03-07-2008, 02:54 AM
  3. php problem
    By himgar in forum Free Hosting
    Replies: 1
    Last Post: 02-22-2008, 02:41 AM
  4. Have a problem with my forum
    By tikloos in forum Scripts & 3rd Party Apps
    Replies: 43
    Last Post: 01-19-2006, 01:14 AM
  5. MySQL problem
    By pensoftware in forum Free Hosting
    Replies: 3
    Last Post: 10-30-2005, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers