Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,430 members, 7,830,159 topics. Date: Thursday, 16 May 2024 at 05:06 PM

Please Help Me With This Task On Php - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Please Help Me With This Task On Php (369 Views)

Someone Should Assist Me On How To Tackle CSS Task On Freecodecamp / PHP Bootcamp For Beginners (video Tutorials On PHP Programming) / Hosting Python Script On Php Apache Server (2) (3) (4)

(1) (Reply)

Please Help Me With This Task On Php by WallStreetfx(m): 1:28pm On Feb 08, 2023
I want to create a web app in which user will register and login and after that they are gonna fill a form and it is going to print the form after been filled.

I create a database name marcophp on my phpmyadmin.
Inside the marcophp database I have 2 table in which one table handle the register and login and the other Hande the form.
My problem is that when user that have fill the form logout and login again I don't want them to be filling the form again how can I achieve this.??
I want to do it any a way that when the user that have fill the the form login again it should display you have already filled this form. Guru in the house thanks in advance. I'm done with the user interface
Re: Please Help Me With This Task On Php by Nobody: 3:47pm On Feb 08, 2023
WallStreetfx:
I want to create a web app in which user will register and login and after that they are gonna fill a form and it is going to print the form after been filled.

I create a database name marcophp on my phpmyadmin.
Inside the marcophp database I have 2 table in which one table handle the register and login and the other Hande the form.
My problem is that when user that have fill the form logout and login again I don't want them to be filling the form again how can I achieve this.??
I want to do it any a way that when the user that have fill the the form login again it should display you have already filled this form. Guru in the house thanks in advance. I'm done with the user interface


I believe in the user table u should have another entry like

IsFormFilled

To be either true or false


If it's true then the user don't need to fill the form again.

If it's false then it means the user haven't filled the form.


The "IsFormFilled" should be updated to true respective to the user that fills it immediately the form is printed.

Like when the form is submitted u should find the user that submitted it in the database and update IsFormFilled to true.


U can also do this in LocalStorage in the frontend.

If the user submits the form u want to hide then just create LocalStorage variable and set to true.

Only display the form if the LocalStorage value is false or undefined

If it's defined then u can conditionally switch the <form> to a <div> that says "you already filled this form"

I'm not a PHP dev:
Re: Please Help Me With This Task On Php by nettwrock(m): 4:05pm On Feb 08, 2023
WallStreetfx:
I want to create a web app in which user will register and login and after that they are gonna fill a form and it is going to print the form after been filled.

I create a database name marcophp on my phpmyadmin.
Inside the marcophp database I have 2 table in which one table handle the register and login and the other Hande the form.

You are supposed to the id of the registered user in the table handling form as foreign key, so that when the person submit the form his/her I'd is stored along with the form data.

Now when someone logged in, before you allow them proceed to the form , you check the form table if it has the id of the logged in user if yes, he's registered otherwise let them fill the form.

(1) (Reply)

8 Top Trends In Software Development 2023 / How Can I Loop This Data In Vuejs / Is SaaS Currently The Only Way To Finally Freedom

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 100
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.