source: schedule/Transaction/insert.php@ 17148

Last change on this file since 17148 was 16926, checked in by tanio, 11 years ago
File size: 922 bytes
Line 
1<?php
2//Build by: khristofer Usman
3//Modified by: Jaypee Tanio
4// June 14,2013
5
6include '../include/factdb.php';
7 $Time =$_POST['Time'];
8 $SelectedSource = $_POST['Source'];
9 $Date = $_POST['Date'];
10 echo $Date;
11 $SelectedMeasure = $_POST['measure'];
12$value = $_POST['Data'];
13$date = $_POST['Date'];
14echo "<br />";
15$n_value = explode(",",$value);
16$Times = explode(",",$Time);
17$select = explode(",",$SelectedSource);
18$measure = explode(",",$SelectedMeasure);
19$limtex = count(explode(",",$SelectedMeasure));
20echo "<br />";
21for($i=0;$i<=$limtex-1;$i++)
22{
23 $n1 = $n_value[$i];
24 $selectf = $select[$i];
25 $measuref = $measure[$i];
26 $dateTime=new DateTime($date." ".$Times[$i]);
27 $parsed_date = $dateTime->format('Y-m-d H:i:s');
28
29 mysql_query("INSERT INTO schedule VALUES('null','".$parsed_date."','".$UpdateDate."','".$measuref."','','".$n1."','".$selectf."','".$measuref."')");
30
31}
32
33?>
Note: See TracBrowser for help on using the repository browser.