Hi,
This is my first post so please be gentle..

I am building a site that has 100 or so pages the majority detailing a seperate training course.

I have a contact.php page where visitors can fill in there details as most sites. this then gets sent via a mailer.php page.

On each course page there will be a email us about this course button, which will link to the contact page.

What I would like to do is, on the contact form have an additional field that automatically fills in the details of the course page they have come from.

I am sure this is a fairly simple process, but I am unsure of what this process is called and therefore able to find advice on how to do it.

My php knowledge is very limited.

I hope this makes sense, any help much appreciated.

I can post need snippets of the code if it helps

Thanks
Richard

Recommended Answers

All 2 Replies

Try using $_GET[].
Ex..
say we are on the math training course, so it would be..
<a href="www.something.com/contact.php?course=math">Contact Us</a>

then on the contact form, just use the get function

$course = $_GET;
echo $course;

The only problem with that, is u have to manually add the link to all the pages. let me know if there is something else that you want

Hi fobos,

Thank you very much, it dis exactly was I was after.

Much appreciated
Richard

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.