srinivas6203 Posted August 7, 2008 Share Posted August 7, 2008 Hi all I am doing a website. when user edit his account total details are stored into the database. Then he click "apply changes" link, a .conf file will be generated with his total details fetching the values from database. Total these task working fine. But management asking as "When user edit his account then only 'apply changes' link will be come. The link will be there until he click that link. If he click that link .conf file will be generated with his modified details. otherwise the link will be there until he click that. any idea pls thanq Quote Link to comment Share on other sites More sharing options...
0siris Posted August 7, 2008 Share Posted August 7, 2008 so you only want the link active once user has changed any value? I think that would be a java thing, rather than php Quote Link to comment Share on other sites More sharing options...
deadlyp99 Posted August 7, 2008 Share Posted August 7, 2008 use some javascript along with php on the file. When the page loads with all the users content, pass the php variables that print the text in the form to javascript. Then have javascript compare the form's text fields to the ones it started with. Using enviroment changes like keypress, let it wait like 2 seconds with no other changes, then pop up a javascript submit yes/no box, and if yes it will do the post command the old one would do when submitted. Quote Link to comment Share on other sites More sharing options...
srinivas6203 Posted August 7, 2008 Author Share Posted August 7, 2008 Thanx for ur reply. Can u send me sample scripts. Quote Link to comment Share on other sites More sharing options...
deadlyp99 Posted August 7, 2008 Share Posted August 7, 2008 Its kind of a bit of a workload for that. But since this is obviously some type of job, I won't just hand it to you. Go and read some tutorials about user input and javascript. You will get a LOT more out this if you learn to do it yourself and spend the hours doing so. Now I would be happy to help once you have something started. Take a look at the OnChange event. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.