source: schedule/Transaction/insert.php@ 15806

Last change on this file since 15806 was 15805, checked in by tanio, 11 years ago
File size: 1.1 KB
Line 
1<?php
2include 'include/factdb.php';
3
4 $Time =$_GET['Time'];
5 $SelectedSource = $_GET['Source'];
6 $Date = $_GET['Date'];
7 $SelectedMeasure = $_GET['measure'];
8$TimeEX = explode("-",$Date);
9//if($limtex){}
10echo $TimeEX2 = "day=".$TimeEX[0]."&month=".$TimeEX[1]."&year=".$TimeEX[2];
11echo $limtex = count(explode(",",$SelectedSource));
12$value = $_GET['Data'];
13
14
15$date = $_GET['Date'];
16$n_value = explode(",",$value);
17//$n_var2 = explode(",",$var2);
18//$n_var3 = explode(",",$var3);
19for($i=0;$i<=$limtex-1;$i++){
20
21
22 $n1 = $n_value[$i];
23 //$n2 = $n_var2[$i];
24 //$n3 = $n_var3[$i];
25
26 $Time = explode(",",$Time);
27 $select = explode(",",$SelectedSource);
28 $measure = explode(",",$SelectedMeasure);
29 //echo $text[$i];
30
31 echo $select[$i];
32
33
34 $selectf = $select[$i];
35 $Timef = $Time[$i];
36 $dateTime=$Timef+$date;
37 $measuref = $measure[$i];
38
39
40 $insert = mysql_query("INSERT INTO schedule values('','$dateTime','','','','$n1','$selectf','$measuref')") or die(mysql_error("error"));
41}
42 if($insert){
43
44 ?>
45 <script type="text/javascript">
46 alert("Sucessfully save");
47 </script>
48 <?php
49
50 }
51
52?>
Note: See TracBrowser for help on using the repository browser.