Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8208213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:15:53+00:00 2026-06-07T09:15:53+00:00

this is little complicated for me: say my server has 1200 files for example:

  • 0

this is little complicated for me:
say my server has 1200 files for example:

file:///D:/xampp/htdocs/bibek/address/WRTRThu-05-Jul-2012-14-02-14pm.html
file:///D:/xampp/htdocs/bibek/address/WRTRThu-05-Jul-2012-13-02-23pm.html
file:///D:/xampp/htdocs/bibek/address/BRTRThu-05-Jul-2012-13-05-35pm.html
file:///D:/xampp/htdocs/bibek/address/BRTRThu-05-Jul-2012-12-06-52pm.html etc.

as one can see each of them has a name: WRTR and BRTR and a day date and time.
i have to write a script with php mysql javascript(only the last the last resort), to let a user to enter the date time day and the name (wrtr or brtr) and he will be able to view the corresponding files.
can anyone suggest how to proceed?

according to sugesstion and with the help of maxhud, i got this, hats off to you…

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
    function showFile(){
        var name = document.getElementById("name").value;
        var dday = document.getElementById("dday").value;
        var month = document.getElementById("month").value;
        var year = document.getElementById("year").value;
        var hour =document.getElementById("hour").value;
        var minute = document.getElementById("minute").value;
        var second = document.getElementById("second").value;
        var ofday = document.getElementById("ofday").value;
        var day = document.getElementById("day").value;
        var ofday=document.getElementById("ofday").value;
        window.location = "address/" + name + day + "-" + dday+ "-" + month + "-" + year + "-" +hour + "-" + minute + "-" + second + ofday + ".html";
    }
</script>
</head>
<body>

    Name: <input id="name" placeholder="accountname"/><br/>

    Date: <input id="dday" placeholder="01-31"/> - <input id="month" placeholder="month"/> - <input id="year" placeholder="year"/><br/><br/>


    Time: <input id="hour" placeholder="24hours"/> - <input id="minute" placeholder="minute"> - <input id="second" placeholder="second"/>
     of Day <input id="ofday" placeholder="am/pm"/>
     <br/><br/>
     Day: <input id="day"/>
     <br/><br/>

    <button onclick="showFile()">Take me to the file</button>
</body>
</html>

and the php script:
fileLocator2.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Ethernet database check</title>
<style type="text/css">
body
{
    width:90%;
    max-height:auto;
    min-height:600px;
    background-color:#000;
    color:white;
    font-size:17px;
}
br{
    margin-bottom:1em;
}
#textleft
{
    float:left;
    text-align:left;
}
#textright
{
    float:right;
    margin-right:2em;
}
.inputcont{
    float:left;
    width:20%;
    margin-left:0.1em;
    autofocus:autofocus;
}
a:link
{
    text-decoration:none;
    color:white;
}
title
{

    border-radius:5px;
    font-size:3em;
    background-color:blue;
    color:white;
}

    .yellobutton
{
    background-color:yellow;
    margin-top:1%;
    float:right;
    margin-right:2%;
    width:10em;
    height:2.4em;
    border:1px solid blue;
    border:inset 1px solid black;
    box-shadow:2px 2px 5px #fff;
    color:black;
    font-weight:bold;
}

</style>
</head>
<body>
        <header style="height:4em;font-size:2em;"> Employee Access Only</header>
        <div style="margin:2em;padding:1em 1em 4em 1em;height:auto;border:1px solid #000;border-radius:5px;-moz-box-shadow:0 0 5px 2px #ddb;box-shadow:0 0 5px 2px #ddd;">
                <form method="POST" action="confirm.php">

            <div id="textleft">Path or folder:<br></div>
            <div id="textright"> <input id="path" name="path" placeholder="address no/"/>[?]</div><br/>

            <div id="textleft">Name of file:<br/></div>
            <div id="textright"> <input id="name" name="name" placeholder="filename"/><a href="#" title="WRTR &#13;BRTR">[?]</a></div><br/>

            <div id="textleft">Day:<br/></div>
            <div id="textright"> <input  id="day" name="day"/><a href="#" title="Mon Tue Wed Thu Fri Sat">[?]</a></div>
            <br/>
            <div id="textleft">Date:</div>
            <div id="textright"><input  id="ddate" placeholder="01-31" name="ddate"/> - <input id="month" placeholder="month" name="month"/> - <input id="year" placeholder="2001-2011" name="year"/><a href="#" title="date:01-02-03..31 &#13;month:Jan,Feb,Mar,Apr,May,Jun,Jul,Aug&#13; year:2001...2011">[?]</a></div><br/>
            <div id="textleft">Time:<br/></div>
            <div id="textright"><input  id="time" name="time"/><a href="#" title="hours-mins-seconds &#13; 13-20-23">[?]</a></div></br>

        <input type="submit" class="yellobutton" id="submit" name="submit" value="show me"/>
    </form>
    </div>
    <footer style="font-size:1.4em ;margin-top:20%;">&copy;Bibek Agarwal Scripts</footer>

</body>
</html>

and confirm.php

<?php
if(isset($_POST['submit']))
    {

    $pathfolder=trim($_POST['path']);
    $filename=trim($_POST['name']);
    $day=trim($_POST['day']);
    $ddate=trim($_POST['ddate']);
    $dmonth=trim($_POST['month']);
    $dyear=trim($_POST['year']);
    $time=trim($_POST['time']);
    /*echo 'path '.$pathfolder.'<br/>';
    echo 'filename '.$filename. '<br/>';
    echo 'day' . $day.'<br/>';
    echo 'time ' .$time. '<br/>';*/
     if((!empty($pathfolder)) && (!empty($filename)) && (!empty($day)) && (!empty($ddate)) && (!empty($dmonth)) && (!empty($dyear)) && (!empty($time)))
        {
            list($hour,$minute,$second)=explode("-",$time);


            echo 'hours '.$hour.'<br/>';
            echo 'minutes '.$minute.'<br/>';
            echo 'seconds '.$second.'<br/>';
            if(($hour>=12) && ($hour<=59))

                $flag="pm";

            if(($hour>=00) && ($hour<=11))
                  $flag="am";

                        $filesever=$pathfolder."/".$filename.$day."-".$ddate."-".$dmonth."-".$dyear."-".$hour."-".$minute."-".$second.$flag.".html";
                         header("Location:$filesever") ;
        }
        else 'Empty Inputs';

 }

?>      
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:15:55+00:00Added an answer on June 7, 2026 at 9:15 am
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript">
        function showFile(){
            var name = document.getElementById("name").value;
            var time = document.getElementById("time").value;
            var dayom = document.getElementById("dayom").value;
            var month = document.getElementById("month").value;
            var year = document.getElementById("year").value;
            var day = document.getElementById("day").value;
    
            window.location = "address/" + name + day + "-" + dayom + "-" + month + "-" + year + "-" time + ".html";
        }
    </script>
    <style>
        input{
            display:block;
        }
    </style>
    </head>
    <body>
        Name: <input id="name"/>
        Time: <input id="time"/>
        Day of the Month <input id="dayom"/>
        Month: <input id="month"/>
        Year: <input id="year"/>
        Day: <input id="day"/>
        <button onclick="showFile()">Take me to the file</button>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do THIS , just a little bit more complicated: Lets say,
Okay, this scenario is a little complicated, but I will try to explain it
Alright, this problem is a little complicated, so bear with me. I have a
This little bit of syntax has been a bit of a confusion for me
It's a little more complicated than that, but this is my code: private void
This is a little complicated so I will try and explain as best as
This (I think), is a little complicated. I have a table being created from
This is a little complicated... Basically, I have this function: def do_loop(self): for line
sorry, if this gets a little complicated. I've taken the object and removed everything
found this little code snippet that seems to do what i want, but im

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.