Difference between revisions of "Savecode save.php"
SimonClark (talk | contribs) |
SimonClark (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <source | + | <source lang="php"> |
<?php | <?php | ||
− | + | include('/var/www/dev.zebraspot.com/html/includes/zebracode.php'); | |
− | include('/var/www/dev.zebraspot.com/html/includes/zebracode.php'); | + | dbConnect('pro608a'); |
− | + | $data = addslashes(json_encode($_POST)); | |
− | dbConnect('pro608a'); | + | $key = GetValue('datakey'); |
− | + | $time = time(); | |
− | $data = addslashes(json_encode($_POST)); | + | GetQuery("INSERT INTO rawdata (timestamp, jsondata, datakey) VALUES ('$time','$data','$key')"); |
− | + | echo 'success'; | |
− | $key = GetValue('datakey'); | ||
− | |||
− | $time = time(); | ||
− | |||
− | GetQuery("INSERT INTO rawdata (timestamp, jsondata, datakey) VALUES ('$time','$data','$key')"); | ||
− | |||
− | echo 'success'; | ||
− | |||
</source> | </source> |
Latest revision as of 11:28, 9 August 2010
<?php
include('/var/www/dev.zebraspot.com/html/includes/zebracode.php');
dbConnect('pro608a');
$data = addslashes(json_encode($_POST));
$key = GetValue('datakey');
$time = time();
GetQuery("INSERT INTO rawdata (timestamp, jsondata, datakey) VALUES ('$time','$data','$key')");
echo 'success';