Jump to content

submiting text to mysql, its not doing it


Birdmansplace

Recommended Posts

I have make a schedule for work and useing some 150 form entry's.  It does connect to the database but not querying the table.  the code here is a moded from one i used a long time ago for a donate page.  Can any one see something i am missing or messed up.

 

Just a heads up the code is 410 lines long, I have yet to write an output page and i am just lookin through phpadmin it self to see if has writen anything to it. For those who want to see the lay out: http://birdmansplace.com/temp3/donate.php

 

<div align="center">


<?php

if (isset($_POST['submit']))

{ 

     if (strlen($_POST['date0']) > 0)
     {$username=TRUE;}
     else {$username=FALSE;
          $message_username="* You forgot to enter the username!";}

     if (strlen($_POST['date1']) > 0)
         {$amount=TRUE;
                                if (is_numeric($_POST['date1']))
                                {$amountnumericcheck=TRUE;}
                                else {$amountnumericcheck=FALSE;
                           $message_amountnumericcheck=" *Please enter numeric values only!";
                                //echo "$message_amountnumericcheck";
                                }
                       }
   else    {$price=FALSE;
       $message_amount=" *You forgot to enter the amount!";}

     if 
        ($username && $amount &&amountnumericcheck)
        {                       
                   //YOU NEED TO HAVE AN EXTERNAL PHP FILE WITH YOUR DATABASE CONNECTION DETAILS. LET ME KNOW IF YOU DON'T KNOW HOW             
                   include("dbinfo.php");
                   mysql_connect(localhost,$username,$password);
                   @mysql_select_db($database) or die( "Unable to establish a connection to the relevant database.");

				$date0 = mysql_real_escape_string($_POST['date0']);
                    $date1 = mysql_real_escape_string($_POST['date1']);
				$date2 = mysql_real_escape_string($_POST['date2']);
				$date3 = mysql_real_escape_string($_POST['date3']);
				$date4 = mysql_real_escape_string($_POST['date4']);
				$date5 = mysql_real_escape_string($_POST['date5']);
				$date6 = mysql_real_escape_string($_POST['date6']);
				$date7 = mysql_real_escape_string($_POST['date7']);
				$day = mysql_real_escape_string($_POST['day']);
				$day1 = mysql_real_escape_string($_POST['day1']);
				$day2 = mysql_real_escape_string($_POST['day2']);
				$day3 = mysql_real_escape_string($_POST['day3']);
				$day4 = mysql_real_escape_string($_POST['day4']);
				$day5 = mysql_real_escape_string($_POST['day5']);
				$day6 = mysql_real_escape_string($_POST['day6']);
				$day7 = mysql_real_escape_string($_POST['day7']);
				$row1 = mysql_real_escape_string($_POST['row1']);
				$row2 = mysql_real_escape_string($_POST['row2']);
				$row3 = mysql_real_escape_string($_POST['row3']);
				$row4 = mysql_real_escape_string($_POST['row4']);
				$row5 = mysql_real_escape_string($_POST['row5']);
				$row6 = mysql_real_escape_string($_POST['row6']);
				$row7 = mysql_real_escape_string($_POST['row7']);
				$row8 = mysql_real_escape_string($_POST['row8']);
				$row9 = mysql_real_escape_string($_POST['row9']);
				$row10 = mysql_real_escape_string($_POST['row10']);
				$row11 = mysql_real_escape_string($_POST['row11']);
				$row12 = mysql_real_escape_string($_POST['row12']);
				$row13 = mysql_real_escape_string($_POST['row13']);
				$row14 = mysql_real_escape_string($_POST['row14']);
				$row15 = mysql_real_escape_string($_POST['row15']);
				$row16 = mysql_real_escape_string($_POST['row16']);
				$row17 = mysql_real_escape_string($_POST['row17']);
				$row18 = mysql_real_escape_string($_POST['row18']);
				$row19 = mysql_real_escape_string($_POST['row19']);
				$row20 = mysql_real_escape_string($_POST['row20']);
				$row21 = mysql_real_escape_string($_POST['row21']);
				$row22 = mysql_real_escape_string($_POST['row22']);
				$row23 = mysql_real_escape_string($_POST['row23']);
				$row24 = mysql_real_escape_string($_POST['row24']);
				$row25 = mysql_real_escape_string($_POST['row25']);
				$row26 = mysql_real_escape_string($_POST['row26']);
				$row27 = mysql_real_escape_string($_POST['row27']);
				$row28 = mysql_real_escape_string($_POST['row28']);
				$row29 = mysql_real_escape_string($_POST['row29']);
				$row30 = mysql_real_escape_string($_POST['row30']);
				$row31 = mysql_real_escape_string($_POST['row31']);
				$row32 = mysql_real_escape_string($_POST['row32']);
				$row33 = mysql_real_escape_string($_POST['row33']);
				$row34 = mysql_real_escape_string($_POST['row34']);
				$row35 = mysql_real_escape_string($_POST['row35']);
				$row36 = mysql_real_escape_string($_POST['row36']);
				$row37 = mysql_real_escape_string($_POST['row37']);
				$row38 = mysql_real_escape_string($_POST['row38']);
				$row39 = mysql_real_escape_string($_POST['row39']);
				$row40 = mysql_real_escape_string($_POST['row40']);
				$row41 = mysql_real_escape_string($_POST['row41']);
				$row42 = mysql_real_escape_string($_POST['row42']);
				$row43 = mysql_real_escape_string($_POST['row43']);
				$row44 = mysql_real_escape_string($_POST['row44']);
				$row45 = mysql_real_escape_string($_POST['row45']);
				$row46 = mysql_real_escape_string($_POST['row46']);
				$row47 = mysql_real_escape_string($_POST['row47']);
				$row48 = mysql_real_escape_string($_POST['row48']);
				$row50 = mysql_real_escape_string($_POST['row50']);
				$row51 = mysql_real_escape_string($_POST['row51']);
				$row52 = mysql_real_escape_string($_POST['row52']);
				$row53 = mysql_real_escape_string($_POST['row53']);
				$row54 = mysql_real_escape_string($_POST['row54']);
				$row55 = mysql_real_escape_string($_POST['row55']);
				$row56 = mysql_real_escape_string($_POST['row56']);
				$row57 = mysql_real_escape_string($_POST['row57']);
				$row58 = mysql_real_escape_string($_POST['row58']);
				$row59 = mysql_real_escape_string($_POST['row59']);
				$row60 = mysql_real_escape_string($_POST['row60']);
				$row61 = mysql_real_escape_string($_POST['row61']);
				$row62 = mysql_real_escape_string($_POST['row62']);
				$row63 = mysql_real_escape_string($_POST['row63']);
				$row64 = mysql_real_escape_string($_POST['row64']);
				$row65 = mysql_real_escape_string($_POST['row65']);
				$drive1 = mysql_real_escape_string($_POST['drive1']);
				$drive2 = mysql_real_escape_string($_POST['drive2']);
				$drive3 = mysql_real_escape_string($_POST['drive3']);
				$drive4 = mysql_real_escape_string($_POST['drive4']);
				$drive5 = mysql_real_escape_string($_POST['drive5']);
				$drive6 = mysql_real_escape_string($_POST['drive6']);
				$drive7 = mysql_real_escape_string($_POST['drive7']);
				$drive8 = mysql_real_escape_string($_POST['drive8']);
				$drive9 = mysql_real_escape_string($_POST['drive9']);
				$drive10 = mysql_real_escape_string($_POST['drive10']);
				$drive11 = mysql_real_escape_string($_POST['drive11']);
				$drive12 = mysql_real_escape_string($_POST['drive12']);
				$drive13 = mysql_real_escape_string($_POST['drive13']);
				$drive14 = mysql_real_escape_string($_POST['drive14']);
				$drive15 = mysql_real_escape_string($_POST['drive15']);
				$drive16 = mysql_real_escape_string($_POST['drive16']);
				$drive17 = mysql_real_escape_string($_POST['drive17']);
				$drive18 = mysql_real_escape_string($_POST['drive18']);
				$drive19 = mysql_real_escape_string($_POST['drive19']);
				$drive20 = mysql_real_escape_string($_POST['drive20']);
				$drive21 = mysql_real_escape_string($_POST['drive21']);
				$drive22 = mysql_real_escape_string($_POST['drive22']);
				$drive23 = mysql_real_escape_string($_POST['drive23']);
				$drive24 = mysql_real_escape_string($_POST['drive24']);
				$drive25 = mysql_real_escape_string($_POST['drive25']);
				$drive26 = mysql_real_escape_string($_POST['drive26']);
				$drive27 = mysql_real_escape_string($_POST['drive27']);
				$drive28 = mysql_real_escape_string($_POST['drive28']);
				$drive29 = mysql_real_escape_string($_POST['drive29']);
				$drive30 = mysql_real_escape_string($_POST['drive30']);
				$drive31 = mysql_real_escape_string($_POST['drive31']);
				$drive32 = mysql_real_escape_string($_POST['drive32']);
				$drive33 = mysql_real_escape_string($_POST['drive33']);
				$drive34 = mysql_real_escape_string($_POST['drive34']);
				$drive35 = mysql_real_escape_string($_POST['drive35']);
				$drive36 = mysql_real_escape_string($_POST['drive36']);
				$drive37 = mysql_real_escape_string($_POST['drive37']);
				$drive38 = mysql_real_escape_string($_POST['drive38']);
				$drive39 = mysql_real_escape_string($_POST['drive39']);
				$drive40 = mysql_real_escape_string($_POST['drive40']);
				$drive41 = mysql_real_escape_string($_POST['drive41']);
				$drive42 = mysql_real_escape_string($_POST['drive42']);
				$drive43 = mysql_real_escape_string($_POST['drive43']);
				$drive44 = mysql_real_escape_string($_POST['drive44']);
				$drive45 = mysql_real_escape_string($_POST['drive45']);
				$drive46 = mysql_real_escape_string($_POST['drive46']);
				$drive47 = mysql_real_escape_string($_POST['drive47']);
				$drive48 = mysql_real_escape_string($_POST['drive48']);
				$drive49 = mysql_real_escape_string($_POST['drive49']);
				$drive50 = mysql_real_escape_string($_POST['drive50']);
				$drive51 = mysql_real_escape_string($_POST['drive51']);
				$drive52 = mysql_real_escape_string($_POST['drive52']);
				$drive53 = mysql_real_escape_string($_POST['drive53']);
				$drive54 = mysql_real_escape_string($_POST['drive54']);
				$drive55 = mysql_real_escape_string($_POST['drive55']);
				$drive56 = mysql_real_escape_string($_POST['drive56']);
				$drive57 = mysql_real_escape_string($_POST['drive57']);
				$drive58 = mysql_real_escape_string($_POST['drive58']);
				$drive59 = mysql_real_escape_string($_POST['drive59']);
				$drive60 = mysql_real_escape_string($_POST['drive60']);
				$drive61 = mysql_real_escape_string($_POST['drive61']);
				$drive62 = mysql_real_escape_string($_POST['drive62']);
				$drive63 = mysql_real_escape_string($_POST['drive63']);
				$drive64 = mysql_real_escape_string($_POST['drive64']);
				$drive65 = mysql_real_escape_string($_POST['drive65']);
				$drive66 = mysql_real_escape_string($_POST['drive66']);
				$drive67 = mysql_real_escape_string($_POST['drive67']);
				$drive68 = mysql_real_escape_string($_POST['drive68']);
				$drive69 = mysql_real_escape_string($_POST['drive69']);
				$drive70 = mysql_real_escape_string($_POST['drive70']);
				$drive71 = mysql_real_escape_string($_POST['drive71']);
				$drive72 = mysql_real_escape_string($_POST['drive72']);
				$drive73 = mysql_real_escape_string($_POST['drive73']);
				$drive74 = mysql_real_escape_string($_POST['drive74']);
				$drive75 = mysql_real_escape_string($_POST['drive75']);
				$drive76 = mysql_real_escape_string($_POST['drive76']);
				$drive77 = mysql_real_escape_string($_POST['drive77']);
				$drive78 = mysql_real_escape_string($_POST['drive78']);
				$drive79 = mysql_real_escape_string($_POST['drive79']);
				$drive80 = mysql_real_escape_string($_POST['drive80']);          	
                    $ipaddress = getenv('REMOTE_ADDR');
                    $now_datetime = date('Y-m-d h:i:s');

                   

                   $query = "INSERT INTO schedule VALUES ('',`$date0`,`$date1`,`$date2`,`$date3`,`$date4`,`$date5`,`$date6`,`$date7`,`$day`,`$day1`,`$day2`,`$day3`,`$day4`,`$day5`,`$day6`,`$day7`,`$row1`,`$row2`,`$row3`,`$row4`,`$row5`,`$row6`,`$row7`,`$row8`,`$row9`,`$row10`,`$row11`,`$row12`,`$row13`,`$row14`,`$row15`,`$row16`,`$row17`,`$row18`,`$row19`,`$row20`,`$row21`,`$row22`,`$row23`,`$row24`,`$row25`,`$row26`,`$row27`,`$row28`,`$row29`,`$row30`,`$row31`,`$row32`,`$row33`,`$row34`,`$row35`,`$row36`,`$row37`,`$row38`,`$row39`,`$row40`,`$row41`,`$row42`,`$row43`,`$row44`,`$row45`,`$row46`,`$row47`,`$row48`,`$row50`,`$row51`,`$row52`,`$row53`,`$row54`,`$row55`,`$row56`,`$row57`,`$row58`,`$row59`,`$row60`,`$row61`,`$row62`,`$row63`,`$row64`,`$row65`,`$drive1`,`$drive2`,`$drive3`,`$drive4`,`$drive5`,`$drive6`,`$drive7`,`$drive8`,`$drive9`,`$drive10`,`$drive11`,`$drive12`,`$drive13`,`$drive14`,`$drive15`,`$drive16`,`$drive17`,`$drive18`,`$drive19`,`$drive20`,`$drive21`,`$drive22`,`$drive23`,`$drive24`,`$drive25`,`$drive26`,`$drive27`,`$drive28`,`$drive29`,`$drive30`,`$drive31`,`$drive32`,`$drive33`,`$drive34`,`$drive35`,`$drive36`,`$drive37`,`$drive38`,`$drive39`,`$drive40`,`$drive41`,`$drive42`,`$drive43`,`$drive44`,`$drive45`,`$drive46`,`$drive47`,`$drive48`,`$drive49`,`$drive50`,`$drive51`,`$drive52`,`$drive53`,`$drive54`,`$drive55`,`$drive56`,`$drive57`,`$drive58`,`$drive59`,`$drive60`,`$drive61`,`$drive62`,`$drive63`,`$drive64`,`$drive65`,`$drive66`,`$drive67`,`$drive68`,`$drive69`,`$drive70`,`$drive71`,`$drive72`,`$drive73`,`$drive74`,`$drive75`,`$drive76`,`$drive77`,`$drive78`,`$drive79`,`$drive80`,'$ipaddress',NOW())";
                   mysql_query($query);

              
                   echo "<font size='4'>has been sumited !</font>";
	   
		exit();
              }

}

