Jump to content


Photo

how to create reply, delete and forward functions


  • Please log in to reply
1 reply to this topic

#1 crouchjay

crouchjay
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 01 May 2006 - 11:02 PM

I am confused on how to do this. Basicly, how do I create buttons or images that when pressed will do different stuff with the checked boxes. Depending on what the user wants to do. Or is there a tutorial or information I can find on this would also be helpfull. Thanks in advance.

#2 crouchjay

crouchjay
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 02 May 2006 - 09:59 AM

this is my two sets of code snipets. I can get it to work when both are type submits but not as images. How do I go about this? Thank you.

<form action="test3.php" method="post" >
<input type="checkbox" name="languages[]" value="csharp" />C# <br />
<input type="checkbox" name="languages[]" value="jscript" />jscript <br />
<input type="checkbox" name="languages[]" value="perl" />perl <br />
<input type="checkbox" name="languages[]" value="php" />php <br />
<input name="submit" type="image" src="images/submit_btn.gif" />
<input name="delete" type="image" src="images/delete_btn.gif" />
</form>

if(isset($_POST['submit'])) {
echo "You chose the following languages. <br/>";
foreach($_POST['languages'] AS $language) echo "$language<br/>";
}

if(isset($_POST['delete'])) {
echo "has been deleted. <br/>";
foreach($_POST['languages'] AS $language) echo "$language<br/>";
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users