Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Values from feed examples: 123, 234, 345
- $valuesFromFeed = array(123, 234, 345); //These are not in my code, they are values from the XML feed
- while ($uniqueIdentifier = $valueFromFeed) {
- <input type="hidden" name="horse_<?php echo $uniqueIdentifier; ?>" />
- }
- ?>
- <?php
- if (isset($_POST['horse_' . $uniqueIdetifier])) {
- echo "You got the right thing here.";
- } else {
- echo "Still no joy.";
- }
- ?>
- <form action="/horses/my_unique_horse_name">
- ...
- </form>
- <form action="/horses/another_horse_name">
- ...
- </form>
- <form action="/horses/">
- <input type="hidden" value="my_unique_horse_name'>
- </form>
- <form action="/horses/">
- <input type="hidden" value="another_horse_name'>
- </form>
- <form method="/horses/">
- <button type="submit" value="my_unique_horse_name">My Horse</button>
- <button type="submit" value="another_horse_name">Another Horse</button>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement