If option selected do this or this on form
<p>I have the following options:</p>

<pre><code>&lt;li&gt;&lt;label for="r1"&gt;&lt;input type="radio" name="post_category" id="r1" value="12" checked="checked" /&gt; Share an Article&lt;/label&gt;&lt;/li&gt;
                                    &lt;li&gt;&lt;label for="r4"&gt;&lt;input type="radio" name="post_category" id="r4" value="14" /&gt; Share a Link&lt;/label&gt;&lt;/li&gt;
                                    &lt;li&gt;&lt;label for="r3"&gt;&lt;input type="radio" name="post_category" id="r3" value="13" /&gt; Share some Code&lt;/label&gt;&lt;/li&gt;
</code></pre>

<p>and I have these two lines to send data from two fields, now if the options arn't selected then I don't want the content being sent to these fields so they need some conditionals around them that check if an option is selected or not:</p>

<pre><code>$post_url = $_POST['post_url'];

$post_code = htmlentities($_POST['post_code'], ENT_QUOTES, 'UTF-8');
</code></pre>

<p>so only post the URL field if the link option is chosen and only post the CODE field if the code option is chosen. can anyone help?</p>
