PHP Classes

Open form addnew or edit

Recommend this page to a friend!

      Short Code CRUD  >  All threads  >  Open form addnew or edit  >  (Un) Subscribe thread alerts  
Subject:Open form addnew or edit
Summary:Open form
Messages:3
Author:Ivan Fernandes
Date:2015-09-24 12:37:31
 

  1. Open form addnew or edit   Reply   Report abuse  
Picture of Ivan Fernandes Ivan Fernandes - 2015-09-24 12:37:31
How do I Open addnew OR edit form with a button ? Example : <button> Add new </ button > .

  2. Re: Open form addnew or edit   Reply   Report abuse  
Picture of Bharat Parmar Bharat Parmar - 2015-09-24 13:08:30 - In reply to message 1 from Ivan Fernandes

You can use the below code for the same :

Option : 1
<button onclick="window.location='user.php?action=addnew'">Add New </button>
and
<button onclick="window.location='user.php?action=edit&id=1'">Edit </button>

Option : 2
<a href="user.php?action=addnew"><button >Add New </button></a>
and
<a href="user.php?action=edit&id=1"><button>Edit </button></a>

  3. Re: Open form addnew or edit   Reply   Report abuse  
Picture of Ivan Fernandes Ivan Fernandes - 2015-09-24 14:20:29 - In reply to message 2 from Bharat Parmar
Tanks!

 
For more information send a message to info at phpclasses dot org.