The purpose for this is that I'll make a customizable form, and use variables to store the data and is not erased when they give you refresh, and i'm using $sessions[] to do that
look this is what I'm doing
this is in the database
Code: Select all
<form name="frmCotizar" method="post" action="">
<fieldset>
<legend>Opciones Bebidas</legend>
<input type="checkbox" name="jugo1" value="1" onClick="this.form.submit();" <?php echo $_SESSION['jugo1']; ?>/>jugo1
<input type="checkbox" name="jugo2" value="1" onClick="this.form.submit();" <?php echo $_SESSION['jugo2']; ?> />jugo2
</fieldset>
</form>
and so called
Code: Select all
foreach ($ fields as $ field) (
echo $ field;
)
and seeing the source code so I get
<body>
name="frmCotizar" <form method="post" action="">
<fieldset>
<legend> Beverage Options </ legend>
<Input type = "checkbox" name = "jugo1" value = "1" onclick = "this.form.submit ();" <? Php echo $ _SESSION ['jugo1'];?> />
jugo1
<Input type = "checkbox" name = "jugo2" value = "1" onclick = "this.form.submit ();" <? Php echo $ _SESSION ['jugo2'];?> />
jugo2
</ Fieldset>
<form>
</ Body>
try to put it like this:
but still does not work ..