PHP two form value transfer related questions, ask the great God advice

Source: Internet
Author: User
PHP two form value transfer problem, ask the great God advice
I wrote two forms on a single page.




After uploading the file, I'm going to fill in another form with other data and write to the database, but I just can't get the first form to upload the picture name, how to do it
------to solve the idea----------------------
Consider writing a form
------to solve the idea----------------------
The second form doesn't have a file name, and of course it doesn't.
In the case of a two-time body, cache the server.
------to solve the idea----------------------
The second form does not have a This file upload box, of course there is no value. You can save it with a variable and insert it.

$f _name = $_files[upfile][name];

if (Isset ($_post[product])) {

$db->query ("INSERT into ' p_product ' (' pid ', ' Locate ', ' name '").
"VALUES (NULL, ' $f _name', ' $_post[name] ');
$db->get_admin_msg ("img.php", "add success");
  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.