CPSMS form sms script problemer
Hejsa!Jeg vil gerne tilføje en formular til dette script.
Men har prøvet forgæves men kan ikke se hvad der skal til.
Jeg har lavet en form hvor man kan sende SMS fra min hjemmeside.
Men hvordan får jeg det til at virke med name på mine form felter.
POST.PHP
<?php
// The neccesary variables are set.
$url = "http://www.cpsms.dk/sms/";
$url .= "?message=" . urlencode("This is a test.");
$url .= "&recipient="; // Recipient
$url .= "&username=xxxxx"; // Username
$url .= "&password=xxxxx"; // Password
$url .= "&from=" . urlencode(""); // Sendername
// The url is opened
$reply = file_get_contents($url);
if(strstr($reply, "<succes>")) {
// If the reply contains the tag <succes> the SMS has been sent.
echo "The message has been sent. Server response: ".$reply;
} else {
// If not, there has been an error.
echo "The message has NOT been sent. Server response: ".$reply;
}
?>
FORM.HTM
<html>
<body>
<h1>SMS form</h1>
<form method='post' action='post.php'>
<table border=0>
<tr>
<td>Afsender:</td>
<td><input type="text" name='&from'></td>
</tr>
<tr>
<td>Til Mobilnr:</td>
<td><input type="text" name='&recipient'></td>
</tr>
<tr>
<td>Besked</td>
<td><textarea rows='4' cols='40' name='?message'></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type='submit' name='submit' value='Send'></td>
</tr>
</table>
</form>
</body>
</html>