Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url1 = json_decode(file_get_contents('http://www.movie.com:/retrieveMovies'), true);
- foreach ($url1 as $movie) {
- $movieID = $movie['movieId'];
- $url2 = json_decode(file_get_contents(' http://movie.com/movieOne?seatNum=' . $movieID), true);
- $testingResult = $seat['avail'];
- echo "<button onclick = testBTN('" . $testingResult . "')>Seat ID</button>";
- }
- ?>
- <script>
- function testBTN(x) {
- if (x == "OK") {
- alert("Seat booked");
- }
- else {
- alert("Error in booking seats");
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement