Ok I have put all the forms together on one page that I have been testing one by one to get working. Now that I have got them together I am getting this error.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id','','multi','micro','','','','','','Abilene','','')' at line 1

Being new I have no idea and have googled the error but couldn't find anything that made much sense.

here is the php file

<?
include("dbinfo.inc.php");

$nickname=$_POST['nickname'];
$str_nickname = $_POST['nickname']; 
$str_nickname = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_nickname);

$str_cache_type = $_POST['cache_type']; 
$str_cache_type = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_type);

$str_cache_size = $_POST['cache_size']; 
$str_cache_size = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_size);

$str_date_placed_month = $_POST['date_placed_month']; 
$str_date_placed_month = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_month);

$str_date_placed_day = $_POST['date_placed_day']; 
$str_date_placed_day = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_day);

$str_date_placed_year = $_POST['date_placed_year']; 
$str_date_placed_year = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_year);

$str_lat = $_POST['cordv']; 
$str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);

$str_lat = $_POST['cordv']; 
$str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);

$str_long = $_POST['cordh']; 
$str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);

$str_long = $_POST['cordv']; 
$str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);

$str_city = $_POST['city']; 
$str_city = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_city);

$str_park = $_POST['park']; 
$str_park = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_park);

$str_difficulty = $_POST['diffculty']; 
$str_difficulty = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_difficulty);

$str_terrain = $_POST['terrain']; 
$str_terrain = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_terrain);

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query = "INSERT INTO geocaches VALUES (','id','$name','$str_cache_type','$str_cache_size','$date_placed_month','$date_placed_day','$date_placed_year','$lat','$long','$str_city','$str_difficulty','$str_terrain')";
mysql_query($query)or die (mysql_error());
{
echo "Thanks for your help while we continue to develop. Click the Home button in the upper left corner to return back to the Home Page.";
}

mysql_close();
?>

here is my database set up.

