Witam.
Jak można podpiąć link pod przycisk submit. To znaczy zeby robil to co submit ( w moim wypadku wysylal zdjecie) ale i dostal sie do funkcji gdzie wysylam argument.
Link wyglada tak:
<?php
$theWstawTuPhotoCode='<a href="'.$_SERVER['php.SELF'].'?action=WstawTuPhoto&photoID='.$row["ID"].'">Wstaw tutaj nowe zdjêcie</a>';
?>
i formularz z przyciskiem:
<?php
$inputForm='<tr>
<td><a name="insertPhotoForm"></a><table border=0 cellspacing=0 cellpadding=0><tr onmouseover="java script:style.backgroundColor=''.$roInsertColor.
''" onmouseout="java script:style.backgroundColor=''.$bgInsertColor.''" bgcolor="'.$bgInsertColor.'">
<td><img src="others/ofertaNieaktywna.gif"></td><td width=5> </td><td width=150 align=center class=plainSmall><br>
<img src="others/emptyPhoto.png" border=1><br> </td>
<td width=5> </td><td>
<form action="'.$_SERVER['PHP_SELF'].'#insertPhotoForm" method="post" enctype="multipart/form-data" name="form1">
<table border="0" align="center" cellpadding="1" cellspacing="0">
<tr><td align=left class=plainSmall>
Nowe zdjêcie:</td></tr><tr><td align=left>
<input name="imageFile" type="file" id="imageFile" size="20">
</td></tr><tr><td align=left>
<input type=hidden name=imageSent value=yes>'.$putHiddenField.'
<input type="submit" name="Submit" value=" Wy¶lij ">
</td></tr>
</table></form>
</td></tr></table></td></tr>';
?>
Pozdrawiam