Re: help with insert into table to mysql

From: Date: Wed, 12 Mar 2003 08:04:34 +0000
Subject: Re: help with insert into table to mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139235@lists.php.net to get a copy of this message
some obvious errors: $submiited on =date(1y-m-d'); // typo on submittedon and the date format seems off, maybe you're looking for date('y-m-d') . $query="insert into articles" (date,submitted,status,title,lead,body,submitted by) // if the field name is submitted by then you need to write it 'submitted by' values(!$submittedon',$status',$title',$lead',$body',$author,"); your use of punctuation is more than a bit off, and your field count doesn't match your values count values('$submittedon','$status', ..... )"; $query="insert into articles (date, submitted, status, title, lead, body, submittedby) values ('$submittedon','$submitted','$status','$title','$lead','$body','$submittedb y')"; // is the correct form but whether the field names and the value variables are correctly named is up to you. Hugh ----- Original Message ----- From: "Karl James" <karl.james@verizon.net> To: <php-general@lists.php.net> Sent: Tuesday, March 11, 2003 10:37 PM Subject: [PHP] help with insert into table to mysql > Hey guys > > Im trying to have a form submit a body or article into a > Table called articles for people to post there stories or what not. > So far what I have written is not working and im not able to view > My errors for some reson, > Could some take a look at the three links below, thanks Karl > > My code: http://nopaste.php-q.net/7668 > My assignment: http://66.12.3.67/webdb/assign3.html > My link for the assignemt: > http://66.12.3.67/webdb/webdb13/insertarticle.php > > > > > ultimatefootballleague.com/index.php > karl.james@verizon.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#139235) next »