Jump to content

Radio button checked moving


eddy556

Recommended Posts

This is the HTML output of my php script.  Can you understand why each time I reload the page - the checked radio button moves along one?

 

<html>
<head><title>Realtime Collaborative Filtering</title>


<form name="myform" action="result.php" method="POST">

<table border="1">

Enter your e-mail address: <input type="text" name="email">

<tr><td>Dragon Ball - Fortun Teller Baba Saga</td><td>1<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='1' >2<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='2' checked />3<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='3' >4<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='4' >5<input type='radio' name='Dragon Ball - Fortun Teller Baba Saga' value='5' ></td></tr><tr><td>Dune</td><td>1<input type='radio' name='Dune' value='1' >2<input type='radio' name='Dune' value='2' >3<input type='radio' name='Dune' value='3' >4<input type='radio' name='Dune' value='4' >5<input type='radio' name='Dune' value='5' checked /></td></tr><tr><td>Felicity - Season 2</td><td>1<input type='radio' name='Felicity - Season 2' value='1' >2<input type='radio' name='Felicity - Season 2' value='2' checked />3<input type='radio' name='Felicity - Season 2' value='3' >4<input type='radio' name='Felicity - Season 2' value='4' >5<input type='radio' name='Felicity - Season 2' value='5' ></td></tr><tr><td>Freddy Got Fingered</td><td>1<input type='radio' name='Freddy Got Fingered' value='1' >2<input type='radio' name='Freddy Got Fingered' value='2' >3<input type='radio' name='Freddy Got Fingered' value='3' checked />4<input type='radio' name='Freddy Got Fingered' value='4' >5<input type='radio' name='Freddy Got Fingered' value='5' ></td></tr><tr><td>I Heart Huckabees</td><td>1<input type='radio' name='I Heart Huckabees' value='1' >2<input type='radio' name='I Heart Huckabees' value='2' >3<input type='radio' name='I Heart Huckabees' value='3' >4<input type='radio' name='I Heart Huckabees' value='4' >5<input type='radio' name='I Heart Huckabees' value='5' checked /></td></tr><tr><td>Lost in Translation</td><td>1<input type='radio' name='Lost in Translation' value='1' >2<input type='radio' name='Lost in Translation' value='2' >3<input type='radio' name='Lost in Translation' value='3' >4<input type='radio' name='Lost in Translation' value='4' >5<input type='radio' name='Lost in Translation' value='5' checked /></td></tr><tr><td>Pearl Harbor</td><td>1<input type='radio' name='Pearl Harbor' value='1' >2<input type='radio' name='Pearl Harbor' value='2' >3<input type='radio' name='Pearl Harbor' value='3' checked />4<input type='radio' name='Pearl Harbor' value='4' >5<input type='radio' name='Pearl Harbor' value='5' ></td></tr><tr><td>The Royal Tenenbaums</td><td>1<input type='radio' name='The Royal Tenenbaums' value='1' >2<input type='radio' name='The Royal Tenenbaums' value='2' >3<input type='radio' name='The Royal Tenenbaums' value='3' >4<input type='radio' name='The Royal Tenenbaums' value='4' >5<input type='radio' name='The Royal Tenenbaums' value='5' checked /></td></tr><tr><td>The Wedding Planner</td><td>1<input type='radio' name='The Wedding Planner' value='1' >2<input type='radio' name='The Wedding Planner' value='2' checked />3<input type='radio' name='The Wedding Planner' value='3' >4<input type='radio' name='The Wedding Planner' value='4' >5<input type='radio' name='The Wedding Planner' value='5' ></td></tr><tr><td>VeggieTales - Heroes of the Bible</td><td>1<input type='radio' name='VeggieTales - Heroes of the Bible' value='1' >2<input type='radio' name='VeggieTales - Heroes of the Bible' value='2' checked />3<input type='radio' name='VeggieTales - Heroes of the Bible' value='3' >4<input type='radio' name='VeggieTales - Heroes of the Bible' value='4' >5<input type='radio' name='VeggieTales - Heroes of the Bible' value='5' ></td></tr><input type="submit">

</form>

</html>

Link to comment
https://forums.phpfreaks.com/topic/146352-radio-button-checked-moving/
Share on other sites

1. You have Form fields in between <table> tags when they all need to be inside the <td> tags

 

2. You have not closed your <table> tag

 

Fix these issues would be a good start, also putting all of your <tr><td> tags on the same line makes it very hard to read and follow to make sure yuo have started and ended each tag correctly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.