link to a page that will auto complete a field

Posted on 2007-04-06
Last Modified: 2012-05-05
I don’t know how to create a link that will go to page that I specify and auto complete one field in a form. The page where the form is located is the field is the promo code. I tried to search for the answer here but could not find anything that I could use.
Question by:cstans
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Author Comment

ID: 18867305
Please note that I will give more points if i see that it is not as simple as i looks.
LVL 28

Expert Comment

ID: 18867312
Is it your page or is it somebody else page? I mean do you have access to the code on this page.
LVL 50

Accepted Solution

Steve Bink earned 125 total points
ID: 18867655
You would have to use a server-side language to detect the variable.  In a PHP example, I could use this link on a web-page:

On my server, in a file called use-promo-code.php:

$code = $_GET['code'];
<form action="formhandler.php" method="post">
<input type="textbox" name="code" value="<?=$code;?>">
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 18875658
Yes Gamebits, I do have access to the form page.

Author Comment

ID: 18882068
Hi routinet,
I never did php. Do i just open a notepad and do the code you gave me and save with an php extension?
LVL 50

Expert Comment

by:Steve Bink
ID: 18884435
If you have PHP properly installed and configured, yes.  Ask your host about PHP on your web servers.


Author Comment

ID: 18884586
Thanks for your help. I will close this since my company did not authorize to use this feature, but i will keep this is mind and try sometime soon.
LVL 50

Expert Comment

by:Steve Bink
ID: 18886968
You might want to look into CGI (Perl).  Most host companies allow some kind of scripting and chances are you can do this.  PHP is only one possibility.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question