hi,
please i need some help;
i have a "for" function that create for each ip address found in the database an image button having a name="the ip address". this is the code:
<?php
$query = mysql_query("SE LECT * FROM site_status");
$number= mysql_num_rows( $query);
for ($i=0; $i<$number; $i++){
$row[$i] = mysql_fetch_ass oc($query);
?>
in HTML :
<input type="image" src="./images/bat.png" border="0" alt="<?php echo $row[$i]["CSTip"];?>" name="<?php echo $row[$i]["CSTip"];?>" width="80" height="90" onClick="window .open('real_tim e_graph-v1.php','Qualit y_Graph','width =1000,height=50 0,resizable=yes ,scrollbars=yes ')" />
when i click on an image; i ll redirect to the file
real_time_graph-v1.php where i have an SQL query:
$voltage_query = "SELECT volt FROM volt_table where CSTip='%NAME_VA LUE%'and date='%CSXdate% '";
the NAME_VALUE should be the name of the image where i clicked(or any identity of the clicked image)
i dont know how to write this :( !!!!
please i need some help;
i have a "for" function that create for each ip address found in the database an image button having a name="the ip address". this is the code:
<?php
$query = mysql_query("SE LECT * FROM site_status");
$number= mysql_num_rows( $query);
for ($i=0; $i<$number; $i++){
$row[$i] = mysql_fetch_ass oc($query);
?>
in HTML :
<input type="image" src="./images/bat.png" border="0" alt="<?php echo $row[$i]["CSTip"];?>" name="<?php echo $row[$i]["CSTip"];?>" width="80" height="90" onClick="window .open('real_tim e_graph-v1.php','Qualit y_Graph','width =1000,height=50 0,resizable=yes ,scrollbars=yes ')" />
when i click on an image; i ll redirect to the file
real_time_graph-v1.php where i have an SQL query:
$voltage_query = "SELECT volt FROM volt_table where CSTip='%NAME_VA LUE%'and date='%CSXdate% '";
the NAME_VALUE should be the name of the image where i clicked(or any identity of the clicked image)
i dont know how to write this :( !!!!
Comment