You are here: variable question « PHP Programming Language « IT news, forums, messages
variable question

Posted by Justin Case on 02/28/06 09:01

Hi, could you perhaps help me out with this, trying to manipulate data from
a form with multiple radio button groups.

I have a loop..

for ($i = 1; $i <= $num; $i++) {

...then trying to use $i like this but it doesn't work..

import_request_variables('p', 'p_');
$who = $p_radio$i;

...also tried this but no luck..

$who = $_POST['radio$i'];

Anyone? Here's a snippet of the form:

<div class="fileattachment" id="fileatt1">
<input type="file" name="fileattachment1">
<input type="radio" name="radio1" value="Bob" checked>Bob
<input type="radio" name="radio1" value="Joe">Joe
</div>
<div class="fileattachment" id="fileatt2">
<input type="file" name="fileattachment2">
<input type="radio" name="radio2" value="Bob" checked="checked">Bob
<input type="radio" name="radio2" value="Joe">Joe
</div>

Cheers.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация