Page 1 of 1

PHP Newbie - Linking Functions

Posted: Mon Nov 20, 2006 7:47 am
by php_leg_end
Ok, this is probably an easy question, but since I'm new to PHP it is slowly deteriorating the mass of my brain.

Scenario
I have a text input box, in which you can enter a user ID. You click 'find user' and this populates a table with this users details. So far pretty straight forward.

What I want, is a set of functions relating to this user, such as a simple button: 'Delete User' (the functionality of which is self explanatory).

Question
I'm having a very difficult time relating these functions to the user displayed in the table. It shouldn't be difficult, but being new to PHP I don't know if I should be calling PHP from a seperate page, where to put my variables, wondering if there's a way to do this without refreshing the page, or if I should be using cookies...there seems to be so many options and my head's full of junk. I'm finding it tough to even get on the right path to the question, never mind the answer.

How would you do it?

In english, please :wink:

Any help, welcome.

Posted: Mon Nov 20, 2006 2:48 pm
by feyd
If you're wanting to perform the action without refreshing the page, that's down to AJAX or a similar vein of umbrella term.

The general idea is to make the button submit the page back to the server with the button detailing what the intended action to be take is, and checkboxes or some other signaling directive that associates users with the action.