Created
July 21, 2014 14:14
-
-
Save joshuabaker/a541045167c96ad51146 to your computer and use it in GitHub Desktop.
Referral helper for OpenTable form submissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Referral helper for OpenTable form submissions | |
| * | |
| * The RestaurantReferralID must match the RestaurantID value, however the | |
| * only solution for this is JavaScript. This script copies the | |
| * RestaurantID into the RestaurantReferralID and passes it to the | |
| * OpenTable action endpoint. | |
| * | |
| * @author Made by Cloud Limited | |
| */ | |
| $request = $_REQUEST; | |
| if (isset($request['RestaurantReferralID']) | |
| && isset($request['RestaurantID']) | |
| && (empty($request['RestaurantReferralID']) | |
| || $request['RestaurantReferralID'] != $request['RestaurantID'])) | |
| { | |
| $request['RestaurantReferralID'] = $request['RestaurantID']; | |
| } | |
| header('Location: http://www.opentable.co.uk/restaurant-search.aspx?' . http_build_query($request)); | |
| exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment