I'm trying to draw points that firstly defined between two values at data.php using post method
#data.php
<?php
:
:
?>
<img src="image.php">
<form action="data.php" method="post"> Between <INPUT type="TEXT" name="from"> And <INPUT type="TEXT" name="to">
<td colspan=5 <input type="submit" name="submit" value="Select"></td> </form>
<?php
if(isset($_POST['submit']))
{
$Fro = $_POST['from']; $Too = $_POST['to'];
:
:
}
?>
At image.php these points are supose to be dawed by taking their coordinates (x,y) from a table under condition that its betwwen the values of $Fro and $Too.
#image.php
<?php
mysql_connect("localhost", "root", "1234") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
$Fro = $_POST['from']; $Too = $_POST['to'];
$check3 = mysql_query("SELECT * FROM data WHERE data.ID BETWEEN '$Fro' AND '$Too' ")or die(mysql_error());
while($info3 = mysql_fetch_array( $check3 ))
{
$time = $info3['ID']; $arrX[$i] = $info3['x']; $arrY[$i] = $info3['y'];
$i += 1; $count = $i;
}
:
:
//a function to draw the points
?>
The problem is that the post contents of $Fro and $Too does't not posted so that it can't be used at image.php (does't have value when posted).
I tried to cookies but does't work also.
any help.
thanks in advance
#data.php
<?php
:
:
?>
<img src="image.php">
<form action="data.php" method="post"> Between <INPUT type="TEXT" name="from"> And <INPUT type="TEXT" name="to">
<td colspan=5 <input type="submit" name="submit" value="Select"></td> </form>
<?php
if(isset($_POST['submit']))
{
$Fro = $_POST['from']; $Too = $_POST['to'];
:
:
}
?>
At image.php these points are supose to be dawed by taking their coordinates (x,y) from a table under condition that its betwwen the values of $Fro and $Too.
#image.php
<?php
mysql_connect("localhost", "root", "1234") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
$Fro = $_POST['from']; $Too = $_POST['to'];
$check3 = mysql_query("SELECT * FROM data WHERE data.ID BETWEEN '$Fro' AND '$Too' ")or die(mysql_error());
while($info3 = mysql_fetch_array( $check3 ))
{
$time = $info3['ID']; $arrX[$i] = $info3['x']; $arrY[$i] = $info3['y'];
$i += 1; $count = $i;
}
:
:
//a function to draw the points
?>
The problem is that the post contents of $Fro and $Too does't not posted so that it can't be used at image.php (does't have value when posted).
I tried to cookies but does't work also.
any help.
thanks in advance