?>

<br />
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">

<input type="text" name="date" id="date" value="Date<?php if (isset($_POST['date'])) echo $_POST['date']; ?>"size="12" maxlength="12"/>
<input type="text" name="date1" id="date1" value="<?php if (isset($_POST['date1'])) echo $_POST['date1']; ?>"size="10" maxlength="10"/>
<input type="trans" name="date2" id="date2" value="<?php if (isset($_POST['date2'])) echo $_POST['date2']; ?>"size="10" maxlength="10"/>
<input type="text" name="date3" id="date3" value="<?php if (isset($_POST['date3'])) echo $_POST['date3']; ?>"size="10" maxlength="10"/>
<input type="text" name="date4" id="date4" value="<?php if (isset($_POST['date4'])) echo $_POST['date4']; ?>"size="10" maxlength="10"/>
<input type="text" name="date5" id="date5" value="<?php if (isset($_POST['date5'])) echo $_POST['date5']; ?>"size="10" maxlength="10"/>
<input type="text" name="date6" id="date6" value="<?php if (isset($_POST['date6'])) echo $_POST['date6']; ?>"size="10" maxlength="10"/>
<input type="text" name="date7" id="date7" value="<?php if (isset($_POST['date7'])) echo $_POST['date7']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="day" id="day" value="Day<?php if (isset($_POST['day'])) echo $_POST['day']; ?>"size="12" maxlength="12"/>
<input type="text" name="day1" id="day1" value="Monday<?php if (isset($_POST['day1'])) echo $_POST['day1']; ?>"size="10" maxlength="10"/>
<input type="text" name="day2" id="day2" value="Tuesday<?php if (isset($_POST['day2'])) echo $_POST['day2']; ?>"size="10" maxlength="10"/>
<input type="text" name="day3" id="day3" value="Wednesday<?php if (isset($_POST['day3'])) echo $_POST['day3']; ?>"size="10" maxlength="10"/>
<input type="text" name="day4" id="day4" value="Thursday<?php if (isset($_POST['day4'])) echo $_POST['day4']; ?>"size="10" maxlength="10"/>
<input type="text" name="day5" id="day4" value="Friday<?php if (isset($_POST['day5'])) echo $_POST['day5']; ?>"size="10" maxlength="10"/>
<input type="text" name="day6" id="day6" value="Saturday<?php if (isset($_POST['day6'])) echo $_POST['day6']; ?>"size="10" maxlength="10"/>
<input type="text" name="day7" id="day7" value="Sunday<?php if (isset($_POST['day7'])) echo $_POST['day7']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="row1" id="row1" value="Open 10 am<?php if (isset($_POST['row1'])) echo $_POST['row1']; ?>"size="12" maxlength="12"/>
<input type="text" name="row2" id="row2" value="<?php if (isset($_POST['row2'])) echo $_POST['row2']; ?>"size="10" maxlength="10"/>
<input type="text" name="row3" id="row3" value="<?php if (isset($_POST['row3'])) echo $_POST['row3']; ?>"size="10" maxlength="10"/>
<input type="text" name="row4" id="row4" value="<?php if (isset($_POST['row4'])) echo $_POST['row4']; ?>"size="10" maxlength="10"/>
<input type="text" name="row5" id="row5" value="<?php if (isset($_POST['row5'])) echo $_POST['row5']; ?>"size="10" maxlength="10"/>
<input type="text" name="row6" id="row6" value="<?php if (isset($_POST['row6'])) echo $_POST['row6']; ?>"size="10" maxlength="10"/>
<input type="text" name="row7" id="row7" value="<?php if (isset($_POST['row7'])) echo $_POST['row7']; ?>"size="10" maxlength="10"/>
<input type="text" name="row8" id="rao8" value="<?php if (isset($_POST['row8'])) echo $_POST['row8']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row9" id="row9" value="<?php if (isset($_POST['row9'])) echo $_POST['row9']; ?>"size="12" maxlength="12"/>
<input type="text" name="row10" id="row10" value="<?php if (isset($_POST['row10'])) echo $_POST['row10']; ?>"size="10" maxlength="10"/>
<input type="text" name="row11" id="row11" value="<?php if (isset($_POST['row11'])) echo $_POST['row11']; ?>"size="10" maxlength="10"/>
<input type="text" name="row12" id="row12" value="<?php if (isset($_POST['row12'])) echo $_POST['row12']; ?>"size="10" maxlength="10"/>
<input type="text" name="row13" id="row13" value="<?php if (isset($_POST['row13'])) echo $_POST['row13']; ?>"size="10" maxlength="10"/>
<input type="text" name="row14" id="row14" value="<?php if (isset($_POST['row14'])) echo $_POST['row14']; ?>"size="10" maxlength="10"/>
<input type="text" name="row15" id="row15" value="<?php if (isset($_POST['row15'])) echo $_POST['row15']; ?>"size="10" maxlength="10"/>
<input type="text" name="row16" id="row16" value="<?php if (isset($_POST['row16'])) echo $_POST['row16']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row17" id="row17" value="4:00 pm<?php if (isset($_POST['row17'])) echo $_POST['row17']; ?>"size="12" maxlength="12"/>
<input type="text" name="row18" id="row18" value="<?php if (isset($_POST['row18'])) echo $_POST['row18']; ?>"size="10" maxlength="10"/>
<input type="text" name="row19" id="row19" value="<?php if (isset($_POST['row19'])) echo $_POST['row19']; ?>"size="10" maxlength="10"/>
<input type="text" name="row20" id="row20" value="<?php if (isset($_POST['row20'])) echo $_POST['row20']; ?>"size="10" maxlength="10"/>
<input type="text" name="row21" id="row21" value="<?php if (isset($_POST['row21'])) echo $_POST['row21']; ?>"size="10" maxlength="10"/>
<input type="text" name="row22" id="row22" value="<?php if (isset($_POST['row22'])) echo $_POST['row22']; ?>"size="10" maxlength="10"/>
<input type="text" name="row23" id="row23" value="<?php if (isset($_POST['row23'])) echo $_POST['row23']; ?>"size="10" maxlength="10"/>
<input type="text" name="row24" id="row24" value="<?php if (isset($_POST['row24'])) echo $_POST['row24']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row25" id="type" value="4:15 pm<?php if (isset($_POST['row25'])) echo $_POST['row25']; ?>"size="12" maxlength="12"/>
<input type="text" name="row26" id="type" value="<?php if (isset($_POST['row26'])) echo $_POST['row26']; ?>"size="10" maxlength="10"/>
<input type="text" name="row27" id="type" value="<?php if (isset($_POST['row27'])) echo $_POST['row27']; ?>"size="10" maxlength="10"/>
<input type="text" name="row28" id="type" value="<?php if (isset($_POST['row28'])) echo $_POST['row28']; ?>"size="10" maxlength="10"/>
<input type="text" name="row29" id="type" value="<?php if (isset($_POST['row29'])) echo $_POST['row29']; ?>"size="10" maxlength="10"/>
<input type="text" name="row30" id="type" value="<?php if (isset($_POST['row30'])) echo $_POST['row30']; ?>"size="10" maxlength="10"/>
<input type="text" name="row31" id="type" value="<?php if (isset($_POST['row31'])) echo $_POST['row31']; ?>"size="10" maxlength="10"/>
<input type="text" name="row32" id="type" value="<?php if (isset($_POST['row32'])) echo $_POST['row32']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row33" id="type" value="4:30 pm<?php if (isset($_POST['row33'])) echo $_POST['row33']; ?>"size="12" maxlength="12"/>
<input type="text" name="row34" id="type" value="<?php if (isset($_POST['row34'])) echo $_POST['row34']; ?>"size="10" maxlength="10"/>
<input type="text" name="row35" id="type" value="<?php if (isset($_POST['row35'])) echo $_POST['row35']; ?>"size="10" maxlength="10"/>
<input type="text" name="row36" id="type" value="<?php if (isset($_POST['row36'])) echo $_POST['row36']; ?>"size="10" maxlength="10"/>
<input type="text" name="row37" id="type" value="<?php if (isset($_POST['row37'])) echo $_POST['row37']; ?>"size="10" maxlength="10"/>
<input type="text" name="row38" id="type" value="<?php if (isset($_POST['row38'])) echo $_POST['row38']; ?>"size="10" maxlength="10"/>
<input type="text" name="row39" id="type" value="<?php if (isset($_POST['row39'])) echo $_POST['row39']; ?>"size="10" maxlength="10"/>
<input type="text" name="row40" id="type" value="<?php if (isset($_POST['row40'])) echo $_POST['row40']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row41" id="type" value="5:30 pm<?php if (isset($_POST['row41'])) echo $_POST['row41']; ?>"size="12" maxlength="12"/>
<input type="text" name="row42" id="type" value="<?php if (isset($_POST['row42'])) echo $_POST['row42']; ?>"size="10" maxlength="10"/>
<input type="text" name="row43" id="type" value="<?php if (isset($_POST['row43'])) echo $_POST['row43']; ?>"size="10" maxlength="10"/>
<input type="text" name="row44" id="type" value="<?php if (isset($_POST['row44'])) echo $_POST['row44']; ?>"size="10" maxlength="10"/>
<input type="text" name="row45" id="type" value="<?php if (isset($_POST['row45'])) echo $_POST['row45']; ?>"size="10" maxlength="10"/>
<input type="text" name="row46" id="type" value="<?php if (isset($_POST['row46'])) echo $_POST['row46']; ?>"size="10" maxlength="10"/>
<input type="text" name="row47" id="type" value="<?php if (isset($_POST['row47'])) echo $_POST['row47']; ?>"size="10" maxlength="10"/>
<input type="text" name="row48" id="type" value="<?php if (isset($_POST['type48'])) echo $_POST['row48']; ?>"size="10" maxlength="10"/>

<br />
<input type="text" name="row50" id="type" value="<?php if (isset($_POST['row50'])) echo $_POST['row50']; ?>"size="12" maxlength="12"/>
<input type="text" name="row51" id="type" value="<?php if (isset($_POST['row51'])) echo $_POST['row51']; ?>"size="10" maxlength="10"/>
<input type="text" name="row52" id="type" value="<?php if (isset($_POST['row52'])) echo $_POST['row52']; ?>"size="10" maxlength="10"/>
<input type="text" name="row53" id="type" value="<?php if (isset($_POST['row53'])) echo $_POST['row53']; ?>"size="10" maxlength="10"/>
<input type="text" name="row54" id="type" value="<?php if (isset($_POST['row54'])) echo $_POST['row54']; ?>"size="10" maxlength="10"/>
<input type="text" name="row55" id="type" value="<?php if (isset($_POST['row55'])) echo $_POST['row55']; ?>"size="10" maxlength="10"/>
<input type="text" name="row56" id="type" value="<?php if (isset($_POST['row56'])) echo $_POST['row56']; ?>"size="10" maxlength="10"/>
<input type="text" name="row57" id="type" value="<?php if (isset($_POST['row57'])) echo $_POST['row57']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="row58" id="type" value="Close 5 pm<?php if (isset($_POST['row58'])) echo $_POST['row58']; ?>"size="12" maxlength="12"/>
<input type="text" name="row59" id="type" value="<?php if (isset($_POST['row59'])) echo $_POST['row59']; ?>"size="10" maxlength="10"/>
<input type="text" name="row60" id="type" value="<?php if (isset($_POST['row60'])) echo $_POST['row60']; ?>"size="10" maxlength="10"/>
<input type="text" name="row61" id="type" value="<?php if (isset($_POST['row61'])) echo $_POST['row61']; ?>"size="10" maxlength="10"/>
<input type="text" name="row62" id="type" value="<?php if (isset($_POST['row62'])) echo $_POST['row62']; ?>"size="10" maxlength="10"/>
<input type="text" name="row63" id="type" value="<?php if (isset($_POST['row63'])) echo $_POST['row63']; ?>"size="10" maxlength="10"/>
<input type="text" name="row64" id="type" value="<?php if (isset($_POST['row64'])) echo $_POST['row64']; ?>"size="10" maxlength="10"/>
<input type="text" name="row65" id="type" value="<?php if (isset($_POST['row65'])) echo $_POST['row65']; ?>"size="10" maxlength="10"/>
<br />
<br />
<br />
<input type="text" name="drive1" id="type" value="Open 10:45 pm<?php if (isset($_POST['drive1'])) echo$_POST['drive1']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive2" id="type"value="<?php if (isset($_POST['drive2'])) echo $_POST['drive2	']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive3" id="type"value="<?php if (isset($_POST['drive3'])) echo $_POST['drive3']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive4" id="type"value="<?php if (isset($_POST['drive4'])) echo $_POST['drive4']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive5" id="type"value="<?php if (isset($_POST['drive5'])) echo $_POST['drive5']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive6" id="type"value="<?php if (isset($_POST['drive6'])) echo $_POST['drive6']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive7" id="type"value="<?php if (isset($_POST['drive7'])) echo $_POST['drive7']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive8" id="type"value="<?php if (isset($_POST['drive8'])) echo $_POST['drive8']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive9" id="type"value="<?php if (isset($_POST['drive9'])) echo $_POST['drive9']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive10" id="type"value="<?php if (isset($_POST['drive10'])) echo $_POST['drive10']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive11" id="type"value="<?php if (isset($_POST['drive11'])) echo $_POST['drive11']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive12" id="type"value="<?php if (isset($_POST['drive12'])) echo $_POST['drive12']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive13" id="type"value="<?php if (isset($_POST['drive13'])) echo $_POST['drive13']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive14" id="type"value="<?php if (isset($_POST['drive14'])) echo $_POST['drive14']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive15" id="type"value="<?php if (isset($_POST['drive15'])) echo $_POST['drive15']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive16" id="type"value="<?php if (isset($_POST['drive16'])) echo $_POST['drive16']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive17" id="type"value="4:00pm<?php if (isset($_POST['drive17'])) echo $_POST['drive17']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive18" id="type"value="<?php if (isset($_POST['drive18'])) echo $_POST['drive18']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive19" id="type"value="<?php if (isset($_POST['drive19'])) echo $_POST['drive19']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive20" id="type"value="<?php if (isset($_POST['drive20'])) echo $_POST['drive20']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive21" id="type"value="<?php if (isset($_POST['drive21'])) echo $_POST['drive21']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive22" id="type"value="<?php if (isset($_POST['drive22'])) echo $_POST['drive22']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive23" id="type"value="<?php if (isset($_POST['drive23'])) echo $_POST['drive23']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive24" id="type"value="<?php if (isset($_POST['drive24'])) echo $_POST['drive24']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive25" id="type"value="4:15 pm<?php if (isset($_POST['drive25'])) echo $_POST['drive25']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive26" id="type"value="<?php if (isset($_POST['drive26'])) echo $_POST['drive26']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive27" id="type"value="<?php if (isset($_POST['drive27'])) echo $_POST['drive27']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive28" id="type"value="<?php if (isset($_POST['drive28'])) echo $_POST['drive28']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive29" id="type"value="<?php if (isset($_POST['drive29'])) echo $_POST['drive29']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive30" id="type"value="<?php if (isset($_POST['drive30'])) echo $_POST['drive30']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive31" id="type"value="<?php if (isset($_POST['drive31'])) echo $_POST['drive31']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive32" id="type"value="<?php if (isset($_POST['drive32'])) echo $_POST['drive32']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive33" id="type"value="4:30 pm<?php if (isset($_POST['drive33'])) echo $_POST['drive33']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive34" id="type"value="<?php if (isset($_POST['drive34'])) echo $_POST['drive34']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive35" id="type"value="<?php if (isset($_POST['drive35'])) echo $_POST['drive35']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive36" id="type"value="<?php if (isset($_POST['drive36'])) echo $_POST['drive36']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive37" id="type"value="<?php if (isset($_POST['drive37'])) echo $_POST['drive37']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive38" id="type"value="<?php if (isset($_POST['drive38'])) echo $_POST['drive38']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive39" id="type"value="<?php if (isset($_POST['drive39'])) echo $_POST['drive39']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive40" id="type"value="<?php if (isset($_POST['drive40'])) echo $_POST['drive40']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive41" id="type"value="4:45 pm<?php if (isset($_POST['drive41'])) echo $_POST['drive41']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive42" id="type"value="<?php if (isset($_POST['drive42'])) echo $_POST['drive42']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive43" id="type"value="<?php if (isset($_POST['drive43'])) echo $_POST['drive43']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive44" id="type"value="<?php if (isset($_POST['drive44'])) echo $_POST['drive44']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive45" id="type"value="<?php if (isset($_POST['drive45'])) echo $_POST['drive45']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive46" id="type"value="<?php if (isset($_POST['drive46'])) echo $_POST['drive46']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive47" id="type"value="<?php if (isset($_POST['drive47'])) echo $_POST['drive47']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive48" id="type"value="<?php if (isset($_POST['drive48'])) echo $_POST['drive48']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive49" id="type"value="5:00 pm<?php if (isset($_POST['drive49'])) echo $_POST['drive49']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive50" id="type"value="<?php if (isset($_POST['drive50'])) echo $_POST['drive50']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive51" id="type"value="<?php if (isset($_POST['drive51'])) echo $_POST['drive51']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive52" id="type"value="<?php if (isset($_POST['drive52'])) echo $_POST['drive52']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive53" id="type"value="<?php if (isset($_POST['drive53'])) echo $_POST['drive53']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive54" id="type"value="<?php if (isset($_POST['drive54'])) echo $_POST['drive54']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive55" id="type"value="<?php if (isset($_POST['drive55'])) echo $_POST['drive55']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive56" id="type"value="<?php if (isset($_POST['drive56'])) echo $_POST['drive56']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive57" id="type"value="5:30 pm<?php if (isset($_POST['drive57'])) echo $_POST['drive57']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive58" id="type"value="<?php if (isset($_POST['drive58'])) echo $_POST['drive58']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive59" id="type"value="<?php if (isset($_POST['drive59'])) echo $_POST['drive59']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive60" id="type"value="<?php if (isset($_POST['drive60'])) echo $_POST['drive60']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive61" id="type"value="<?php if (isset($_POST['drive61'])) echo $_POST['drive61']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive62" id="type"value="<?php if (isset($_POST['drive62'])) echo $_POST['drive62']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive63" id="type"value="<?php if (isset($_POST['drive63'])) echo $_POST['drive63']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive64" id="type"value="<?php if (isset($_POST['drive64'])) echo $_POST['drive64']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive65" id="type"value="<?php if (isset($_POST['drive65'])) echo $_POST['drive65']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive66" id="type"value="<?php if (isset($_POST['drive66'])) echo $_POST['drive66']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive67" id="type"value="<?php if (isset($_POST['drive67'])) echo $_POST['drive67']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive68" id="type"value="<?php if (isset($_POST['drive68'])) echo $_POST['drive68']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive69" id="type"value="<?php if (isset($_POST['drive69'])) echo $_POST['drive69']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive70" id="type"value="<?php if (isset($_POST['drive70'])) echo $_POST['drive70']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive71" id="type"value="<?php if (isset($_POST['drive71'])) echo $_POST['drive71']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive72" id="type"value="<?php if (isset($_POST['drive72'])) echo $_POST['drive72']; ?>"size="10" maxlength="10"/>
<br />
<input type="text" name="drive73" id="type"value="Close 5 pm<?php if (isset($_POST['drive73'])) echo $_POST['drive73']; ?>"size="12" maxlength="12"/>
<input type="text" name="drive74" id="type"value="<?php if (isset($_POST['drive74'])) echo $_POST['drive74']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive75" id="type"value="<?php if (isset($_POST['drive75'])) echo $_POST['drive75']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive76" id="type"value="<?php if (isset($_POST['drive76'])) echo $_POST['drive76']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive77" id="type"value="<?php if (isset($_POST['drive77'])) echo $_POST['drive77']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive78" id="type"value="<?php if (isset($_POST['drive78'])) echo $_POST['drive78']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive79" id="type"value="<?php if (isset($_POST['drive79'])) echo $_POST['drive79']; ?>"size="10" maxlength="10"/>
<input type="text" name="drive80" id="type"value="<?php if (isset($_POST['drive80'])) echo $_POST['drive80']; ?>"size="10" maxlength="10"/>



