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 :: php if condition 
Php :: acf if image else display other image 
Php :: Stripe Test - Laravel 
Php :: query builder laravel getmedia undefined method 
Php :: PHP include causes white space at the top of the page 
Php :: afficher les input dans un tableau php est stocker dans fichier 
Php :: append data to json file php 
Php :: keep value after submit php 
Php :: php prepared statement and conditional 
Php :: andebol 
Php :: automatically make created_by and updated_by using observer laravel 
Php :: Laravel-permission update name 
Php :: Reference — What does this symbol mean in PHP? 
Php :: php accounting ledger 
Php :: default password when you make users in laravel 
Php :: carbon parse 
Php :: how to add to array in single without repetation 
Php :: only fetch specific array keys php 
Php :: remove ul container from wp_nav_menu 
Php :: Route::any 
Php :: laravel download file from AWS s3 
Php :: Verifying a login cookie 
Php :: php laravel convert blob type to string 
Php :: data validation of $_POST in php 
Php :: cmb2-repeater video show single page with wordpress 
Php :: Argument #1 ($baseObject) must be of type DateTimeInterface, string given 
Php :: php ussd 
Php :: run multiple php scripts parallel 
Php :: SymfonyComponentHttpKernelExceptionNotFoundHttpException: POST http://localhost/post 
Php :: filter using meta_query 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =