0

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

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by trickslide
0

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

0

Hi fobos,

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

Much appreciated
Richard

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.