Partially complete #22 (only thing will be save/load/upload)
[desert.git] / src / org / sourceforge / desert / web / upload_game.php
blobb12f2d16c9e1cd68eb55d22d48f2c3b55d29c449
1 <?php
3 // Commit game
4 // Requires the savegame POSTed in as "savgm"
5 // MySQL only
7 $dbConn = mysql_connect("mysql-d", "d294945rw", "whatever");
8 if ($dbConn == null) {
9 die("fail to connect");
11 @mysql_select_database("d294945_sav");
12 if ($_POST['savgm']) {
13 // commit
14 // we only have ro/rw rights from sf... but your case might be bad
15 mysql_query("INSERT INTO desert_savgames (sav_data) VALUES (". $_POST['savgm'] . ");");
18 echo "ok";