The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> I want to use the php_uploads folder
Adamharo
post May 1 2008, 09:24 PM
Post #1





Group: Members
Posts: 1
Joined: 1-May 08
Member No.: 5,557



So I decided I wanted to let people upload to my site and its just been a mess. this it my code for the page. any ideas? im new to all this BTW.


</head>

<body>
<!-- start wrapper -->
<div id="wrapper">
<!-- start banner -->
<div id="banner">www.BBD.com</div>
<div id="leftcol"> <!-- start nav -->
<div id="nav">
<ul>
<li><a href="index.html">home</a></li
>
<li><a href="projects.html">projects</a></li
>

<li><a href="info.html">info</a></li
>
<li><a href="upload.html" class="youarehere">upload</a></li
>
</ul>
<!-- end nav -->
</div>
<!-- left col -->
</div>

<!-- start content -->
<div id="content">
<!-- Begin the top content container class div -->

<div class="container">

<h2>Upload Necessary Files Here</h2>
<form method="post" enctype="multipart/form-data" onSubmit="callMe()" name="myForm">

<input type="hidden" name="pageid" value="445789">

<script LANGUAGE="JavaScript">
<!-- Begin
function fileCheck()
{
if
(document.myForm.yourFile.value == '')
document.myForm.uploadFile.value = 0;
else
document.myForm.uploadFile.value = 1;
}
// End -->
</script>

<input type="hidden" name="uploadFile" value="0">


<table>

<tr>
<td><font face="verdana,helvetica" size=1>Browse for File</font></td>
<td><input type="file" name="yourFile" size="30" maxlength="255"></td>
</tr>

<tr>
<td><font face="verdana,helvetica" size=1>Your Name</font></td>
<td><input type="text" name="yourName" size="30" maxlength="50"></td>
</tr>

<tr>
<td><font face="verdana,helvetica" size=1>File info</font></td>
<td><input type="text" name="yourFileInfo" size="40" maxlength="200"></td>
</tr>

<tr>
<td>&nbsp;</td>
<td><input name="mySubmit" type="Submit" class="youarehere" value="Upload"></td>
</tr>

<script>
function callMe()
{
fileCheck();
document.myForm.mySubmit.value = "Please Wait...";
document.myForm.mySubmit.disabled = true;
}
</script>


</table>

</form>
<p><!-- End the top content container div -->
</p>
</div>
<!-- end content -->
</div>
<div id="footer">
<p>graphic design &amp; image consulting</p>
</div>
<!-- end wrapper -->
</div>
</body>
</html>


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies(1 - 2)
pandy
post May 1 2008, 10:24 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You can't do file upload with JS. You need a script on the server.
http://htmlhelp.com/faq/html/forms.html#form-howto
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post May 2 2008, 01:44 AM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How can I allow file uploads to my web site?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 10:34 AM