Jump to content

Linking to FTP site with PHP script


echarnley

Recommended Posts

Hello - I am new to php and have a simple form I created.  It takes a project ID entry and then feeds that into a link to an ftp site with the format ftp://[email protected].

 

The first page opens fine in all browsers.  But when anything is entered in the projectID field and the Go button is pressed, it goes to a page cannot be displayed.  This ONLY happens in IE.  In Firefox and Chrome the page works perfectly.  A user can enter a projectID and click Go, and the ftp site opens asking for the password.  Any ideas would be greatly appreciated.

 

Here is my php file code:

 

<?php if($_SERVER['REQUEST_METHOD'] == 'POST') : $projectid = $_POST['projectid']; header('Location: ftp://'.$projectid.'@ftp.domain.com'); else:?>

<FORM ACTION="<?php echo $_SERVER['PHP_SELF']; ?>" METHOD="POST">

  <p><strong>Enter Your Project ID</strong> :

    <input type="text" name="projectid" />

    <input type="submit" value="Go" />

  </p>

</form>

<?php endif; ?>

Link to comment
https://forums.phpfreaks.com/topic/200632-linking-to-ftp-site-with-php-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.