I am trying to open an external file with the folder names given in the database under the field folder_name
This is my code trying to
<?php
if(isset($_REQUEST['id']))
{
$client_id = $_REQUEST['id'];
$conn = mysql_connect("localhost","root","") or die("Could Not Connect To The Database");
mysql_select_db("aziz",$conn) or die("Could Not Select The Database");
//sql query somethinglike
$sql = "SELECT * FROM client WHERE client_id = '".$client_id."'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
echo "<h1>"."Company Name:" . " " . $row['c_company_name'] . " " . "</h1>";
echo "<h1>"."Company Registratiom Number:" . " " . $row['c_registration_no'] . " " . "</h1>";
echo "<h2>"."Type Of Company:" . " " . $row['type_of_company'] . " " . "</h2>";
echo "<h4>"."Street Address:" . " " . $row['c_street_address'] . " " . "</h4>";
echo "<h4>"."Town:" . " " . $row['c_town'] . " " . "</h4>";
echo "<h4>"."City:"." " . $row['c_city']. "</h4>";
echo "<h4>"."County:" . " " . $row['c_county'] . " " . "</h4>";
echo "<h4>"."Postcode:" . " " . $row['c_postcode'] . " " . "</h4>";
echo "<h4>"."Telephone Number:" . " " . $row['c_tel_no'] . " " . "</h4>";
echo "<h4>"."Extnsion Number:" . " " . $row['c_ex_no'] . " " . "</h4>";
echo "<h4>"."Mobile Number:" . " " . $row['c_mobile_no'] . " " . "</h4>";
echo "<h4>"."Fax Number:" . " " . $row['c_fax_no'] . " " . "</h4>";
echo "<h4>"."Email Address:" . " " . $row['c_email'] . " " . "</h4>";
echo "<h4>"."Website Address:" . " " . $row['c_website'] . " " . "</h4>";
echo "<h4>"."Regular Or Irregular:" . " " . $row['reg_irreg'] . " " . "</h4>";
echo "<h4>"."View Clients Folder Work:" . " " . $row['folder_name'] . " " . "</h4>";
echo "View Clients Folder Work:" ." "."<a href=\"clientwork\"".$row['folder_name']."/>".$row['folder_name']."</a>";
echo '<br> ';
echo '<br> ';
if (isset($HTTP_REFERER)) {echo "<a href='$HTTP_REFERER'>BACK</a>"; }
else {echo "<a href='javascript:history.back()'>BACK</a>";
}
}
?>
this below is part of the code is going wrong:
echo "View Clients Folder Work:" ." "."<a href=\"clientwork\"".$row['folder_name']."/>".$row['folder_name']."</a>";
Basically this code is only opening the folder called "clientwork" but I want it to access the folders with in this folder which name depends on what the folder name is called in the database under the field "folder_name "that is why I have devised this part
href=\"clientwork\"".$row['folder_name']."
hoping that it will open the clientwork folder and then open the chosen folder the is fetched from the database. But no matter how hard I try and different way to overcome this problem I just can't seem to get this working properly.
All I want it to do is open the the specified folder within the "clientworks" folder depending on the folder name given in the database.
I hope some one can help me to solve this problem
Thank You For Your Time