Search
 
SCRIPT & CODE EXAMPLE
 

PHP

ussd php

<?php// Reads the variables sent via POST$sessionId   = $_POST["sessionId"];  $serviceCode = $_POST["serviceCode"];  $text = $_POST["text"];//This is the first menu screenif ( $text == "" ) {$response  = "CON Hi welcome, I can help you with Event Reservation 
";$response .= "1. Enter 1 to continue";}// Menu for a user who selects '1' from the first menu// Will be brought to this second menu screenelse if ($text == "1") {$response  = "CON  Pick a table for reservation below 
";$response .= "1. Table for 2 
";$response .= "2. Table for 4 
";$response .= "3. Table for 6 
";$response .= "4. Table for 8 
";}//Menu for a user who selects '1' from the second menu above// Will be brought to this third menu screenelse if ($text == "1*1") {$response = "CON You are about to book a table for 2 
";$response .= "Please Enter 1 to confirm 
";}else if ($text == "1*1*1") {$response = "CON Table for 2 cost -N- 50,000.00 
";$response .= "Enter 1 to continue 
";$response .= "Enter 0 to cancel";}else if ($text == "1*1*1*1") {$response = "END Your Table reservation for 2 has been booked";}else if ($text == "1*1*1*0") {$response = "END Your Table reservation for 2 has been canceled";}// Menu for a user who selects "2" from the second menu above// Will be brought to this fourth menu screenelse if ($text == "1*2") {$response = "CON You are about to book a table for 4 
";$response .= "Please Enter 1 to confirm 
";}// Menu for a user who selects "1" from the fourth menu screenelse if ($text == "1*2*1") {$response = "CON Table for 4 cost -N- 150,000.00 
";$response .= "Enter 1 to continue 
";$response .= "Enter 0 to cancel";}else if ($text == "1*2*1*1") {$response = "END Your Table reservation for 4 has been booked";}else if ($text == "1*2*1*0") {$response = "END Your Table reservation for 4 has been canceled";}// Menu for a user who enters "3" from the second menu above// Will be brought to this fifth menu screenelse if ($text == "1*3") {$response = "CON You are about to book a table for 6 
";$response .= "Please Enter 1 to confirm 
";}// Menu for a user who enters "1" from the fifth menuelse if ($text == "1*3*1") {$response = "CON Table for 6 cost -N- 250,000.00 
";$response .= "Enter 1 to continue 
";$response .= "Enter 0 to cancel";}else if ($text == "1*3*1*1") {$response = "END Your Table reservation for 6 has been booked";}else if ($text == "1*3*1*0") {$response = "END Your Table reservation for 6 has been canceled";}// Menu for a user who enters "4" from the second menu above// Will be brought to this sixth menu screenelse if ($text == "1*4") {$response = "CON You are about to book a table for 8 
";$response .= "Please Enter 1 to confirm 
";}// Menu for a user who enters "1" from the sixth menuelse if ($text == "1*4*1") {$response = "CON Table for 8 cost -N- 250,000.00 
";$response .= "Enter 1 to continue 
";$response .= "Enter 0 to cancel";}else if ($text == "1*4*1*1") {$response = "END Your Table reservation for 8 has been booked";}else if ($text == "1*4*1*0") {$response = "END Your Table reservation for 8 has been canceled";}//echo responseheader('Content-type: text/plain');echo $response?>
Comment

PREVIOUS NEXT
Code Example
Php :: Laravel docker-compose 404 not found Nginx 
Php :: css dynamique avec php dans page http<style 
Php :: Dispatch, performance 
Php :: when WYSIWYG fields remove paragraph tag 
Php :: WordPress Creating “startupl” folder and Wrtting to .htaccess 
Php :: pl sql php connect 
Php :: Rewrite .php file without .php extension with .htaccess ULTIMATE SOLUTION 
Php :: generateThumbnailRepresentations 
Php :: Laravel Http client retry request if fail 
Php :: php map array key to variable names 
Php :: function() use() php clousure examples 
Php :: not have permision elgg settings.php 
Php :: laravel - How to concatenate URL and retrieve images from database in json format 
Php :: add code in header 
Php :: wpmu assign user to blog 
Php :: how to use cornjob on live server in laravel 
Php :: create or update laravel 5.8 stackoverflow 
Php :: public function __sleep() and __wakeup() 
Php :: most sites visited by ip address laravel 
Php :: publish laravel scout 
Php :: route laravel 
Php :: Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/7.4.29 Server at localhost Port 8080 
Php :: laravel data type 
Php :: store a variable in session and echo that variable on a page wordpress 
Php :: laravel transaction 
Php :: print select mysql in php 
Java :: dependency for spring security 
Java :: java get current year 
Java :: full screen in jframe 
Java :: loop through dictionary java 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =