passing value in php

Not open for further replies.


Broken In
is it possible to pass value from aform to the same page .for example i have to delete a record .suppose i have a page delete.php which have option to delete a user from a list of users.upon selecing a user and clicking the submit i have been redirected to anotherpage suppose aftdelete.php where i have written code for deleting the user corresponding to the value that is passed from the form of delete.php.My qn is is it posiible do the process in the same delete.php without going to aftdelete.php.That is after clicking the button i dont want to go to anoher page i just want to be in the same page and do the delete is it possible


Super Hero - Super Powers
Well I don't have much idea in PHP but as I think, u can use query string for this.
Something like on submission of delete.php, redirect to the same page & pass the query string like
and then in form load u can check the query string & call the delete function as required.


Wise Old Owl
yeah do as n2casey said, and write a if conditional like this -

if(strcmp($_GET['event'], 'delete') === 0 and !empty($_GET['usertodelete'])) {

// .. rest of processing


I suggest you use Zend Framework (

It makes PHP programming easy. You don't need to write common things like Db driver, path manipulator, etc.

You just code the App Logic.
Not open for further replies.
Top Bottom