quickfire84 Posted May 8, 2009 Share Posted May 8, 2009 Im trying to make php forms that instert customers orders into a database each form with its own table but when they submit the first form, they are assigned a customer id number, when they come back to fill out other form they enter their id number and when submit it it enter it into the table and so i can pull each customer id up a review what they need and set there order status NEW, IN PROGRESS, or COMPLETED, i amy ok with php right now my first form sends me the submitted results and a auto respons to the customer. Can anyone Help me a little on how to do this?? Quote Link to comment Share on other sites More sharing options...
timt Posted May 9, 2009 Share Posted May 9, 2009 Ok. Where do you want to start? Quote Link to comment Share on other sites More sharing options...
quickfire84 Posted May 9, 2009 Author Share Posted May 9, 2009 Umm where ever is the best place, my form is already made one of them just not to post into a db, so where would be good to start, since im quite new to db's Quote Link to comment Share on other sites More sharing options...
timt Posted May 9, 2009 Share Posted May 9, 2009 If you are going use mysql, then reference the manual for the correct syntax: http://us.php.net/manual/en/ref.mysql.php If you are not familar, then go read a tutorial. There are plenty on the web. Quote Link to comment Share on other sites More sharing options...
quickfire84 Posted May 9, 2009 Author Share Posted May 9, 2009 ok just one question if i make the id in the table can i make it customerid or customer_id then make it the primary_key or does it have to be just id? Quote Link to comment Share on other sites More sharing options...
eRott Posted May 9, 2009 Share Posted May 9, 2009 ok just one question if i make the id in the table can i make it customerid or customer_id then make it the primary_key or does it have to be just id? You don't need an id field. Mind you, it wouldn't make sense not to have one as it's a very effective method on organizing and manipulating the information stored in the database. But to directly answer your question, yes, you may name the field whatever you like. So both customerid and customer_id would work. I would just simply go with id though. Quicker to type, easier to remember and helps to shorten the length of your code wherever you may use it. Quote Link to comment 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.