<br />
<!---NO NEED FOR USER TO MANUALLY INPUT DATE FIELD, MYSQL WILL CAPTURE THIS FOR YOU AUTOMATICALLY-><br>
<input type="submit" name="submit" id="submit" value="Submit Details">
</form></div>

Link to comment
Share on other sites

String data in a query must be enclosed in single-quotes. You are using back-ticks. Back-ticks causes mysql to treat whatever they surround as column or table names, not data. Change the back-ticks to single-quotes.

 

Back-ticks are only used around column and table names and only when they require special handling and should be avoided as using them are mysql specific.

Link to comment
Share on other sites

mode you code

 

                   $query = "INSERT INTO schedule VALUES ('','$date0','$date1','$date2','$date3','$date4','$date5','$date6','$date7','$day','$day1','$day2','$day3','$day4','$day5','$day6','$day7','$row1','$row2','$row3','$row4','$row5','$row6','$row7','$row8','$row9','$row10','$row11','$row12','$row13','$row14','$row15','$row16','$row17','$row18','$row19','$row20','$row21','$row22','$row23','$row24','$row25','$row26','$row27','$row28','$row29','$row30','$row31','$row32','$row33','$row34','$row35','$row36','$row37','$row38','$row39','$row40','$row41','$row42','$row43','$row44','$row45','$row46','$row47','$row48','$row50','$row51','$row52','$row53','$row54','$row55','$row56','$row57','$row58','$row59','$row60','$row61','$row62','$row63','$row64','$row65','$drive1','$drive2','$drive3','$drive4','$drive5','$drive6','$drive7','$drive8','$drive9','$drive10','$drive11','$drive12','$drive13','$drive14','$drive15','$drive16','$drive17','$drive18','$drive19','$drive20','$drive21','$drive22','$drive23','$drive24','$drive25','$drive26','$drive27','$drive28','$drive29','$drive30','$drive31','$drive32','$drive33','$drive34','$drive35','$drive36','$drive37','$drive38','$drive39','$drive40','$drive41','$drive42','$drive43','$drive44','$drive45','$drive46','$drive47','$drive48','$drive49','$drive50','$drive51','$drive52','$drive53','$drive54','$drive55','$drive56','$drive57','$drive58','$drive59','$drive60','$drive61','$drive62','$drive63','$drive64','$drive65','$drive66','$drive67','$drive68','$drive69','$drive70','$drive71','$drive72','$drive73','$drive74','$drive75','$drive76','$drive77','$drive78','$drive79','$drive80','$ipaddress',NOW())";
                   mysql_query($query);
                   if (!mysql_query($query)) {
  trigger_error(mysql_error() . '<br>' . $query, E_USER_ERROR);
}

              
                   echo "<font size='4'>has been sumited !</font>";
	   
		exit();
              }

}


