Customer ID

Newb here… I have a form where there are many customers using the same form. How do I include their customer id into the main database when they submit the form without them typing it into a text box?

Are the customers logged in? Do you have any way to personally identify who is filling out the form?

Yes…the customers would be logged in. I’m thinking I would have two databases… one for login which would also have their identifying number,and the other for the data that their forms generate. I was thinking of separate databases per client, but that seems unnecessary. The customer ID that I want to populate the rest of the data from the form is the way that I would identify who’s clients were filling out the form.

You could just have a <input type="hidden" value="<?php echo $custID;?>"> type of thing going on. That would be accessible on the form submission.

Would that place the custID into the new database associating it with the customer information on the rest of the form?

Nope, but you’d have it ready to submit into your database

How do I include their customer id into the main database when they submit the form without them typing it into a text box?

Do you already have a script for submitting database to the form? If so, you just have one more field to add.

I’ll give it a shot. I do have the script for submission. So I’ll give it a variable name and include it in the POST. Is that the idea?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.