خوب توی صفحه که action میشه ببین اگه submit فرم اولی رخ داده کارهای مربوط به فرم اول را انجام بده و اگر submit مربوط به فرم دوم رخ داده تصاویر را بارگذاری کن.
<form name="mailinglist" method="post">
<input type="text" name="email" />
<input type="submit" name="mailing-submit" value="Join Our Mailing List" />
</form>
<form name="contactus" method="post">
<input type="text" name="email" />
<input type="text" name="subjet" />
<textarea name="message"></textarea>
<input type="submit" name="contact-submit" value="Send Email" />
</form>
<?php
if (!empty($_POST['mailing-submit'])) {
//do something here;
}
if (!empty($_POST['contact-submit'])) {
//do something here;
}
?>