Page 1 of 1

Problem with POST...

Posted: Sat Jun 15, 2013 10:06 pm
by orbdrums
Although the php variable displays on the page properly, it is not being picked up in the subsequent page with the _POST option.
Code from source page:

Code: Select all

            <form name="frmFriendConf" action="filename.php" method="post" OnSubmit="return onFrndConf();">
                <option value="<?= $v_frnd_id; ?>"></option><?= $v_frnd_id; ?>
                <input type="submit" name="btnFriendConf" value="Confirm">
            </form>
Code from target page:

Code: Select all

    $v_frnd_id_in = $_POST['v_frnd_id'];
Any suggestions?
Thanks.

Re: Problem with POST...

Posted: Sat Jun 15, 2013 11:39 pm
by orbdrums
I should have been using the <input> tag instead of the <option> tag. I have it working now.

Re: Problem with POST...

Posted: Sun Jun 16, 2013 12:45 am
by Christopher
<option> is a child of <select> so you can either use a <select> or change it to an <input>.

Re: Problem with POST...

Posted: Wed Jun 19, 2013 3:48 am
by social_experiment
orbdrums wrote:Any suggestions?
not directly tied to your problem but avoid short tags (<? ?>); instead use <?php ?>