Auto-Fill forms on destination page (link)
I've seen this done before on some webpages. There is a link to another page, and when you click on the link, it automatically fills out the forms on the destination page with information.
For example, the site I saw it on linked to a "vote for this site" page on another website, and when you clicked on it, it would automatically put the website's url in a form that asked what site you wanted to nominate. I can't remember the exact syntax.. so if someone could help, that'd be awesome :)
Re: Auto-Fill forms on destination page (link)
Most likely HTTP Post or Get parameters, which are then used by the target page (which would have to use some form of server-side scripting) to fill out the form.
For example if you use the GET method and PHP you could do this with your link:
HTML Code:
<a href="vote.php?name=Fred">Vote for Fred</a>
and on the vote.php page
PHP Code:
Vote for: <input type="text" name="name"><?php echo($_GET['name']); ?></input>
Just a rough example. You'd need server-side scripting for it anyway.
Re: Auto-Fill forms on destination page (link)
Ok, well thanks, that works perfectly :)
One other thing though, how would you fill out more than one (what do you use to seperate the "?whatever=whatever" 's ?)
Re: Auto-Fill forms on destination page (link)
an ampersand &
But in the HTML/XHTML code you will need to represent it using &
so
HTML Code:
<a href="vote.php?first=Fred&second=Ted">Vote #1 Fred, #2 Ted</a>