execute script via email?
| From: | BigMark | Date: | Tue, 06 Apr 2004 13:27:23 +0000 |
| Subject: | execute script via email? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-182466@lists.php.net to get a copy of this message | ||
Is there a way for me to email this script so it executes the close of a
round instead of doing it from the website administration .
(it is a football tipping script)
<?php
include("connect.php");
// Grab variables and insert into database
$x=1;
$Round = $_POST['Round'];
switch ($Round) {
case "QF":
$y = 5;
break;
case "SF":
case "PF":
$y = 3;
break;
case "GF":
$y = 2;
break;
default:
$y = 9;
break;
}
While ($x < $y) {
$Game = $x;
$sql = mysql_query("UPDATE Rounds SET Closed = 'Yes' WHERE Round =
'$Round'
AND Game = '$Game'");
$x++;
}
?>