You are here: Re: Unknown column 'icaodesc' in 'field list' « PHP Programming Language « IT news, forums, messages
Re: Unknown column 'icaodesc' in 'field list'

Posted by Dave on 08/13/05 00:40

On Fri, 12 Aug 2005 18:23:37 -0400, Ward B decided we needed to hear:

> Thanks Dave.
>
> Well, you're right. The column name is "task_icaodesc."
>
> But is the first part of this, icaodesc ='$_POST[task_icaodesc]',
> throwing off the system? icaodesc is the NAME in the update form.

Your assignment in the SQL statement is the wrong way around in this
case. Your SQL statement should instead contain:

task_icaodesc = '$_POST[icaodesc]'

that assigns the value of the form variable icaodesc to the column
task_icaodesc in the database. BTW, hopefully you are validating the
value of your form variables before you update your database? - if not
you are wide open for all sorts of problems.

>
> <TD><strong>ICAO Description of Task:</strong><BR><textarea
> name="$icaodesc" cols="30" rows="5"><? echo "$icaodesc";

^^^^^^ typo? Its not a good idea for the form field name to
contain a $ sign. The field must be called icaodesc, if you are
going to refer to it in your script as $_POST[icaodesc]

> ?></textarea></TD>
<snip>

--
Dave <dave@REMOVEbundook.com>

(Remove REMOVE for email address)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация