If you do not select an image, the foreground PHP will be output.
For ($ I = 1; $ I <10; $ I ++)
{
$ J = $ I + 1;
$ K = $ I + 5;
Echo'
Enter the image '. $ j.' (size: 394px * 296px)
'. $ Row ['tupiandetail'. $ I].'
';
}
Backend PHP
For ($ I = 1; $ I <10; $ I ++)
{
$ J = $ I + 1;
$ K = $ I + 5;
If ($ _ FILES ["file '. $ I.'"] ["error"]> 0)
{
Echo 'no image selected '. $ j;
$ {"Iii". $ I }=$ _ POST ['detail'. $ k];
}
Else
{
If (file_exists ("images/". $ _ FILES ["file '. $ I.'"] ["name"])
{
Echo $ _ FILES ["file '. $ I.'"] ["name"]. 'image filename '. $ j.' already exists. Please change filename ';
$ {"Iii". $ I} = '';
}
Else
{
Move_uploaded_file ($ _ FILES ["file '. $ I.'"] ["tmp_name"],
"Images/". $ _ FILES ["file '. $ I.'"] ["name"]);
Echo "Stored in:". "images/". $ _ FILES ["file '. $ I.'"] ["name"];
$ {"Iii". $ I} = 'Images/'. $ _ FILES ["file'. $ I. '"] ["name"];
}
}
}
Why do I not select images when I click submit? echo is not output. no image is selected. $ j;
Reply to discussion (solution)
The form tag is not displayed.
It is recommended that you standardize the content. if the content is code, you can use the code block symbol to edit it so that others can understand your code more quickly and better.
I have too many codes ..