Jump to content

Get input data from html


Ninjakreborn

Recommended Posts

[regex]

if (preg_match_all('/<input type\=\"radio\"(.*?)\/>/is', $data, $matches)) {

echo '<pre>';

print_r($matches);

echo '</pre>';

}else {

exit;

}

[/regex]

 

9"><b>Semester</b></font><img src="http://www.smc.edu/gif/nul-s.gif" alt="Warning, selecting a semester will automatically reload this page."></span></label></td>

<td  colspan="10" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="2576597448717081150" /><fieldset id="P1_SEMNAME" class="radio_group"><table summary="" class="radiogroup"><tr>

<td nowrap="nowrap"><input type="radio" name="p_v01" value="Winter2011" onclick="doSubmit('P1_SEMNAME')"  id="P1_SEMNAME_0" />

<label for="P1_SEMNAME_0">Winter2011   </label></td><td nowrap="nowrap"><input type="radio" name="p_v01" value="Spring 2011" checked="checked"  onclick="doSubmit('P1_SEMNAME')"  id="P1_SEMNAME_1" />

<label for="P1_SEMNAME_1">Spring 2011   </label></td></tr></table></fieldset>

</td></tr><tr><td nowrap="nowrap" align="right"><label for="P1_CLASSTYPE"><span class="t12OptionalLabel"><font color="#003399"><b>Class Type</b></font><img src="http://www.smc.edu/gif/nul-s.gif" alt="Warning, selecting a class type will automatically reload this page."></span></label></td>

I want to return everything that is a radio button.    This does not work.  Any advice.  I have modified this from Regex I was using to get everything in a select option list (which works fine), it's just this modified version to get radio results, does not work.  I may want to restrict it to only ones with a certain name after this, but right now I just want to get the basic working.  Any advice?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.