Avatar of NoelKent
NoelKent

asked on 

Pre-fill HTML form information

I have a page on my website that lists people in my office.  When they click on a link , it takes them to a form to fill in their contact info so that particular sales rep can get back in touch with them.  

The problem I have:  
How do I take that Saleperson's name from the page with the link, and when that next page containing the form pulls up have it automatically filled in on the form?

I'm willing to look at all options here, my server resources include cgi, java, jsp, php.

Thanks in advance!
Web Languages and Standards

Avatar of undefined
Last Comment
frugle
Avatar of Andy
Andy
Flag of United Kingdom of Great Britain and Northern Ireland image

Does each person have a link of their own? If so just make the link...

yourpage.php?name=theirname

And then retrieve ot on the next page with...

$name = $_GET['name'];

If they don't have a link each why not make a form with a dropdown menu with all the names in as both text and value. When the form is submitted you can get the values on the next page like this...

$name = $_POST['name_of_dropdown_menu'];

ASKER CERTIFIED SOLUTION
Avatar of frugle
frugle

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Web Languages and Standards
Web Languages and Standards

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.

40K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo