Hi, I have the following question:
I have a field "arrival". There should be clicked on by radio button, can be done on what day the trip.
As far as everything works well, the data is correctly entered into the database.
Only when I viewed the page again, it's always clicked on the last radio button.
This is my Code:
| Code: |
<?php $anreisetag=$this->datos->anreisetag; ?>
<?php $chequeado0 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado1 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado2 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado3 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado4 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado5 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado6 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<?php $chequeado7 = $this->datos->anreisetag ? JText::_( 'checked="checked"' ) : JText::_( '' );?>
<input name="anreisetag" id="anreisetag" value="0" <?php echo $chequeado0;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Montag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="1" <?php echo $chequeado1;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Dienstag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="2" <?php echo $chequeado2;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Mittwoch' ); ?></label>
<input name="anreisetag" id="anreisetag" value="3" <?php echo $chequeado3;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Donnerstag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="4" <?php echo $chequeado4;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Freitag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="5" <?php echo $chequeado5;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Samstag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="6" <?php echo $chequeado6;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Sonntag' ); ?></label>
<input name="anreisetag" id="anreisetag" value="7" <?php echo $chequeado7;?> type="radio">
<label for="anreisetag"><?php echo JText::_( 'Beliebig' ); ?></label>
|
Can someone help me and give a solution?
Many thanks, Rolf