troubleshooting Question

Server connections and file lookup using PHP form!!!

Avatar of dialeradmin
dialeradmin asked on
PHP
10 Comments1 Solution250 ViewsLast Modified:
Hi experts!  Alright, this may be a little wordy, so bear with me here ;)

I am looking to create a download.php page that contains a form.  In this form, there is a drop down menu (containing four values).  I want each of these values to label a different server to connect to.

Underneath the drop down menu is a textfield that asks the user to input the filename (with extension) of the file they tend to look up within the selected server (the server they selected in the drop down menu).

My intention is after the server and filename are submitted, a connection is made to the server that was selected in the drop down menu.  I want the script to scan the server for that filename (plus extension).  If there is a match, it pulls that file and places in within a certain directory on my webserver.  If not, it disconnects and tells the user there was no file on that server with the specified filename.

So, I'll start with that, and if I can get that working, I'll move on to more complex things afterwords...Any help is highly appreciated!!!  Can anyone help me with a jump start?  Will I need to create a database for the different servers, since the form uses values to differentiate between the fou?  It sounds pretty confusing, and I'm new to PHP.

Here is the form I am using in case you need to see how I set it up.

FORM
=================
<form name="form1" method="post" action="">
                     
              <p align="left"></p>
                      <table width="100%">
                        <tr>
                          <td width="30%">&nbsp;</td>
                          <td width="40%" rowspan="6">&nbsp;</td>
                          <td width="30%" rowspan="6">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Select
                            Dialer:</font></td>
                        </tr>
                        <tr>
                          <td><select name="select" id="select">
                              <option value="dialer_1">Dialer 1</option>
                              <option value="dialer_2">Dialer 2</option>
                              <option value="dialer_3">Dialer 3</option>
                              <option value="dialer_4">Dialer 4</option>
                            </select></td>
                        </tr>
                        <tr>
                         
                  <td><font color="#FF0000" size="-2" face="Arial, Helvetica, sans-serif">Filename
                    (<font color="#000000">with</font> <font color="#000000">extension</font>):</font></td>
                        </tr>
                        <tr>
                          <td><input name="filename" type="text" id="filename"></td>
                        </tr>
                        <tr>
                          <td><input type="submit" name="Submit" value="Retrieve file"></td>
                        </tr>
                      </table>
                   </p>
                    </form>
ASKER CERTIFIED SOLUTION
MasonWolf

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros