How can I 'get' a variable? Example: index.php <td class="body"> <form action="player.php" method="get"> <input type="hidden" name="<?php echo $file?>" /> <input type="submit" /> </form></td> Code (markup): player.php <?php echo $_GET[$file]; ?> Code (markup): This example doesn't work, but it shows what I would like to do. Any help is appreciated...
With a few little changes, your code will work: index.php: <?php $file = 'MyFile'; ?> <td class = "body"> <form action = "player.php" method = "get"> <input type = "hidden" name = "filename" value = "<?php echo $file; ?>" /> <input type = "submit" /> </form> </td> PHP: player.php: <?php echo ($_GET ['filename']); ?> PHP: If you need more details, please reply.
It worked perfectly, thanks a lot! I'd give you more reputation, but it says I have to 'spread it around' before giving it to you again.