Jump to content

retain values after submit - Drupal, Php


weejay

Recommended Posts

Hello,

 

I have a form in drupal which after the user submits must be stored in a mysql db and the form values must be retained in the form. How do I do that? I have code to store it in DB but not sure how to retain the values. any help is greatly appreciated.

 

Thanks

 

Link to comment
Share on other sites

What do you mean "retaining the values on the page", so you can edit them later, or in case the user refreshes the page accidentally? If the information is stored in the database already, it's just as simple as connecting to the database and retrieving the values directly.

Link to comment
Share on other sites

I saw how to make a form sticky but they are not working in my case. What I am doing is I have a save button which when clicked calls a php page, which saves the data to the db and am using php header section to redirect it to the same page. When I redirect, the data vanishes. I am not sure if I am doing anything wrong. How to make it work in this case?

 

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.