stockdalep Posted April 8, 2007 Share Posted April 8, 2007 I have this small piece of code inside a form it works fine in IE6 but inside Mozzila Firefox sameday and tuesday seem to become one. Example if I select tuesay sameday gets selected. Thanks for any ideas/help Form Address www.linfordfc.com/delivery_pickup_form.php <?php $timenow=date("Hi"); if($timenow < 1200) { ?> <input type="radio" name="delivery_day" value="sameday" /> <?php echo("Same Day"); } ?> <input type="radio" name="delivery_day" value="tuesday" /> <?php echo date('l jS F Y', strtotime('+2 days'))?></label> <label> <input type="radio" name="delivery_day" value="wednesday" /> <?php echo date('l jS F Y', strtotime('+3 days'))?></label> <label></label> </span></strong></div></td> </tr> <tr> <td><div align="center"><span class="style27"><strong><span class="style2"> <label> <input type="radio" name="delivery_day" value="thursday" /> <?php echo date('l jS F Y', strtotime('+4 days'))?></label> <label> <input type="radio" name="delivery_day" value="friday" /> <?php echo date('l jS F Y', strtotime('+5 days'))?></label> <label> <input type="radio" name="delivery_day" value="saturday" /> <?php echo date('l jS F Y', strtotime('+6 days'))?></label> </span></strong></span></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> </tr> Link to comment https://forums.phpfreaks.com/topic/46112-if-else-in-php/ Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 Well, I can fix your label's at least: <?php $timenow=date("Hi"); if($timenow < 1200) { ?> <input type="radio" name="delivery_day" value="sameday" /><label> <?php echo("Same Day"); } ?> </label><input type="radio" name="delivery_day" value="tuesday" /><label> <?php echo date('l jS F Y', strtotime('+2 days')) ?> </label><input type="radio" name="delivery_day" value="wednesday" /><label> <?php echo date('l jS F Y', strtotime('+3 days')) ?> </label> </span></strong></div></td> </tr> <tr> <td><div align="center"><span class="style27"><strong><span class="style2"> <input type="radio" name="delivery_day" value="thursday" /><label> <?php echo date('l jS F Y', strtotime('+4 days')) ?> </label><input type="radio" name="delivery_day" value="friday" /><label> <?php echo date('l jS F Y', strtotime('+5 days')) ?> </label><input type="radio" name="delivery_day" value="saturday" /><label> <?php echo date('l jS F Y', strtotime('+6 days')) ?> </label></span></strong></span></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> </tr> That should do it, I hope, you only posted a little bit of your code. Oh, and in the future, please post code inside [ code] [ /code] tags. Link to comment https://forums.phpfreaks.com/topic/46112-if-else-in-php/#findComment-224070 Share on other sites More sharing options...
stockdalep Posted April 8, 2007 Author Share Posted April 8, 2007 sameday and tuesday still conflict with one another in Mozzila Firefox. Link to comment https://forums.phpfreaks.com/topic/46112-if-else-in-php/#findComment-224079 Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 I know, but a lot of your label's were broken, I figured I'd fix them. Link to comment https://forums.phpfreaks.com/topic/46112-if-else-in-php/#findComment-224094 Share on other sites More sharing options...
per1os Posted April 8, 2007 Share Posted April 8, 2007 I remember the old school inputs. What you need is javascript to de-select one if another is checked. I have not seen this issue for a really long time, but I do not know it was a problem with all browsers and the only to un-select one radio was once one was clicked JS goes in and de-selects the others. But that was a long time and I have yet to see that problem re-occur. I could be mis-lead. Link to comment https://forums.phpfreaks.com/topic/46112-if-else-in-php/#findComment-224230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.