DIGIT-ARC read-only archive · snapshot: July 23, 2026

passing value in php

3 posts · originally from https://geek.digit.in/community/threads/passing-value-in-php.114676/

J
jishnu001 Original post #1
May 5, 2009 at 11:01 AM
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 function.how is it possible
n2casey
n2casey #2
May 5, 2009 at 11:36 AM
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
Code:
delete.php?event=delete&usertodelete=xyz
and then in form load u can check the query string & call the delete function as required.
nileshgr
May 7, 2009 at 10:43 PM
yeah do as n2casey said, and write a if conditional like this -

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

// .. rest of processing

}

I suggest you use Zend Framework (framework.zend.com)

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.