Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Adding a Contact Form Redirecting After a Form Submission

melissa brown
melissa brown
4,670 Points

what if i wanted to give the user and contact form number?

what if i wanted to give the user contact form number? how would i do this?

Gareth Borcherds
Gareth Borcherds
9,372 Points

Can you elaborate a bit on what you're asking?

2 Answers

Gareth Borcherds
Gareth Borcherds
9,372 Points

It'd basically be the same process. The way I would do it is when you process the form and you go to store the resul presumably in a database, I'd enter the record in the database and return the row ID from the insert back to the user.

melissa brown
melissa brown
4,670 Points

for example let say you have a lot of customers sending messages. each time they send a message you want to give that customer a receipt number for their message. it would be the same thing as giving a customer a receipt number for an order that they purchased.