Jump to content

Recommended Posts

Im making a application but many users can access it at the same time, also the data that needs to be stored into the database in 3 parts firstly the user will enter some details the comany will fill out the reamining details and the user will then accept or decline the companies proposal. The issue im havign will it be easier to just store all of this information into session variables and then save them into the database at the end when all of the details are ready ?

 

Thank You

Link to comment
https://forums.phpfreaks.com/topic/254487-storing-data/
Share on other sites

Excuse me im relatively new to PHP:( but would i look to then say store the enteries directly into the database and extract the ID for that row of information then on the companies side sql statment saying enter these details into these attributes with this ID ( for the correct column)?

 

Thanx

Link to comment
https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304875
Share on other sites

Something like that yeah. It's hard to tell exactly what your doing but the process might be something like:

 

1) User fills in form and submits data.

2) A unique link (relating to the user submitted data) is emailed to company.

3) Company clicks link and fills in form.

4) A unique link is emailed to user (relating to the company submitted data)

5) User clicks link and accepts / rejects.

 

Obviously, you could replace the email part with some other form of messaging (maybe built into the site itself).

Link to comment
https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304880
Share on other sites

I can;t see how sessions can work for this either. Since the company need to respond, presumably at a later date and from different computers.

 

Probably best to store each stage as and when it happens and maybe add a field on each record with a flag for status - i.e. "awaiting company response", "awaiting user confirmation" so you can run a check to see the status of the record.

 

 

 

Im making a application but many users can access it at the same time, also the data that needs to be stored into the database in 3 parts firstly the user will enter some details the comany will fill out the reamining details and the user will then accept or decline the companies proposal. The issue im havign will it be easier to just store all of this information into session variables and then save them into the database at the end when all of the details are ready ?

 

Thank You

Link to comment
https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304882
Share on other sites

Yes. Just check if the variable is empty and if so then set it to be NULL. But make sure you use double quotes or it will end up being inserted as the literal 'null' rather than null (without quotes).

 

 

 

Ok i seem to be having difficulties  if i dont want to enter data into a field in a mysql table do i juts put NULL in the sql query ?

Link to comment
https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304948
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.