No action, no enctype, solution to form submission data
Source: Internet
Author: User
No action for form submission data. no enctype. image to be submitted & nbsp; csv file upload & nbsp; the form contains only id & nbsp; very name & nbsp; can this enable file upload. You cannot use submit & nbsp; to submit data using a form. no action, no enctype.
If you want to submit an upload form for an image csv file, can you upload the file only with the id and name. You cannot use submit. you can only use button js for submission.
// Can it be implemented?
------ Solution --------------------
Directly use js to assign the action attribute and then submit it!
------ Solution --------------------
What do you mean ???
------ Solution --------------------
Remote submission is supported.
A. php sending page
// Submit data remotely $ data (login not required)
Function func_DataPost ($ strSumbitPage, $ data, $ Ref_url = "", $ strUserAgent = "", $ arrHttpHeader = "", $ cookie_jar = "") // submit data remotely $ data (login not required)
{
// $ Data = array (
// "File1" => "@ C :\\ wbiaoarticle \ 13575672507.jpg ",
// "Te_Name" => time (),
// "Te_password" => "AB -- __==##% ^ cdziy!> <",
// "Su_deal" => "start processing ",
//);
$ StrUserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 ";
// $ ArrHttpHeader = array ('x-FORWARDED-FOR: 8.8.8.8 ', 'client-IP: 192.168.8.8'); // Construct an IP address
If (! Is_file ($ cookie_jar ))
{
$ Cookie_jar = dirname (_ file _). "\ cookie_mytem.txt ";
If (is_file ($ cookie_jar ))
Unlink ($ cookie_jar); // clear the cookie first
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service