开发者

Posting php over to html form wraped up in my own code

开发者 https://www.devze.com 2023-04-10 06:31 出处:网络
Hello i have what i need in side $v->id But i need to get it from this page over to testing.php here is my code

Hello i have what i need in side

$v->id

But i need to get it from this page over to testing.php here is my code

echo '

                                <div class="auction_box" style="height:150px">

                                <form name="myform" action="http://mysite.net/new_rpg/testing.php?' .$v->id. '" method="POST">
                                <p> </p>
                                <p> </p>
                                <p> </p>

                                        <img src="http://pokemontoxic.net/new_rpg/'.$battle_get['pic'].'" height="96px" width="96px"/><br/>


                                    Name:<br/>' .$v->pokemon. '<br/>
                                    Level:' .$v->level. '<br/>
                                    Exp:' .$v->exp. '<br/>
                                    Slot you want to put your pokemon in


<select name="mydropdown">

<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>



<select name="hfghfhg">

< option value="' .$v->id. '" input type="h开发者_开发技巧idden"> Please leave</option>

</select>
                                <input type="submit" value="Submit" />

                                </form>
                                </div>';
                            }
                        }

I am submitting the form and getting the result from mydropdown which i want but am not getting the result from $v->id how would i make a hidden field with $v->id in side ? so when the form is submitted it will be posted onto testing and i could do i post to get it on testing ?? Has you can see i have tryied to make a drop down which would hold the variable and then post it over to the other page and make it hidden but it ent hidden .....

   <select name="hfghfhg">

    < option value="' .$v->id. '" input type="hidden"> Please leave</option>

    </select>


You should add a field to the form like this:

'<input type="hidden" name="myName" value="' . $v->id . '" />'

Then set myName to whatever you want your value to be on the server, and access $v->id by using $_POST['myName'] on your target page.


Use hidden text field which it's value is $v->id

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号