jofgav, it took me a little while to come up with a solution for POSTING the form, but it can all be done via two pages, with or without the web.com folk's help in redirecting.
page 1 = 'form.php'
<!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>GAMENAME :: Win £1000 every Tuesday</title>
<link href="../styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="colLeft">
<?php
// if form not submitted, display form:
if(!isset($_POST['submitcheck'])){
?>
<h1>GAMENAME! Win £1000 every Tuesday</h1>
<p>Test your sporting knowledge with COMPANY'S<br />
GAMENAME and win a cool £1000 in cash!!</p>
<p>Answer 2 sporting questions correctly in the fastest time this<br />
Tuesday and you'll win a cheque for £1000,<br />
ABSOLUTELY GUARANTEED!!</p>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="name" value="" size="30" /> First Name:
<br />
<input type="text" name="number" value="" size="30" /> Mobile <abbr title="Number" lang="en" xml:lang="en">No</abbr>:
<br />
<input type="submit" name="submit" value="submit" />
<input type="hidden" name="submitcheck" value="1" />
</form>
<?php
}
// else form is submitted, process form:
else {
if (empty($_POST['name']) || empty($_POST['number'])){
$message = '<h3>OOPS!</h3>' . "\n";
$message .= '<ul>' . "\n";
if(empty($_POST['name'])){
$message .= '<li>You did not enter your name</li>' . "\n";
}
if(empty($_POST['number'])){
$message .= '<li>You did not enter your number</li>' . "\n";
}
$message .= '</ul>' . "\n";
$message .= '<p>Please go back and try again.</p>' . "\n";
echo $message;
exit;
}
else {
// do treatment to posted values
$name = ucfirst(strtolower(trim($_POST['name'])));
$number = trim($_POST['number']);
// NOTE: name and number must be passed to
// the iframe via query string.
?>
<iframe src="iframe.php?name=<?php echo $name; ?>&number=<?php echo $number; ?>"
height="0px" width="0px"
scrolling="no"
frameborder="0"
style="visibility:hidden;background:transparent;">
</iframe>
<h1><?php echo $name; ?>, we have sent you a text message!</h1>
<p>Check your mobile phone to confirm your entry.
<br />into next Tuesday's £1000 sporting quiz...</p>
<p>Answer both questions correctly and you'll win
<br />a cheque in your name for £1000!!</p>
<h2>Good Luck!</h2>
<p class="small">If you don't receive your message check
the mobile number you entered to see if it is correct.
<br />Your number: - <strong><?php echo $number; ?></strong>.</p>
<?php
} // .else name and number submitted
} // .else form submitted
?>
</div>
<div id="colRight"> </div>
<div class="clr"> </div>
</div>
</body>
</html>
page2 = 'iframe.php'
<!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>iframe</title>
<script language="JavaScript" type="text/javascript">
<!--
function formSubmit() {
window.document.forms.contest.submit();
}
// -->
</script>
</head>
<?php
if(isset($_GET['name']) && isset($_GET['number'])){
// get variable values:
$name = trim($_GET['name']);
$number = trim($_GET['number']);
// specify correct URL using the $web variable below
// and use it as the form action!
$web = 'http://www.web.com/script?name=' .$name. '&number=' .$number;
?>
<body onload="formSubmit()">
<form id="contest" name="contest" action="<?php echo $web; ?>" method="post">
<input type="text" name="name" value="<?php echo $name; ?>" />
<input type="text" name="number" value="<?php echo $number; ?>" />
</form>
<?php
}
?>
</body>
</html>
Notice, that when the iframe page is loaded it automatically submits the form via a Javascript function (could also be done with body onload). Just tested it and seems to work. (instead of entering the contest, I wrote the name and number to a .txt file, and it was as it should be...)
Edit: did some more testing with it as is and it's pretty dependable.