Re: [PHP-DB] Form submit to Mysql database From: JJeffman (jjeffmanweb <email protected>)
Date: 11/29/00

This code "updates" only the records that have QuoteCookie='$QuoteCookie'.
If $QuoteCookie doesn't have its value changed the same record is updated
every time you submit the form. You are not inserting records, just
updating. No records will be added to your table.

HTH

Jayme.

http://www.conex.com.br/jjeffman

-----Mensagem Original-----
De: Shannon Doyle <shannon <email protected>>
Para: Php-Db <email protected> Php. Net <php-db <email protected>>
Enviada em: quarta-feira, 29 de novembro de 2000 22:33
Assunto: [PHP-DB] Form submit to Mysql database

> Hi people,
> I am in the process of developing a multi page form for a client that is
> wanting the resposes of the form to be implemented into a mysql database.
> While I have the first section of the page entering the data into the
> database I have discovered that after the first 2 submissions the database
> is no longer being updated by my code. I have included a small section of
> the code used to update the database in the hope that one of you on the
list
> may be able to help me discover why it is failing to update or perhaps
> suggest a different way that I can insert this info into the database. The
> database currenly has approx 200 fields that will need to be updated from
7
> different forms.
>
> <?
> include("settings.php");
> $iscookie=$QuoteCookie;
> if ($iscookie == "") {
> Header("Location: ./quotes.php");
> }
> mysql_connect("$dbhost","$dbuser","$dbpass");
> mysql("richmitch","UPDATE quotes set
> bar_lounge='$bar_lounge',
> bar_family='$bar_family',
> fridge_lounge='$fridge_lounge',
> chair_lounge='$chair_lounge',
> chair_family='$chair_family',
> china_lounge='$china_lounge',
> china_family='$china_family',
> coffee_lounge='$coffee_lounge',
> coffee_family='$coffee_family',
> lounge_lounge='$lounge_lounge',
> lounge_family='$lounge_family',
> organ_lounge='$organ_lounge',
> organ_family='$organ_family',
> WHERE QuoteCookie='$QuoteCookie'");
> ?>
>
> any help would be appreciated.
>
>
> regards,
> Shannon
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>