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");