Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-05-2009, 11:01 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2009
Posts: 13
Default passing value in php


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
jishnu001 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-05-2009, 11:36 AM   #2 (permalink)
Super Hero - Super Powers
 
n2casey's Avatar
 
Join Date: Sep 2006
Location: Dynamic
Posts: 766
Smile Re: passing value in php

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.
__________________
Minds are like Parachutes :arrow: They work best when open
n2casey is offline  
Old 07-05-2009, 10:43 PM   #3 (permalink)
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: passing value in php

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

PHP Code:
if(strcmp($_GET['event'], 'delete') === 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.
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by gforz
- by soumya

Advertisement




All times are GMT +5.5. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2