Checkbox ticked in Insert page retain value in update page?
Hi,
Question 1
Ran a standard DataAssist Wizard procedure to create some admin pages. In the insert page, there are two fields that are checkboxes, and similarly in the update page, these two fields are also checkboxes. Submitting an insert page with the box(es) checked adds the value '1' to the appropriate column in the database, and a (default) value of '0' if they are not checked (I am using the WA eCommerce database with two extra columns - tinyint(1) - for these values).
I have as the update page code for the checkbox(es):
<input <?php if (!(strcmp(((isset($_POST["ProductLive"]))?$_POST["ProductLive"]:""),1))) {echo "checked=\"checked\"";} ?> type="checkbox" name="ProductLive" id="ProductLive" value="1" />
When I go to the update page, these columns haven't retained the values. How can I make the '1' in the database show a tick in the update page checkboxes if ticked in the insert page?
Question 2
Using the WA eCommerce Database, a price entered into the ProductsPrice column (products table) if I enter '10.00', shows as '10'. The column type is float. How can I have the data drawn from this column show as '10.00'?
Thanks