List:General Discussion« Previous MessageNext Message »
From:Robert Pruitt Date:June 18 1999 12:14pm
Subject:Re: PHP help..
View as plain text  
Hi Ritschie,

Nope, on third thought, this is a php question, not a mysql question. If you
have a newsreader, a convenient way to read the php list is
news:// (I wish mysql list would do this).
Anyway, take a look at your form.

If the portion of your form dealing with checkboxes used a technique like
echo "<form action=\"index.php3\" method=\"post\">";
echo "<input type=\"checkbox\" name=\"myname[]\" value=\"myvalue\"

Then the script handling the variable passed to it (index.php3) might look
something like this --
$partcount = count($myname);
             for ($i = 0; $i < $partcount; $i++){
               $key = key($myname);
               $val = $myname[$key];
$string .= $val . "<BR>";
     ECHO "$string";

Good Luck!,

Ritschie wrote:

> Hi!
> This as almost nothing to do with mysql, but I am sure someone can help me
> out with a sentence or two..
> I am using PHP to query my Mysql databse, I want a form made in HTML which
> uses checkboxes.
> I post the form to an index.php3 file. The question is  how can I use the
> checkboxes.
> I mean How can I determine whether a checkbox was checked or not?
> I named the checkboxes the same. I checked the variable and it showed only
> the last chekcbox string.
> So the main problem is: How can I use the checkboxes in my PHP script?
> Thanks for your help..
> PS: And on second thought this has something to do with mysql..
> Ritschie

PHP help..Ritschie18 Jun
  • Re: PHP help..Dino18 Jun
  • Re: PHP help..Stan P. van de Burgt18 Jun
    • Re: PHP help..Stan P. van de Burgt18 Jun
  • Re: PHP help..Robert Pruitt18 Jun
    • Re: PHP help..Ritschie18 Jun