Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Jak podczepic link pod przycisk?
kusiu
post
Post #1





Grupa: Zarejestrowani
Postów: 163
Pomógł: 10
Dołączył: 24.01.2006

Ostrzeżenie: (30%)
XX---


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:

  1. <?php
  2. $theWstawTuPhotoCode='<a href="'.$_SERVER['php.SELF'].'?action=WstawTuPhoto&photoID='.$row["ID"].'">Wstaw tutaj nowe zdj&ecirc;cie</a>';
  3. ?>


i formularz z przyciskiem:

  1. <?php
  2. $inputForm='<tr>
  3. <td><a name="insertPhotoForm"></a><table border=0 cellspacing=0 cellpadding=0><tr onmouseover="java script:style.backgroundColor=''.$roInsertColor.
  4. ''" onmouseout="java script:style.backgroundColor=''.$bgInsertColor.''" bgcolor="'.$bgInsertColor.'">
  5. <td><img src="others/ofertaNieaktywna.gif"></td><td width=5>&nbsp;</td><td width=150 align=center class=plainSmall><br>
  6. <img src="others/emptyPhoto.png" border=1><br>&nbsp;</td>
  7. <td width=5>&nbsp;</td><td>
  8.  
  9. <form action="'.$_SERVER['PHP_SELF'].'#insertPhotoForm" method="post" enctype="multipart/form-data" name="form1">
  10. <table border="0" align="center" cellpadding="1" cellspacing="0">
  11. <tr><td align=left class=plainSmall>
  12. Nowe zdj&ecirc;cie:</td></tr><tr><td align=left>
  13. <input name="imageFile" type="file" id="imageFile" size="20">
  14. </td></tr><tr><td align=left>
  15. <input type=hidden name=imageSent value=yes>'.$putHiddenField.'
  16. <input type="submit" name="Submit" value="  Wy&para;lij  ">
  17. </td></tr>
  18. </table></form>
  19. </td></tr></table></td></tr>';
  20. ?>



Pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 17:57