Question: Hello guys i am grabing results from my mysql db and have made a html form and have put a submit button in side the php to submit the form.

```
<form method="post" action="buydo.php">
                <label><br />
                <br />
                </label>
                <p>

                <?php   
    $sql = "SELECT pokemon_name, Pokemon_pic, Pokemon_level, price FROM sell
             ORDER BY Pokemon_level ASC";
    $res = mysql_query($sql) or die(mysql_error());

        while ($v = mysql_fetch_array($res)) {
            echo '
                <div class="auction_box">
                <img src="http://pokemontoxic.net/new_rpg/'.$v['Pokemon_pic'].'" width="100" height="100"><br/>
                &pound;'.$v['price'].'<br/>
                <label id="pokemonName'.$v['id'].'">'.$v['pokemon_name'].'</label><br/>

                <label>Level '.$v['Pokemon_level'].'</level><br/>
                <label>Time Left:';

                echo '</label>
                <br/>
                <input type="submit" id="'.$v['id'].'" class="buy_submit" value="Buy Now" /> </div>';
        }

?>

                &nbsp;</p>
                <p>&nbsp;</p>
              </form>

```

Im printing of all the $\_posts on buydo.php but im getting nothing all i wanna do is get the $v['id'] from this script to the buydo page. but for some resson ent going to the next page. Ive got the connect and session start it shows the results and everything just when i press the submit button the info is not being submited im taking to buydo.php but nothing being posted ??

Answer: 
Try creating a hidden input just above the submit input (it can go anywhere really, but having it there improves readability). Set the name to something static - for example, "pokemonID" - and set the value attribute to whatever you want to send to the next page. In this case, it would be $v['id']. Something similar to this would work:

```
<input type="hidden" name="pokemonID" value="' . $v['id'] . '" />

```

On the php page, you would use $\_POST['pokemonID'] to access the data.
If I understand you correct you do load the `buydo.php` page but you don't get the value submitted so that you can access it using `$_POST`?

That's because you don't have any input-elements in your form. Adding a hidden field would do the trick:

```
<input type="hidden" name="vid" value="'.$v['id'].'">

```

Now you can use the `$_POST['vid']` on `buydo.php` to access the value.