source: schedule/Transaction/insert.php

Last change on this file was 17426, checked in by tose, 11 years ago
File size: 654 bytes
Line 
1 <?php
2//connect to the mysql
3$db = mysql_connect("localhost","scheduletest","t3stsched");
4mysql_select_db('sandboxschedule', $db) or die("Could not select database");
5
6
7 $GTimes=$_POST['GTime'];
8 $Source=$_POST['Source'];
9 $measure=$_POST['measure'];
10 $data=$_POST['Data'];
11 $Gdates = $_POST['GDate'];
12 $seq = $_POST['seq'];
13
14 $date = new DateTime($Gdates.$GTimes);
15 $par=$date->format('Y-m-d H:i:s');
16 $Timez = new DateTime($GTimes);
17 $part = $Timez->format('H:i:s');
18 //database query
19 mysql_query("INSERT INTO schedule VALUES('null','".$par."','".$part."','".$seq."','','".$data."','".$Source."','".$measure."')");
20
21
22?>
Note: See TracBrowser for help on using the repository browser.