<?
if($_POST){
$username=$_POST['username'];
$password=$_POST['password'];
$to=$_POST['to'];
$text=$_POST['text'];

header("Location: sms.php?username=$username&password=$password&to=$to&text=$text");

}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMS FORM</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="100%">
    <tr>
      <td colspan="2">HTML form example using post method </td>
    </tr>
    <tr>
      <td width="14%">&nbsp;</td>
      <td width="86%">&nbsp;</td>
    </tr>
    <tr>
      <td>Username:</td>
      <td><label>
        <input name="username" type="text" id="username" />
      </label></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><input name="password" type="password" id="password" /></td>
    </tr>
    <tr>
      <td>Text:</td>
      <td><textarea name="text" id="text"></textarea></td>
    </tr>
    <tr>
      <td>Mobile:</td>
      <td><input name="to" type="text" id="to" value="" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="Submit" value="Send" />
      </label></td>
    </tr>
  </table>
</form>
</body>
</html>