Date: 09/26/01
- Next message: Emanuel Dejanu: "[PHP-DEV] RE: Re: How do I register a constructor in PHP (C code)"
- Previous message: Stig Venaas: "Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved"
- In reply to: ewunia: "[PHP-DEV] I desperately need help!!!!!!!!!!!!!1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
the is the wrong list, ask on php-general <email protected> for support
questions.
Derick
On Tue, 25 Sep 2001, ewunia wrote:
> Hello,
>
> I need some help with checkboxes and multiple arrays,
>
> Here is the peace of code I am working with, and it gives me a list of
> products.
>
> This is the while statement which grabs information from the database:
> $tplv .= "<TR BGCOLOR=\"$bgColor\" class=\"medium\" align=\"center\">";
> $P.="<input type=\"checkbox\" name=\"select[]\" value=\"$id\" size=\"3\"";
> if($id == $select[$auctions_count])
> $P .= " CHECKED";
> $P .= ">";
>
> $tplv .= "<TD width=\"5%\">$P</td>";
> $tplv .= "<TD width=\"15%\"><input type=\"hidden\" name=\"id[]\"
> value=\"$q[id]\">". $actual."</TD>";
> $tplv .= "<TD width=\"15%\"><input type=\"hidden\" name=\"price[]\"
> value=\"$q[price]\">". $actual."</TD>";
> $tplv .= "<TD width=\"15%\"><input type=\"text\" name=\"shipping[]\"
> value=\"\" size=\"10\">";
> $tplv .= "<TD width=\"10%\"><input type=\"hidden\" name=\"status[]\"
> value=\"$q[status]\">$stat1</TD>";
> $tplv .= "</TR>";
>
> and creates someing like this
> checkboxes id price shipping status
> 1 1 4.99 1.99 0
> 2 4 5.99 2.99 0
>
> As you can see I have 5 arrays. one is select /checkbox, id, price, shipping
> and status.
> What I am trying to do is search through the array of checkboxes and if the
> checkbox is checked I want the information in arrays id, price, shipping,
> status be added to the database.
>
> Ale there need to be a check if the status[] == 0;
> then add the information to a table.
> Can anyone help me to resolve the problem.
>
> Thanks
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> For additional commands, e-mail: php-dev-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick <email protected>
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Emanuel Dejanu: "[PHP-DEV] RE: Re: How do I register a constructor in PHP (C code)"
- Previous message: Stig Venaas: "Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved"
- In reply to: ewunia: "[PHP-DEV] I desperately need help!!!!!!!!!!!!!1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

