type='image'的值如何post到php
Jun 13, 2016 pm 01:26 PM
type='image'的值怎么post到php?
type='image'的值怎么post到php?
最近在做zencart網(wǎng)店系統(tǒng)安裝一個(gè)收藏夾插件遇到一個(gè)奇怪的事情
form底下有2個(gè)按鈕,
一個(gè)是收藏夾按鈕
一個(gè)是購(gòu)物車按鈕
按常理來(lái)說(shuō),2個(gè)按鈕都是提交form使用的,但實(shí)際上按2個(gè)按鈕卻實(shí)現(xiàn)不一樣的功能,確定了沒有js影響。
我做了個(gè)簡(jiǎn)單的實(shí)驗(yàn),看是否能提交圖片按鈕的值,貌似不行,求大師解答,怎么post image的值?
- PHP code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php @$text=$_POST['text']; @$d=$_POST['d']; if($text){echo $text;} if($d){echo $d;} ?>
------解決方案--------------------
echo $_POST['d'];
是作為提交按鈕使用的
所以當(dāng)點(diǎn)擊 時(shí) hello world 不會(huì)被提交
你把php部分寫成 print_r($_POST); 就都清楚了
------解決方案--------------------
name="wishlist"
購(gòu)物車 的可能是貼漏了
總之,不同的 name 做不同的事情
------解決方案--------------------
上傳圖片用:
- HTML code
<input type="file" name="upImg" value="" title="上傳圖片"> <div class="clear"> </div>

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The usage of the Type keyword in Go includes defining new type aliases or creating new structure types. Detailed introduction: 1. Type alias. Use the "type" keyword to create an alias for an existing type. This alias does not create a new type, but only provides a new name for the existing type. Type aliases can improve code. The readability of the code makes the code clearer; 2. Structure type. Use the "type" keyword to create a new structure type. The structure is a composite type that can be used to define custom types containing multiple fields. etc.

An error occurs when ubuntu mounts a mobile hard disk: mount: unknownfilesystemtype'exfat'. The processing method is as follows: Ubuntu13.10 or install exfat-fuse: sudoapt-getinstallexfat-fuseUbuntu13.04 or below sudoapt-add-repositoryppa:relan/exfatsudoapt-getupdatesudoapt-getinstallfuse- exfatCentOS Linux mount exfat format USB disk error solution to load extfa in CentOS

Python simulates the browser sending post requests importrequests format request.postrequest.post(url,data,json,kwargs)#post request format request.get(url,params,kwargs)#Compared with get request, sending post request parameters are divided into forms ( x-www-form-urlencoded) json (application/json) data parameter supports dictionary format and string format. The dictionary format uses the json.dumps() method to convert the data into a legal json format string. This method requires

1. Java calls post interface 1. Use URLConnection or HttpURLConnection that comes with java. There is no need to download other jar packages. Call URLConnection. If the interface response code is modified by the server, the return message cannot be received. It can only be received when the response code is correct. to return publicstaticStringsendPost(Stringurl,Stringparam){OutputStreamWriterout=null;BufferedReaderin=null;StringBuilderresult=newSt

PHP is a programming language widely used in website development, and page jumps and carrying POST data are common requirements in website development. This article will introduce how to implement PHP page jump and carry POST data, including specific code examples. In PHP, page jumps are generally implemented through the header function. If you need to carry POST data during the jump process, you can do it through the following steps: First, create a page containing a form, where the user fills in the information and clicks the submit button. Acti in the form

PHP is a widely used server-side scripting language that can be used to create interactive and dynamic web applications. When developing PHP applications, we usually need to submit user input data to the server for processing through forms. However, sometimes we need to determine whether form data has been submitted in PHP. This article will introduce how to make such a determination.

實(shí)現(xiàn)如下:server{listen80;listen443ssl;server_namenirvana.test-a.gogen;ssl_certificate/etc/nginx/ssl/nirvana.test-a.gogen.crt;ssl_certificate_key/etc/nginx/ssl/nirvana.test-a.gogen.key;proxy_connect_timeout600;proxy_read_timeout600;proxy_send_timeout600;c

This article will introduce seven ways to get high-quality output using the free BingImageCreator. BingImageCreator (now known as ImageCreator for Microsoft Designer) is one of the great online artificial intelligence art generators. It generates highly realistic visual effects based on user prompts. The more specific, clear, and creative your prompts are, the better the results will be. BingImageCreator has made significant progress in creating high-quality images. It now uses Dall-E3 training mode, showing a higher level of detail and realism. However, its ability to consistently produce HD results depends on several factors, including fast
