spearchilduser Posted January 6, 2012 Share Posted January 6, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/ Share on other sites More sharing options...
trq Posted January 6, 2012 Share Posted January 6, 2012 Sessions are unique to a particular user, so going on your description, they won't suite your needs at all. Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304872 Share on other sites More sharing options...
spearchilduser Posted January 6, 2012 Author Share Posted January 6, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304875 Share on other sites More sharing options...
trq Posted January 6, 2012 Share Posted January 6, 2012 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). Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304880 Share on other sites More sharing options...
Drongo_III Posted January 6, 2012 Share Posted January 6, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304882 Share on other sites More sharing options...
spearchilduser Posted January 6, 2012 Author Share Posted January 6, 2012 Ok cool thanx for the replies i know how im guna attempt it now CHEERS Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304886 Share on other sites More sharing options...
spearchilduser Posted January 6, 2012 Author Share Posted January 6, 2012 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304895 Share on other sites More sharing options...
Drongo_III Posted January 6, 2012 Share Posted January 6, 2012 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304948 Share on other sites More sharing options...
Pikachu2000 Posted January 6, 2012 Share Posted January 6, 2012 Actually, NULL in any quotes is a string, not a NULL value. Quote Link to comment https://forums.phpfreaks.com/topic/254487-storing-data/#findComment-1304953 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.