Hi Pig, thanks for the reply..
I have double checked the column names and table names as well as the connection variables.. to prove that that is all working.. I set the $rec_ID="1" and I get the output for ID value 1 for all columns. I believe that the only thing i am missing is the value chosen in the drop down menu is simply not parsing to the $rec_ID variable.. Here is my updated scripts as I have had some help from another php forum.. let me know what you think.. thanks again!!
PS.. now am not getting any error logs in apache.. so an improvement since last script!
SER_Selection.php************************************
<HTML>
<BODY>
<CENTER><B> View A Record From The Personal Table </B></CENTER>
<?php
personal.php
include file
include ("magops_info.php");
// define it as NULL
$rec_ID = "";
if (isset($_GET['rec_ID'])) {
$rec_ID = $_GET['rec_ID'];
}
$sql="SELECT server_name,ID FROM servers_history";
$mysql_result=mysql_query($sql,$connection);
$num_rows=mysql_num_rows($mysql_result);
if ( $num_rows == 0 ) {
echo "Sorry there is no information";
} else {
we have records
echo "<FORM METHOD=GET ACTION=\"see_rec.php\">";
echo "Please select a server <BR>";
echo "<SELECT server_name=\"rec_ID\">";
while ($row=mysql_fetch_array($mysql_result))
{
$server_name=$row["server_name"];
$ID=$row["ID"];
display results
echo "<OPTION VALUE=\"$ID\" >$server_name";
}
echo "</SELECT>";
} # end else
echo "<BR><BR>";
echo "<INPUT TYPE=\"SUBMIT\" VALUE=\"View the details !\">";
echo "<INPUT TYPE=\"RESET\" VALUE=\"Clear me!\">";
mysql_close($connection);
?>
</FORM>
</BODY>
</HTML>
SEE_REC>PHP*****************************************
<HTML>
<BODY>
<?php
see_rec.php
include file
include ("magops_info.php");
// define it as NULL
$rec_ID = "";
if (isset($_GET['rec_ID'])) {
$rec_ID = $_GET['rec_ID'];
}
$sql="SELECT * FROM servers_history WHERE ID = '$rec_ID'";
$mysql_result=mysql_query($sql,$connection);
$num_rows=mysql_num_rows($mysql_result);
if ( $num_rows == 0 ) {
echo "Sorry there is no information";
} else {
we have results
echo "<TABLE ALIGN=\"CENTER\" BORDER=\"3\">";
echo "<TR><TH>date</TH><TH>server</TH><TH>backupDescription</TH><TH>BackupStatus</TH><TH>DiskSpace</TH><TH>TotalGB</TH><TH>PercentFull</TH><TH>FreeGB</TH></TR>";
while ($row=mysql_fetch_array($mysql_result))
{
$datetime=$row["datetime"];
$server_name=$row["server_name"];
$backup_des=$row["backup_des"];
$backup_status=$row["backup_status"];
$disk_space=$row["disk_space"];
$total_GB=$row["total_GB"];
$percent_full=$row["percent_full"];
$free_GB=$row["free_GB"];
$ID=$row["ID"];
display results
echo "<TR><TD>$datetime</TD><TD>$server_name</TD><TD>$backup_des</TD><TD>$backup_status</TD><TD>$disk_space</TD><TD>$total_GB</TD><TD>$percent_full</TD><TD>$free_GB</TD></TR>";
}
} # end else
mysql_close($connection);
?>
</TABLE>
<BR><A HREF="ser_selection.php"> Back</A>
</BODY>
</HTML>