|
Posted by IchBin on 12/06/06 18:59
ulyx wrote:
> I hope i have write this correct. I get no error, but i can see any new
> updated data in db. There is no updating ?
> I have created tested table and field.
>
> ?>
don't need this ?>
> <form action="testCheckBox.php" name="test" method="post">
> <?
> $weekdays = array( "mon" => "Monday",
> "tue" => "Tuesday",
> "wed" => "Wednesday",
> "thr" => "Thursday",
> "fri" => "Friday",
> "sat" => "Saturday",
> "sun" => "Sunday" );
>
> // initialize $days as being empty:
> $days = array();
>
> echo "<b>Days of Service:</b><br />";
> foreach( $weekdays as $value => $desc ) { //walk through possible values
> echo ' <INPUT type="checkbox" name=days[]" value="'.$value.'"';
> echo ( in_array( $value,$days ) ) ? " CHECKED" : ""; //if days are
> already selected, check the box
> echo '>'.$desc.'<br />'; //echo the descriptive name of the item
> }
>
> $daylist = implode(",",$days);
> //$result = mysql_query("UPDATE dbTest SET db_days = '$daylist' WHILE
> record_id = $record_id");
> $days = explode(",", $dbTest ['db_days']);
> ?>
> <input type="submit" name="Submit" value="Submit">
> </form>
>
>
--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
[Back to original message]
|