-1

$_POST 変数の前後に静的フレーズを挿入するにはどうすればよいですか? 私が使用しているコードは次のとおりです。

<?php
require_once '/home/example/public_html/sms/vendor/autoload.php';
use Plivo\RestAPI;
$auth_id = "MAM2IXMDVLNZI3xxxxxx";
$auth_token = "YmI0NmQyZWQ5MDcwNjEyNjc4ZTMxYjNhMmxxxxxx";

$p = new RestAPI($auth_id, $auth_token);

// Send a message
$params = array(
        'src' => 'AcmeLLC', // Sender's phone number with country code
        'dst' =>  $_POST["dst"], //Receiver's phone number with country code
        'text' => $_POST["text"], // Your SMS text message
        //'url' => 'http://example.com/sms.html', // The URL to which with the status of the message is sent
        'method' => 'POST' // The method used to call the url
    );
 // Send message
$response = $p->send_message($params);

// Print the response
echo "Response : ";
print_r ($response['response']);

// Print the Api ID
echo "<br> Api ID : {$response['response']['api_id']} <br>";

// Print the Message UUID
echo "Message UUID : {$response['response']['message_uuid'][0]} <br>";

?>

私はこのようなことを達成したい:

'text' => Hello, $_POST["name"] Thank you for registering. Your unique membership ID is $_POST["memid"] More details have been sent on $_POST["email"]

ご存じのように、これは明らかに間違っています。なぜなら、ある単語が実際に静的であり、他の単語が POST 経由で Gravity Forms から受信されているかどうかを示唆するヒントがないからです。これについてどうすればよいですか?

ありがとう!

4

1 に答える 1