Jump to content

More Directory Help


etourslive

Recommended Posts

File needs to upload to directory without being renamed by $fname i need $ndir to = the mkdir output which is the folder

$uniqueDir = $_POST['mls']; *User Input

mkdir("d:/websites/www.twenterprize.com/upload/".$uniqueDir); *Dir Created

$Ndir = *Directory created by mkdir

$ftmp = $_FILES['image']['tmp_name'];

$oname = $_FILES['image']['name'];

$fname = $Ndir.$_FILES['image']['name']; *File Upload

 

Link to comment
Share on other sites

I think I posted about using move_uploaded_file in one of your other threads.....

 

$pathname = "d:/websites/www.twenterprize.com/upload/";
$uniqueDir = $_POST['mls'];

mkdir($pathname . $uniqueDir);

move_uploaded_file($_FILES['image']['tmp_name'], $pathname . $uniqueDir . $_FILES['image']['name']);

//or as you had it:
$Ndir = $pathname . $uniqueDir;
$ftmp = $_FILES['image']['tmp_name'];
$oname = $_FILES['image']['name'];
$fname = $Ndir.$_FILES['image']['name'];

Link to comment
Share on other sites

ok here is the code you can check it out live at www.twenterprize.com/order3.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>e Tours</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../twenterprize.com/BUTTON.css" rel="stylesheet" type="text/css">

<link href="../twenterprize.com/BUTTON.css" rel="stylesheet" type="text/css">

<link href="style.css" rel="stylesheet" type="text/css">

<link rel="shortcut icon" href="http://twenterprize.com/images/icon.ico">

</head>

 

<body bgcolor="#000000" background="Images/bg-repeat.jpg">

<table width="80%" border="0" align="center">

  <tr>

    <td height="742">

      <table width="772" height="97" border="0" background="images/tpbar.gif">

        <tr>

          <td height="86">

<p> </p>

            <p align="right" class="unnamed1"><br>

              <font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><a href="pricing.php" class="hyperlink">Pricing</a>

              | <a href="sample.php" class="hyperlink">Sample</a> | <a href="order.php" class="hyperlink">Order</a>

              | <a href="contact.php" class="hyperlink">Contact Us</a>       </font><br>

            </p></td>

        </tr>

      </table>

      <table width="772" height="536" border="0" background="Images/centre-top1.jpg">

        <tr>

          <td width="766" height="532" bgcolor="#FFFFFF">

            <div align="center">

              <table width="647" border="0">

                <tr>

                  <td width="316"><font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><strong>Step

                    2...</strong></font></td>

                  <td width="321"><div align="right"><font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><strong>Upload

                      Photos </strong></font></div></td>

                </tr>

              </table>

             

            </div>

            <table width="645" height="635" border="0" align="center">

              <tr>

                <td width="645" height="636" background="images/upload.gif">

                  <table width="611" border="0" align="center">

                    <tr>

                      <td width="319"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Click

                        browse to select photos</font></td>

                      <td width="282"><font color="#FF0000" face="Verdana, Arial, Helvetica, sans-serif">maximum

                        16 photos </font></td>

                    </tr>

                  </table>

                  <table width="614" height="28" border="0" align="center">

                    <tr>

                      <td height="24">

                        <style>

iframe {

border-width: 0px;

height: 60px;

width: 400px;

}

iframe.hidden {

visibility: hidden;

width:0px;

height:0px;

}

 

#main {

overflow: hidden;

margin: auto;

width: 600px;

height: 600px;

border-style: solid;

border-width: 0px;

background-color: ;

}

 

#footer {

margin: auto;

width: 410px;

height: 20px;

border-style: solid;

border-width: 0px;

border-top-width: 0px;

background-color: white;

text-align: center;

font-family: verdana;

font-size: 80%;

}

 

#images {

width: 600px;

margin: 20px;

}

 

#images div {

margin: 10px;

width: 100px;

height: 100px;

border-style: solid;

border-width: 5px;

border-color: #DEDFDE;

float: left;

overflow: hidden;

}

 

#images div:hover {

border-color: #0066FF;

}

 

#images img.load {

margin: 36px;

}

</style>

<div id="main">

<div id="iframe">

<iframe src="upload.php" frameborder="0"></iframe>

</div>

<div id="images">

</td>

                    </tr>

                  </table>

                </td>

              </tr>

            </table> </td>

        </tr>

      </table>

      <table width="772" height="69" border="0" background="Images/btm.gif">

        <tr>

          <td>                   <font color="#0066FF" size="-3" face="Verdana, Arial, Helvetica, sans-serif"><a href="contact.php" class="hyperlink">Contact

            Us</a> | <a href="specialoffer.php" class="hyperlink">Special Offers</a>

            | <a href="home.php" class="hyperlink">Home</a></font></td>

        </tr>

      </table>

      <p> </p>

      </td>

  </tr>

</table>

</body>

</html>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.