Ask a Question related to PHP Development, Design and Development.
-
Doug #1
download a file from a form button
I can't get a form coding to recognize a download.php to download a file to
the client. I need the edits of the form for a MySQL table, but the
following form code only wants to download 'download.php' and won't access
download.php so the code can take affect. How can the action item call
download.php?
<form name="form1" method="post" action="download.php"
onSubmit="
MM_validateForm('LastName','','R');MM_validateForm ('email','','NisEmail');
MM_validateForm('email','','R');
MM_validateForm('FirstName','','R');
return document.MM_returnValue">
<p><b><font size="3">First Name:</font></b>
<input type="text" name="FirstName" maxlength="50" size="30">
<font size="3"><b> Last Name:</b></font>
<input type="text" name="LastName" maxlength="50" size="30">
</p>
eMail:
<input type="text" name="email" size="40" maxlength="50">
</b></p>
<input type="submit" value="Download" />
</form>
Doug Guest
-
Not able to view download button
When I am on the download page I can not see the download button or any of the other pictures on the download page. I have uninstalled all sweeper... -
How do I add download behavior to a button?
I apologize for my lack of expertise. I don' t even know if I'm posting in the right area. I want to create a button or hot spot that causes a... -
Download file from movie button
I need to be able to create a button that allows the user to download a file directly from the flash movie. File types would include mp3, jpg and... -
Creating a Download button in Flash?
OK, I do not remember how to get a flash button to download a PDF onrelease. I've looked and tried many things but no success. I would really... -
JavaScript Access to Button in form tags (webcontrol or html button)
Hello, I have a button called LoadBtn, which exists in <form name="Form1" runat=server></form> tags. I then have javascript loaded outside of... -
Alvaro G Vicario #2
Re: download a file from a form button
*** Doug wrote/escribió (Tue, 7 Sep 2004 16:38:04 -0400):
Does your server support PHP?> the following form code only wants to download 'download.php' and won't access
> download.php so the code can take affect. How can the action item call
> download.php?
>
> <form name="form1" method="post" action="download.php"
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Alvaro G Vicario Guest
-
Familie Horsch Nieuws \(Zonnet\) #3
Re: download a file from a form button
The files are loaded in a temp directory:
This is a form to upload files:
<html>
<body>
<H1 ALIGN=CENTER>Upload Web Files</H1><br>
<form action="ftpput.php" method="POST" enctype="multipart/form-data">
<input name="userfile[]" type="file"><br>
<input name="userfile[]" type="file"><br>
<input type="submit" value="Upload">
</form>
</body>
</html>
This is ftpput.php:
<html>
<body>
<H1 ALIGN=CENTER>Upload resultaat</H1><br>
<TABLE>
<TR>
<TD><?php print $_FILES['userfile']['tmp_name'][00]; ?></TD>
<TD><?php print $_FILES['userfile']['name'][00]; ?></TD>
<TD><?php print $_FILES['userfile']['size'][00]; ?></TD>
<TD><?php print $_FILES['userfile']['type'][00]; ?></TD>
<?php copy($_FILES['userfile']['tmp_name'][00],
'...........properties/residential/' . $_FILES['userfile']['name'][00]); ?>
</TR>
<TR>
<TD><?php print $_FILES['userfile']['tmp_name'][01]; ?></TD>
<TD><?php print $_FILES['userfile']['name'][01]; ?></TD>
<TD><?php print $_FILES['userfile']['size'][01]; ?></TD>
<TD><?php print $_FILES['userfile']['type'][01]; ?></TD>
</TR>
<?php copy($_FILES['userfile']['tmp_name'][01],
'...........properties/residential/' . $_FILES['userfile']['name'][01]); ?>
</TABLE>
</body>
</html>
If your webserver has sufficient rights on the directory the copy should
work.
Success.......
"Doug" <fabien@ixpres.com> schreef in bericht
news:413e2730_1@news.vic.com...to> I can't get a form coding to recognize a download.php to download a file> the client. I need the edits of the form for a MySQL table, but the
> following form code only wants to download 'download.php' and won't access
> download.php so the code can take affect. How can the action item call
> download.php?
>
> <form name="form1" method="post" action="download.php"
> onSubmit="
> MM_validateForm('LastName','','R');MM_validateForm ('email','','NisEmail');
> MM_validateForm('email','','R');
> MM_validateForm('FirstName','','R');
> return document.MM_returnValue">
> <p><b><font size="3">First Name:</font></b>
> <input type="text" name="FirstName" maxlength="50" size="30">
> <font size="3"><b> Last Name:</b></font>
> <input type="text" name="LastName" maxlength="50" size="30">
> </p>
> eMail:
> <input type="text" name="email" size="40" maxlength="50">
> </b></p>
> <input type="submit" value="Download" />
> </form>
>
>
>
Familie Horsch Nieuws \(Zonnet\) Guest



Reply With Quote

