Two functions together

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zed420
Forum Commoner
Posts: 32
Joined: Wed Jun 04, 2008 11:24 am

Two functions together

Post by zed420 »

Hi All

I like to create two functions on a same file and run them. I've got a file where I've run a select query so there are list of results. I would like to create two functions Delete and Edit on a same page, I have been trying but failing miserably, could anyone guide to right direction please.

Thanks
Zed
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Two functions together

Post by aceconcepts »

Code: Select all

 
delete($id_from_query_results);
 
edit($id_from_query_results);
 
function delete($id)
{
  //delete something
}
 
function edit($id)
{
  //edit something
}
 
Post Reply