Hi
I am new to this forum and also new to PHP so please excuse the daft question but hopefully somebody can point me in the right direction.
This script takes an output from a web form and removes the space and replaces it with %20 which is the control character that my SMS gateway requires this works fine.
<?php
$message = $_POST["message"];
$replace = ' ';
$with = '%20';
$v1 = str_replace($replace,$with, $message);
function output($v1)
{
return $v1 ;
}
print output ($v1)
?>
The output text is printed on the screen in the correct format so the bit I am stuck with is how do a take the output from this script so it can posted into the next part of the script I need it in the format $messag1 = $_POST["message1"];
I hope my question makes some sense if possible please could you give an example has I am finding this PHP scripting a bit hard going and I find it easier to follow an example.
Many thanks for any help
Guern