TABLE `geocaches` (
  `id` int(6) NOT NULL auto_increment,
  `nickname` varchar(40) NOT NULL default '',
  `cache_type` varchar(50) NOT NULL default '',
  `cache_size` varchar(50) NOT NULL default '',
  `date_placed_month` varchar(50) NOT NULL default '',
  `date_placed_day` varchar(50) NOT NULL default '',
  `date_placed_year` varchar(50) NOT NULL default '',
  `lat` varchar(10) NOT NULL default '',
  `long` varchar(10) NOT NULL default '',
  `zipcode` varchar(7) NOT NULL default '',
  `city` varchar(40) NOT NULL default '',
  `park` varchar(40) NOT NULL default '',
  `difficulty` varchar(10) NOT NULL default '',
  `terrain` varchar(10) NOT NULL default '',
  `desc_short` varchar(255) NOT NULL default '',
  `desc_long` varchar(255) NOT NULL default '',
  `hint` varchar(100) NOT NULL default '',
  `tcid` varchar(8) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 

Thanks for the suggestions and help, I really do appreciate it.

    A couple of problems with your insert:
    1. don't try to put something in id.. it's auto incremented
    2. your value list is messed up. you begin it with: ','id','$name','$str_cache_type'... this causes the error
    3. is there a reason you left the following fields out of your insert?
    zipcode, park, desc_short, desc_long, hint, tcid

    I re-wrote your quey on multiple lines so it can be read easier.

    INSERT INTO geocaches(nickname, cache_type, cache_size,
      date_placed_month, date_placed_day, date_placed_year,
      lat, `long`, city, difficulty, terrain)
    VALUES ('$name','$str_cache_type','$str_cache_size',
      '$date_placed_month','$date_placed_day','$date_placed_year',
      '$lat','$long','$str_city', '$str_difficulty','$str_terrain')
    

      Thanks for the reply. I don't know what I was thinking with the other. I was getting some error before that said something about value count not the same as row 1 or something like that. So I Googled the error and said something about inserting the id into the query. I am still learning so I pretty much try everything. I don't know why I left the others off. Might have been because I was tired and I am sick and have no business being online right now...LoL

      Anways I used the query above and now I am getting this error.

      Parse error: parse error, unexpected T_STRING in /home/texascac/public_html/config/submit.php on line 116

      Just from looking at it I see the long is 'long' and their are some extra spaces. I tried them both ways and taking the stuff out and that wasn't it. So if someone see's something I am not and could explain the error that would be great. Thanks in advance.

      -Thanks

        UPDATE, Ok I have played with this some and can't find the error. Everything looks ok to me from what I have learned so far. Here is the error that I am getting now

        You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''long', city, difficulty, terrain) VALUES ('','traditional','micro', '','','',' at line 3

        Here is my php code

        <?
        include("dbinfo.inc.php");
        
        $nickname=$_POST['nickname'];
        $str_nickname = $_POST['nickname']; 
        $str_nickname = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_nickname);
        
        $str_cache_type = $_POST['cache_type']; 
        $str_cache_type = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_type);
        
        $str_cache_size = $_POST['cache_size']; 
        $str_cache_size = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_size);
        
        $str_date_placed_month = $_POST['date_placed_month']; 
        $str_date_placed_month = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_month);
        
        $str_date_placed_day = $_POST['date_placed_day']; 
        $str_date_placed_day = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_day);
        
        $str_date_placed_year = $_POST['date_placed_year']; 
        $str_date_placed_year = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_year);
        
        $str_lat = $_POST['cordv']; 
        $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
        
        $str_lat = $_POST['cordv']; 
        $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
        
        $str_long = $_POST['cordh']; 
        $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
        
        $str_long = $_POST['cordv']; 
        $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
        
        $str_city = $_POST['city']; 
        $str_city = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_city);
        
        $str_park = $_POST['park']; 
        $str_park = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_park);
        
        $str_difficulty = $_POST['diffculty']; 
        $str_difficulty = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_difficulty);
        
        $str_terrain = $_POST['terrain']; 
        $str_terrain = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_terrain);
        
        mysql_connect(localhost,$username,$password);
        @mysql_select_db($database) or die( "Unable to select database");
        
        $query = mysql_query("INSERT INTO geocaches (nickname, cache_type, cache_size,
          date_placed_month, date_placed_day, date_placed_year,
          lat, long, city, difficulty, terrain) VALUES ('$name','$str_cache_type','$str_cache_size',
          '$date_placed_month','$date_placed_day','$date_placed_year',
          '$lat','$long','$str_city','$str_difficulty','$str_terrain')")or die (mysql_error()); 
        {
        echo "Thanks for your help while we continue to develop. Click the Home button in the upper left corner to return back to the Home Page.";
        }
        
        mysql_close();
        ?>

        If anyone could help me out that would be great. I honestly can't see what I am doing wrong.

        -Thanks

          "long" is a reserved word in MySQL, so it must be surrounded by the backtick character: `
          This is not the same as the single quote: '

            Thank you, I copy and pasted the backtick in and no errors now. everything is not being entered from the page but I think that might know why.

              glad its working so far. if you can't get it all the way, feel free to post again!

                I think it has something to do with the form side. I think the input name isn't matching up with the php side if that makes any sense. cache_type, cache,size. city, and name are the only ones being submited from the form. Name was the only one I could get working after looking over both the form and the script What's weird is I tested each form before I put them all together on one page, and now they are not working. Everything matches up perfectly from what is was before I moved it over.

                here is the php
                here is the PHP

                  <?
                include("dbinfo.inc.php");
                
                $nickname=$_POST['name'];
                $str_nickname = $_POST['name']; 
                $str_nickname = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_nickname);
                
                $str_cache_type = $_POST['cache_type']; 
                $str_cache_type = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_type);
                
                $str_cache_size = $_POST['cache_size']; 
                $str_cache_size = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_size);
                
                $str_date_placed_month = $_POST['date_placed_month']; 
                $str_date_placed_month = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_month);
                
                $str_date_placed_day = $_POST['date_placed_day']; 
                $str_date_placed_day = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_day);
                
                $str_date_placed_year = $_POST['date_placed_year']; 
                $str_date_placed_year = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_year);
                
                $str_lat = $_POST['cordv']; 
                $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
                
                $str_lat = $_POST['cordv']; 
                $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
                
                $str_long = $_POST['cordh']; 
                $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
                
                $str_long = $_POST['cordv']; 
                $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
                
                $str_city = $_POST['city']; 
                $str_city = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_city);
                
                $str_park = $_POST['park']; 
                $str_park = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_park);
                
                $str_difficulty = $_POST['diffculty']; 
                $str_difficulty = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_difficulty);
                
                $str_terrain = $_POST['terrain']; 
                $str_terrain = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_terrain);
                
                mysql_connect(localhost,$username,$password);
                @mysql_select_db($database) or die( "Unable to select database");
                
                $query = mysql_query("INSERT INTO geocaches (nickname, cache_type, cache_size,
                  date_placed_month, date_placed_day, date_placed_year,
                  lat,`long`, city, difficulty, terrain) VALUES ('$nickname','$str_cache_type','$str_cache_size',
                  '$date_placed_month','$date_placed_day','$date_placed_year',
                  '$lat','$long','$str_city','$str_difficulty','$str_terrain')")or die (mysql_error()); 
                {
                echo "Thank You, Your listing as been submited. It will be reviewed by a moderator within 24hrs. Should your submission need further information prior to listing, a moderator will contact you. You may check the status of the geocache by visting the cache page at anytime.";
                }
                
                mysql_close();
                ?>

                Thanks for any suggstions and advice. I guess I shouldn't be working on this while I am sick, but I wanted to get this page completed before Thanksgiving.

                See the next post for the form. It wouldn't let me post it all on one thread.

                  the form HTML side is too long to post. I guess I will just have to make do with what I know and try to do some more reading.

                  -Thanks

                    use this code to find out exactly what your form is sending:

                    echo '<pre>' . print_r($_POST, true) . '</pre>';

                    Just put it anywhere on the page we've been working on, and make sure that everything is as it should be.

                      look at how many times $str_lat is being set.

                      also, $str_long is set to one thing, and then it is set to another (the same value as $str_lat).

                      $str_lat = $_POST['cordv']; 
                      $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
                      
                      $str_lat = $_POST['cordv']; 
                      $str_lat = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat);
                      
                      $str_long = $_POST['cordh']; 
                      $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
                      
                      $str_long = $_POST['cordv']; 
                      $str_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long);
                      
                        coreyp_1 wrote:

                        use this code to find out exactly what your form is sending:

                        echo '<pre>' . print_r($_POST, true) . '</pre>';

                        Just put it anywhere on the page we've been working on, and make sure that everything is as it should be.

                        What exactly is that code suppose to show? It shows this when they page is called and in the DB nothing is there now.

                        Array
                        (
                        )

                          print_r() is a function that outputs the contents of an array, so you can see what it contains.

                          The fact that yours is empty is puzzling. How it should be working is like this:

                          1. You enter info into a form

                          2. Hit submit.

                          3. You are re-directed to a new page.

                          4. On this new page, print_r() shows you what was submitted from the form in the $_POST variable.

                            Ah that is a cool little function, I added it to my personal reference guide. I was calling the php file straight from the URL instead of going through the form and entering the form out and hitting submit so this is what came up.

                            Array
                            (
                                [name] => test
                                [cache_type] => multi
                                [cache_size] => regular
                                [active] => yes
                                [date_placed_month] => November
                                [date_placed_day] => 18
                                [date_placed_year] => 2005
                                [cordv] => N
                                [lat] => 12.345
                                [cordh] => W
                                [long] => 12.345
                                [zipcode] => 75071
                                [city] => Allen
                                [park] => 75785
                                [difficulty] => 1.5
                                [comment] => test
                                [agreecheck] => on
                            )

                            So it looks like a couple are missing. here is the link for the form so you can ty it

                            http://www.texascaching.com/main/submit.html

                            Thanks for you help again.

                              $lat and $long are not set before appearing in the query (at least not in the code posted here).

                              I don't see a field in the database for cordv and cordh... have I missed something?

                              What else is not being put in the database?

                              Please show the current query you are using.

                                No you haven't missed anything, cordv and cordh isn't in the DB. I was trying to cut corners and try to add that to apporiated Lat or Long feild. I think I am going to have to add a feild for them. That would explain the two lats and long from above but I didn't set it up correctly.

                                here is the current query

                                $query = mysql_query("INSERT INTO geocaches (nickname, cache_type, cache_size,
                                  date_placed_month, date_placed_day, date_placed_year,
                                  lat,`long`, city, difficulty, terrain) VALUES ('$nickname','$str_cache_type','$str_cache_size',
                                  '$date_placed_month','$date_placed_day','$date_placed_year',
                                  '$lat','$long','$str_city','$str_difficulty','$str_terrain')")or die (mysql_error());

                                Thanks for the help

                                  and what is not being put into the database that should be?

                                  BTW, should $lat and $long be $str_lat and $str_long? After all, you went to the trouble to set the variables, and now you aren't using them in query.

                                    Ok this is where I am at right now. I went back and cleaned up the code and now that I am starting to feel better things are popping out at me. last run gave me this

                                    Array
                                    (
                                        [name] => This Cache
                                        [cache_type] => traditional
                                        [cache_size] => micro
                                        [date_placed_month] => November
                                        [date_placed_day] => 18
                                        [date_placed_year] => 2005
                                        [cordv] => N
                                        [lat1] => 12
                                        [lat2] => 34.456
                                        [cordh] => W
                                        [long1] => 096
                                        [long2] => 12.345
                                        [zipcode] => 75071
                                        [city] => Mesquite
                                        [park] => Abilene S.P.
                                        [difficulty] => 1
                                        [terrain] => 1
                                        [desc_short] => test
                                        [desc_long] => test
                                        [hint] => test
                                        [agreecheck] => on
                                    )
                                    
                                    Column count doesn't match value count at row 1

                                    Don't know what "Column count doesn't match value count at row 1" means. When cleaning things up and noticed some small errors and typos that I am sure were the problem. All of them were working except for like 3 feilds and I think I have them fixed, but when I tried to run it again I got the above error. Here is the cleaned up php

                                     <?
                                    include("dbinfo.inc.php");
                                    
                                    echo '<pre>' . print_r($_POST, true) . '</pre>';
                                    
                                    $nickname=$_POST['name'];
                                    $str_nickname = $_POST['name']; 
                                    $str_nickname = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_nickname);
                                    
                                    $str_cache_type = $_POST['cache_type']; 
                                    $str_cache_type = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_type);
                                    
                                    $str_cache_size = $_POST['cache_size']; 
                                    $str_cache_size = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cache_size);
                                    
                                    $str_active = $_POST['active']; 
                                    $str_active = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_active);
                                    
                                    $str_date_placed_month = $_POST['date_placed_month']; 
                                    $str_date_placed_month = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_month);
                                    
                                    $str_date_placed_day = $_POST['date_placed_day']; 
                                    $str_date_placed_day = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_day);
                                    
                                    $str_date_placed_year = $_POST['date_placed_year']; 
                                    $str_date_placed_year = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_date_placed_year);
                                    
                                    $str_cordv = $_POST['cordv']; 
                                    $str_cordv = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cordv);
                                    
                                    $str_lat1 = $_POST['lat1']; 
                                    $str_lat1 = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat1);
                                    
                                    $str_lat2 = $_POST['lat2']; 
                                    $str_lat2 = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_lat2);
                                    
                                    $str_cordh = $_POST['cordh']; 
                                    $str_cordh = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_cordh);
                                    
                                    $str_long1 = $_POST['long1']; 
                                    $str_long1 = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long1);
                                    
                                    $str_long2 = $_POST['long2']; 
                                    $str_long2 = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_long2);
                                    
                                    $str_zipcode = $_POST['zipcode']; 
                                    $str_zipcode = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_zipcode);
                                    
                                    $str_city = $_POST['city']; 
                                    $str_city = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_city);
                                    
                                    $str_park = $_POST['park']; 
                                    $str_park = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_park);
                                    
                                    $str_difficulty = $_POST['difficulty']; 
                                    $str_difficulty = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_difficulty);
                                    
                                    $str_terrain = $_POST['terrain']; 
                                    $str_terrain = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_terrain);
                                    
                                    $str_desc_short = $_POST['desc_short']; 
                                    $str_desc_short = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_desc_short);
                                    
                                    $str_desc_long = $_POST['desc_long']; 
                                    $str_desc_long = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_desc_long);
                                    
                                    $str_hint = $_POST['hint']; 
                                    $str_hint = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_hint);
                                    
                                    mysql_connect(localhost,$username,$password);
                                    @mysql_select_db($database) or die( "Unable to select database");
                                    
                                    
                                    $query = mysql_query("INSERT INTO geocaches (nickname, cache_type, cache_size, active, date_placed_month, date_placed_day, date_placed_year, cordv, lat1, lat2, cordh, long1, long2, city, difficulty, terrain, desc_short, desc_long, hint ) VALUES ('$str_nickname','$str_cache_type','$str_cache_size','$str_active','$str_date_placed_month','$str_date_placed_day','$str_date_placed_year','$str_cordv',
                                    '$str_lat1','$str_lat2','$str_cordh','$str_long1','$str_long2','$str_zipcode','$str_city','$str_difficulty','$str_terrain','$str_desc_short','$str_desc_long','$str_hint')")or die (mysql_error()); 
                                    
                                    $gettcid= mysql_query("SELECT * FROM geocaches WHERE tcid ORDER BY tcid DESC ")or die(mysql_error());
                                        $tc = mysql_fetch_array($gettcid);
                                    
                                    $tc_result = $tc['tcid'] + 001;
                                    
                                    $tc2= mysql_query("INSERT INTO geocaches (tcid) VALUES ('$tc_result')");  
                                    
                                    {
                                    echo "Thank You, Your listing as been submited. It will be reviewed by a moderator within 24hrs. Should your submission need further information prior to listing, a moderator will contact you. You may check the status of the geocache by visting the cache page at anytime.";
                                    }
                                    
                                    mysql_close();
                                    ?>

                                    I remember now why I had two lats and two longs. Because I was trying to hoping I could use the vaule from two forms to insert into one feild. Reason being is because of the coordinates being in MinDeg so it would be N or S 34 12.1234 etc. So what I did is went back and made a feild for each cordh lat1 lat2 and the same for long. That all works now unless thier is a way to get all that info into one feild, that would be awsome? So if someone could explain the "Column count doesn't match value count at row 1" that would be great since I think I almost have this page nailed out. Thanks for the help.

                                      UPDATE, I figured it out and all is working now. Thanks for the help coreyp_1 for getting me looking closely at the code.

                                      Ok now that I have this one finished, I have a couple of questions. I have a couple of enteries on the form that are required. Can someone point me towards a code of some sort that would make people fill in those fields before they can submit it. For example if someone left one blank and tried to submit it without it, It would say yada yada needs to be completed, etc.

                                      Also can I add a feild to this table in the DB that would not have data entered from this submission form? I know what might sound like a stupid question, just curious because I would like to add stuff to that table from another page and form. Just didnt know if that would throw the query off or not for the insert.

                                        • On how to have a required form element:
                                          You can either do this client side (with something like javascript), or server side (with php). Since I don't know much about javascript, I use php, and do something like this:

                                          1. The user inputs data into a form, and hits submit.

                                          2. On the receiving page, data is validated.

                                          3. If there are any problems, output an error message and re-print the form, filling in the data already provided.

                                          4. If there was no error, then do the prescribed action, and give a success message.

                                          Now, if you really want to exercise your programming skills, it is possible to do all this with only one PHP file, but this is not necessary.

                                        • As for your second question, there is no problem with leaving columns blank when inserting new rows into a database. After all, you can always update them later! Any column that you do not specifically assign a value will assume the default value given in the table definition.

                                        On a side note, I am happy to say that I will be coming back home to Texas (north central) this Thanksgiving! 😃