Jump to content

Passing a values in URL


eldan88
Go to solution Solved by kicken,

Recommended Posts

Hey Guys. I am working on an API for automated voice application.

 

I was just wondering if it is possible to send a URL value with out assigning anything to it.

 

For example if someone presses a key on their telephone keypad, the application will go the following url <Gather action=\"confirmation_verificationphp?est_delivery_time\">

 

The "delivery_time" is not assigned to anything, I just want PHP to preform a set of actions when it gets the "delivery_time"

 

Below is a clear example

// When user enters a number on their telephone keypad it will go to "confirmation_verification.php?delivery_time"
  echo "<Gather action=\"confirmation_verification.php?delivery_time\" method=\"GET\" timeout=\"10\" finishOnKey=\"*\">";
                    echo say("Please enter your estimated delivery time");
                   echo "</Gather>";


Preform the set of actions when you get "delivery_time"
                   if($_GET['delivery_time']) {
                      $delivery_time =  $_GET['Digits'];
                      send_order_confirmation_email($order_number, $delivery_time );
                   }	
Link to comment
Share on other sites

It is possible, but you need the isset() method, your if condition will always be false if you do not assign a value to 'delivery_time' :

 

 

if($_GET['delivery_time']) {
$delivery_time = $_GET['Digits'];
send_order_confirmation_email($order_number, $delivery_time );
}   

 

Instead use

if(isset($_GET['delivery_time']))
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.