Jump to content

I've tried to insert data inside an input's value but the input goes like it is hidden


uumer93
Go to solution Solved by uumer93,

Recommended Posts

  • Solution
23 hours ago, mac_gyver said:

it's not. you don't have a clear definition of what the work-flow/steps are, so you haven't been successful at writing code that does what you want.

the work-flow/steps are -

  1. a user sits down at a computer/device and logs in. this stores the logged in user id in a session variable.
  2. a logged in user can now see and do things that requires a logged in user. this tests/uses the user id in the session variable.
  3. one of the things they can see and do is see/navigate to the formulaire form, fill it in, and submit it. this also tests/uses the user id in the session variable.

the form processing code for each form should be on the same page as the form. this results in the simplest code and the best user experience (you can repopulate the form field values upon an error so that the user doesn't need to keep reentering data over and over.) the way to get the form to submit to the same page it is on is to lever the entire action='...' attribute out of the form tag.

Thank you for your help, I've tested so much tips and the solution was hidded inside the stored user id in SESSION

so what I've did is to change this variable $_SESSION['username'] = $result->action_code; and show it inside my input's value. and it works perfectly I did a lot of tests and it is done.
Thank you guys for all your help. its been a pleasure to learn from you devs. Have a good week ♥ 

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.