I want to send a time.txt by aspUpload (persist) without a form choice.
My code is:
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Up1.asp">
<INPUT multiple TYPE=FILE SIZE=50 NAME="FILE1" id=ARQ accept=".s3dx" onchange="ChangeFile();">
<INPUT TYPE=SUBMIT VALUE="Send Files" id=BT>
</FORM>
But i can to use: FILE = "time.txt"
is it possible?
I never change the file
Related
I have a form to edit, upload and download doc files. The form is like this-
The edit form has many input fields. But I am showing only the file fields.
My questions:
How to download available files ? I was given a base url. The base url is - "http://45..........". And my codes are-
Brd Doc
<input
type="file"
ref="softCopy1"
v-on:change="softCopyAttach1"
/>Download<br /><br>
<label for="">Sow Doc</label>
<input
type="file"
ref="softCopy2"
v-on:change="softCopyAttach2"
/>Download<br /><br>
<label for="">Srs Doc</label>
<input
type="file"
ref="softCopy3"
v-on:change="softCopyAttach3"
/>Download<br /><br>
<label for="">Uat Doc</label>
<input
type="file"
ref="softCopy4"
v-on:change="softCopyAttach4"
/>Download<br /><br>
<label for="">Technical Soln</label>
<input
type="file"
ref="softCopy5"
v-on:change="softCopyAttach5"
/>Download<br /><br>
<label for="">Finan break</label>
<input
type="file"
ref="softCopy6"
v-on:change="softCopyAttach6"
/>Download<br /><br>
<label for="">Final finan</label>
<input
type="file"
ref="softCopy7"
v-on:change="softCopyAttach7"
/>Download<br /><br>
</div>
I have included anchor link to get files from backend. So what to write inside to download the file?
Here is a pic of the datas that I am getting from backend using api-
The file keys are- brd_doc, sow_doc and so on.....
My second question is suppose I have inserted a file during create new in key brd_doc. After insertion, when I will edit, I have inserted another file in key sow_doc and kept brd_doc empty. Now the file which I had uploaded during create new in key brd_doc gets deleted. But I want to keep it. How can I do this ?
In my website i have a contact form, and i've integrated it with a Google form. I've added the google form's execute URL as the action URL so once its submitted the form is being populated with the form data. the way i have done it
But when its being submitted, its redirecting to a google form's response page. What i need is once its submitted, to stay on the same page and give an alert. Im not sure how to do this in vue js. Any suggestion will be appreciated.
the content on the redirected page
{"result":"success","data":"{\"name\":[\"sdvsdv\"],\"company\":[\"dsvdv\"]}"}
Form in vue js view
<form method="POST" id="appointment-form" action="https://script.google.com/macros/s/AKfycbzRHvjfmIZdwKnOm26PeFv64OyyyGAfcr68MxvYw/exec">
<div class="form-group">
<input type="text" placeholder="Your name" name="name" class="form-control" id="name" required>
</div>
<div class="form-group">
<input type="text" placeholder="Company name" name="company" class="form-control" id="company" required>
</div>
<buttontype="submit" class="btn btn-default btn-block form-submit-btn">Submit</button>
</form>
After read your code properly, i found many errors.
How are you saving input values?
To save, you have to use ```v-model directive````
I guess you save the input values in somewhere. To avoid your problem, you can add a method and call it on submit, and inside the method save your input values.
I am trying to create a form whereby I can select multiple files (they will be pdfs) and insert the file and the file's name into the database.
Html form works beautifully:
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple/>
<input type="submit"/>
</form>
But I can't seem to make the php work with it:
if(isset($_POST['files[]'])){
$file_name = $_POST['files[]']['name'];
$file_size =$_POST['files[]']['size'];
$file_type=$_POST['files[]']['type'];}
$query="INSERT INTO upload_data (`FILE_NAME`,`FILE_SIZE`,`FILE_TYPE`) VALUES('$file_name','$file_size','$file_type'); ";
I also don't know how to insert the actual file, as opposed to just its properties. Any ideas?
UPDATE:
I got how to upload multiple files, and also multiple file names, but I cannot do both at the same time. Still need help. The code is:
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<input type="file" name="files[]" multiple/>
<input type="submit"/>
</form>
if(isset($_FILES['files'])){
foreach ($_FILES['files']['name'] as $filename) {
$query=mysql_query("INSERT INTO practice (name) VALUES('$filename')", $c) or die("six");
}
}
and
if(isset($_FILES['files'])){
foreach ($_FILES['files'] as $file) {
$query=mysql_query("INSERT INTO practice (file) VALUES('$file')", $c) or die("six");
}
}
To get information about uploaded files, you need to use the $_FILES variable instead of the $_POST variable : http://www.php.net/manual/en/features.file-upload.post-method.php
I have a form with an option to upload and process a spreadsheet.
<form method="post" action="">
<input type="file" name="myFile" />
<input type="submit" name="process" value="Process File" />
</form>
On post, I want to read the spreadsheet using a cfspreadsheet action="read". Is there any way to read the spreadsheet directly from the form field, or do I have to upload it first using cffile action="upload" and then read it from the new file location?
Using the following code reads the file directly from the form field / temp folder:
<cfspreadsheet action="read" src="#form.myFile#" sheet="1" />
Well i have this search engine into my site
<form action="/apps/search/" name="g_search" id="cse-search-box" method="post">
<input type="hidden" name="cof" value="FORID:11;NB:1" />
<input type="hidden" name="ie" value="utf-8" />
<input type="text" autocomplete="off" name="google_seach" class="search-text" onfocus="searchtext('focus')" onblur="searchtext('blur')" />
<label style="color:#796b6b;float:left;padding:0;">|</label>
<input type="submit" style="float:right;margin-top:3px;cursor:pointer;width:16px;height:16px;background:url(/template/img/main/search-icon.jpg);border:none;" value="" alt="Αναζήτηση" title="Αναζήτηση" />
</form>
Now i want some code to results page.Somehow the post request readed from a file called search.php
This file have access to $_POST[] array..
The file initializes $selector variable (for template use).
What we want to echo into contentarea div must put into $body variable..
Any help?
<?php
$selector="search";
$body="<div id=\"cse-search-form\" style=\"width: 100%;\">Loading</div>";
?>
I have a similar issue, just use GCS code provide by Google as it easy, make sure in the option in GSE you select to visualize the search result on your page and not an Iframe