Re: General Question!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



¨First of all you must NOT use the inputs right from the field and put it in
your sql.
use trim first for secuety ...

ok if you have a several fields with the same name  (although wrong way to
do it! ) , you can use the
print_r($_POST);  function to see what you get out of it.... or else the
last input wil be posted (I think)
 Hope this helped.
:)


"Jerry" <jusa_98@xxxxxxxxx> wrote in message
news:20040405043713.8209.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> If I have a form that has in a text field something
> like this below how would my query look to update all
> in the form to the fb?
>
> <input type=text name=username> <input type=text
> name=total>
>
> So there is data inputed in username field and total.
> Now let's say there is 5 of these text fields for the
> one form.  All named the same (e.g. username and
> total) but in each area the user puts something
> different.
>
> so if I have
>
> UPDATE tbl score='$total' WHERE username='$username';
>
> (quick work only so you know what I mean)
>
> But that will ONLY update one part of the form rather
> than all text areas to the db.  How can I get each one
> to input?  Keeping in mind each line of text area has
> the same form name as the previous.  Is there a way
> around this so everything is updated correctly instead
> of bits here and there?
>
> Cheers!
>
> Find local movie times and trailers on Yahoo! Movies.
> http://au.movies.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux