Re: bug in code - can't find it!
| From: | Chris Sherwood | Date: | Wed, 06 Aug 2003 21:52:09 +0000 |
| Subject: | Re: bug in code - can't find it! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158570@lists.php.net to get a copy of this message | ||
<INPUT TYPE="checkbox" NAME="<? echo
$search_result2['user_cd'];?>"
VALUE="<?if ($search_result2[a.retired_flag] == 1){?>CHECKED<?}?>">
<?echo
$search_result2[a.retired_flag]?>
}
well for starters checkboxes dont have a size and maxlength
you may want to try that and see if it works...
----- Original Message -----
From: "Amanda McComb" <amccomb@indiana.edu>
To: <php-general@lists.php.net>
Sent: Wednesday, August 06, 2003 2:47 PM
Subject: [PHP] bug in code - can't find it!
> Ok, after all of the discussion on posting, I'm afraid to post.
> Unfortunately, no one I know is a programmer, and I am a beginner. I can
> normally figure out what I've done wrong, but I'm missing something here.
>
> Ok, here is my query and the bit of code I can't figure out:
>
> $query = "SELECT * from apt_user_t a, apt_company_t b ";
> $query .= "WHERE a.user_cd = b.user_cd ";
> $query .= "ORDER BY a.username";
>
> $search_results = mysql_query($query) or die("Select
> Failed!");
> while ($search_result2 = mysql_fetch_array($search_results))
> {
> <INPUT
> TYPE="checkbox"
> NAME="<? echo $search_result2['user_cd'];?>"
> SIZE="20"
> MAXLENGTH="50"
> VALUE="<?if ($search_result2[a.retired_flag] == 1){?>CHECKED<?}?>">
> <?echo
$search_result2[a.retired_flag]?>
> }
> Nothing shows up with the echo or the value. I only included this
> checkbox, but all of the other values show up fine. Can someone give me a
> hint?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>