September 24, 201015 yr Hi - I just need to know if what I'm currently planning is possible. I have a database of information (currently 120 rows) and it's going to get bigger! One form sends data to the first 120 rows. I now want to add more rows (or create a new table and link the 2?) for another user to add further information. That further information will then (hopefully) be viewed by the first user (following so far?). The areas I'm not sure of is: 1. How to ensure the 2nd user is adding to the correct record. 2. Can I link tables together? Or am I best having a monster database? Many thanks!
September 24, 201015 yr well, will the data from both forms be for everyone? If not then have a second table. Use an index and then link the two with that. If you're just having the one record then index that on something then you can use a lookup of some kind to find that record and add from the second form. PHP may have some sexier ways but the above is the basics lol
September 24, 201015 yr Author well, will the data from both forms be for everyone? If not then have a second table. Use an index and then link the two with that. If you're just having the one record then index that on something then you can use a lookup of some kind to find that record and add from the second form. PHP may have some sexier ways but the above is the basics lol I think at the moment the index is an auto-incremental ID, but they couldn't be used as a reference as they're too simple. Is there any way of the system generating a more complicated id? The data from both forms will be for all parties, but I will be selecting which fields display by the search results. Would you mind....going into more detail with this part? If you're just having the one record then index that on something then you can use a lookup of some kind to find that record and add from the second form.
September 24, 201015 yr well what information are you taking on your form? Is there anything natural you could take from that and make a unique key out of? Well, and as I say, the world of web and PHP may have different ways but you'd use your first form to write the record with what it has then retrieve that record. You may also be able to use a PHP array to store the data from each form then when you're complete actually write the record. Can you tell PHP is not my main database language lol
September 24, 201015 yr Author well what information are you taking on your form? Is there anything natural you could take from that and make a unique key out of? Well, and as I say, the world of web and PHP may have different ways but you'd use your first form to write the record with what it has then retrieve that record. You may also be able to use a PHP array to store the data from each form then when you're complete actually write the record. Can you tell PHP is not my main database language lol Nor is it mine which is why I'm rather stuck! The data collected is predominantly personal details and financial information (not payment details). I collect the current date also. Not sure if you can fashion something out of the name and date?? I'm using this as a bit of an exercise to improve my php/sql. My first stumbling block however, is knowing what's achievable.
September 24, 201015 yr I'm not sure I follow exactly what you want but would this be the same? For example you are an estate agent and you have a blurb about every property, how would you link the blurb to the properties page when they are separate in the database?
September 24, 201015 yr just googled this which may ease things for you http://apptools.com/phptools/multipage.php
September 24, 201015 yr Author I'm not sure I follow exactly what you want but would this be the same? For example you are an estate agent and you have a blurb about every property, how would you link the blurb to the properties page when they are separate in the database? Kind of.....I'll try to explain a bit better. First form: Collects personal details and some financial information If the client indicates an interest in a particular product, the details are sent to a third party. That third party then needs to be able to access a list (I guess) of those people, and to be able to add an update i.e. "Called customer, was interested and we sold her a new car", or "Called Customer, wasn't interested after all"..... The firm that collected the information in the first place, would then like to be able to see what happened to that lead, and ultimately, if they are due any commission (as that would also be listed in the database as added by the third party, or another third party (does that make it a fourth party?!) So - I hope that makes sense. I'm now thinking.....clickable names?? If the third party can see the list of clients - can the names be clickable to go into a new area to add further info? Also - on the same lines of clickable...just found some code to display database info as sortable by having clickable headers. Is it possible to display data from a table i.e. Reference, Name, Service sold" and to be able to click on the name for further information i.e. another table display, but with more information i.e. address and all the updates....?
September 24, 201015 yr Author just googled this which may ease things for you http://apptools.com/phptools/multipage.php Hey Zed - this wasn't what I was after - but VERY useful for the future! So thanks
September 24, 201015 yr Author Sounds like you'll need a relational structure, if you post your current table and explain what you want do a bit better I'll make you table structure. My table is enormous, but more of the data is repetitive i.e. 20 lines of which only one may be used. I looked at dynamically created forms....I decided to leave it for another day! I couldn't even get the tutorial to work! I've posted a few minutes ago what I'm after in a bit more detail which may help. I'm just after knowing what is possible as this is my first proper project requiring php/mysql. If you can still help, I'll gratefully let you!
September 25, 201015 yr As Rallport has said, relational database would be the way to go. What it basically means is that you would have the customers details in one table say for instance name address email and then in another you would have something to link the two tables together. (A foreign key is best to use as if you use something common like a first name, there might be more than one person with that name. Basically to make it simpler, it should be a unique field) http://en.wikipedia.org/wiki/Foreign_key If after you've made the databases interact with each other and need help connecting them in PHP come back here.
Create an account or sign in to comment