Hello, I have this php form designed in dreamweaver. when you search any bpv (bank payment voucher) file in this form it will fetch the pdf file link from my local hard disk folder. currently my local folder name is bpv and it has all the pdf files in it. i want to rename the folder to bpv2012 kindly tell me how can i do that.

im pasting the code of the form here please help me asap! i will really appreciate the effort. thanks!

<?
// Connects to your Database
include("includes/DB.php");

mysql_connect("$host","$username","$password") or die(mysql_error()) ;
mysql_select_db($db_name) or die(mysql_error()) ;
$arr = "";
if(!empty($_REQUEST['date']))
    $arr .= " AND date LIKE '%".$_REQUEST['date']."%'";
if(!empty($_REQUEST['voucher']))
    $arr .= " AND bpvno = '".$_REQUEST['voucher']."'";
if(!empty($_REQUEST['bankname']))
    $arr .= " AND bank = '".$_REQUEST['bankname']."'";
if(!empty($_REQUEST['accno']))
    $arr .= " AND acno LIKE '%".$_REQUEST['accno']."%'";
if (!empty($_REQUEST['paidto']))
        $arr .= " AND paidto LIKE '%".$_REQUEST['paidto']."%'";


if(!empty($_REQUEST['chkno']))
    $arr .= " AND chk LIKE '%".$_REQUEST['chkno']."%'";

if(!empty($_REQUEST['totalamnt']))
    $arr .= " AND tammount = '".$_REQUEST['totalamnt']."'";

if(!empty($_REQUEST['budgetcode']))
    $arr .= " AND budjetcode0 = '".$_REQUEST['budgetcode']."'";

if(!empty($_REQUEST['projectcode']))
    $arr .= " AND prjcode0 = '".$_REQUEST['projectcode']."'";

if(!empty($_REQUEST['amount']))
    $arr .= " AND amount0 = '".$_REQUEST['amount']."'";
if(!empty($_REQUEST['descc']))
    $arr .= " AND desc0 LIKE '%".$_REQUEST['descc']."%'";

$sql="SELECT * FROM `bpv` WHERE date <> 0 $arr LIMIT 0 , 100";
$result=mysql_query($sql);
?>
<link href="default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {
    color: #CC0000;
    font-weight: bold;
}
-->
</style>
<form id="form1" name="form1" method="post" action="">
<h3>Search BPV<br />
</h3>
<table width="110%" border="1" cellpadding="2" cellspacing="0" bordercolor="#75A700">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="12%">BPV</td>
        <td width="38%"><input name="voucher" type="text" id="voucher" /></td>
        <td width="12%">Bank Name </td>
        <td width="38%"><input name="bankname" type="text" id="bankname" /></td>
      </tr>
      <tr>
        <td>Account no </td>
        <td><input name="accno" type="text" id="accno" /></td>
        <td>Cheque no</td>
        <td><input name="chkno" type="text" id="chkno" /></td>
      </tr>
      <tr>
        <td>Paid to</td>
        <td><input name="paidto" type="text" id="paidto" /></td>
        <td>Total Amount</td>
        <td><input name="totalamnt" type="text" id="totalamnt" /></td>
      </tr>
      <tr>
        <td>Project code </td>
        <td><input name="projectcode" type="text" id="projectcode" /></td>
        <td>Budget Code </td>
        <td><input name="budgetcode" type="text" id="budgetcode" /></td>
      </tr>
      <tr>
        <td>Description</td>
        <td><input name="descc" type="text" id="descc" /></td>
        <td>Date</td>
        <td><input name="date" type="date" id="date" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><div align="right">
          <input name="Submit" type="submit" class="login-btn" value="Submit" />
        </div></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
<p class="style2">Search Results displaying (top 100)</p>
<table width="110%" border="1" cellpadding="2" cellspacing="0" bordercolor="#75A700">
  <tr>
    <td width="12%"><div align="center"><strong>Date</strong></div></td>
    <td width="4%"><div align="center"><strong>BPV</strong></div></td>
    <td width="6%"><div align="center"><strong>Bank Name </strong></div></td>
    <td width="3%"><div align="center"><strong>Link</strong></div></td>
    <td width="15%"><div align="center"><strong>Description</strong></div></td>
    <td width="6%"><div align="center"><strong>Account No </strong></div></td>
    <td width="13%"><div align="center"><strong>Paidto</strong></div></td>
    <td width="7%"><div align="center"><strong>Chq No </strong></div></td>
    <td width="7%"><div align="center"><strong>Amount</strong></div></td>
    <td width="10%"><div align="center"><strong>Proj code</strong></div></td>
    <td width="9%"><div align="center"><strong>Budjet Code</strong></div></td>
    <td width="8%"><div align="center"><strong>Total Ammount</strong></div></td>
  </tr>
  <?
while($row = mysql_fetch_assoc($result))
{
?>
  <tr>
    <td><div align="center">
      <?=$row['date']?>
    </div></td>
    <td><div align="center">
      <?=$row['bpvno']?>
    </div></td>
    <td><div align="center">
      <?=$row['bank']?>
    </div></td>
    <td><div align="center"><a href="bpv/<?=$row['photo']?>"><img src="images/pdf.jpg" /></a></div></td>
    <td><div align="center">
      <?=$row['desc0']?>
    </div></td>
    <td><div align="center">
      <?=$row['acno']?>
    </div></td>
    <td><div align="center">
      <?=$row['paidto']?>
    </div></td>
    <td><div align="center">
      <?=$row['chk']?>
    </div></td>
    <td><div align="center">
      <?=$row['amount0']?>
    </div></td>
    <td><div align="center">
      <?=$row['prjcode0']?>
    </div></td>
    <td><div align="center">
      <?=$row['budjetcode0']?>
    </div></td>
    <td><div align="right" class="style2">

        <div align="right">
          <?=$row['tammount']?>
        </div>
    </div></td>
  </tr>
  <?
}
?>
</table>
<p>&nbsp;</p>

the above problem is solved, I renamed the table to the folder i wanted to rename in my local hard drive and it works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.