2 Replies - 499 Views - Last Post: 12 February 2010 - 11:07 PM

#1 fig79  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 75
  • Joined: 25-February 09

Button?

Posted 09 February 2010 - 07:57 AM

1. <a href="delete_subject.php?subj=<?php echo urlencode($sel_subject['id']); ?>" onclick="return confirm('Are you sure to delete ?')" </a>
I want to use <input type="button"> instead <a href>, how to do that?

2.
<form action="items.php" method="post">
<input type="submit" value="Submit">
<input type="buttom" value="Cancel"> ?????
</form>

my question, if I press Cancel button, it will direct me to index.php, how to do that?

This post has been edited by fig79: 09 February 2010 - 08:22 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Button?

#2 calebjonasson  Icon User is offline

  • $bert = new DragonUnicorn(); $bert->rawr();
  • member icon

Reputation: 198
  • View blog
  • Posts: 973
  • Joined: 28-February 09

Re: Button?

Posted 09 February 2010 - 11:01 AM

If you want to press a cancel button and send it to the index you will need to create a button first. Send the post to a php script. In this script you will have a little header location line of code that will redirect the user.
Was This Post Helpful? 0
  • +
  • -

#3 jessicalegner  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 66
  • Joined: 05-June 09

Re: Button?

Posted 12 February 2010 - 11:07 PM

I am not sure if this is totally correct, but you could do this....
<form action="items.php" method="post">
<input type="submit" value="Submit">
</form>
<form method="link" action="index.php">
<input type="buttom" value="Cancel">
</form>


If this isn't exactly how you want it to look...
I think that your main question was how to link a button back to a php script. using <form method="link"> should do the trick!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1