?>

 

i didnt get any output

Link to comment
Share on other sites

Unfortunately, as has been written many times, what trigger_error() reports and displays is dependent on the error_reporting/display_errors settings.

 

For debugging, please add the following two lines of code immediately after your first opening <?php tag on the page -

 

ini_set("display_errors", "1");
error_reporting(E_ALL);

Link to comment
Share on other sites

yay found an error.  Notice: Undefined index: date0 in filename.html on line 14

 

this code is mess it up i think.  this was set for 2 entry's that were required.  i bet if i figure out what has to be removed i bet it will work.

{ 

(this is the error line----->)     if (strlen($_POST['date0']) > 0)
     {$username=TRUE;}
     else {$username=FALSE;
          $message_username="* You forgot to enter the username!";}

     if (strlen($_POST['date1']) > 0)
         {$amount=TRUE;
                                if (is_numeric($_POST['date1']))
                                {$amountnumericcheck=TRUE;}
                                else {$amountnumericcheck=FALSE;
                           $message_amountnumericcheck=" *Please enter numeric values only!";
                                //echo "$message_amountnumericcheck";
                                }
                       }
   else    {$price=FALSE;
       $message_amount=" *You forgot to enter the amount!";}

     if 
        ($username && $amount &&amountnumericcheck)
        {                       

 

Link to comment
Share on other sites

Data is always 'produced' somewhere. If you examine your form field names, you will find there is not one by the name 'date0'

 

I'm also going to guess that your form validation code is causing the query to be skipped, but it (your validation logic) is also not displaying a user error message telling you that the field did not validate (due to the mismatch between the name of the form field and the name of the POST index.)

Link to comment
Share on other sites

yeah i noticed that about 'date0' fixed that.  made some changes to the validation or at least the code in the last (my) post and now i have another.  Notice: Undefined variable: date1 in filename.html on line 32

 

if (isset($_POST['submit']))

{ 

     if (strlen($_POST['date0']) > 0)
     {$date0=TRUE;}
     else {$date0=FALSE;
          $message_username="* You forgot something";}

     if (strlen($_POST['date1']) > 0)
         {$date1=TRUE;
                                if (is_numeric($_POST['date1']))
                                {$amountnumericcheck=TRUE;}
                                else {$amountnumericcheck=FALSE;
                           $message_amountnumericcheck=" *Please enter numeric values only!";
                                //echo "$message_amountnumericcheck";
                                }
                       }
   else    {$price=FALSE;
       $message_amount=" *You forgot to enter the amount!";}

     if 
        ($date0 && $date1 &&amountnumericcheck)    <------ error line
        {                       
                   //YOU NEED TO HAVE AN EXTERNAL PHP FILE WITH YOUR DATABASE CONNECTION DETAILS. LET ME KNOW IF YOU DON'T KNOW HOW             
                   include("dbinfo.php");
                   mysql_connect(localhost,$username,$password);
                   @mysql_select_db($database) or die( "Unable to establish a connection to the relevant database.");

 

if its not one thing is another...... :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.