...

View Full Version : Bit of code needed to pass a variable to a URL.



pbase
01-17-2009, 11:56 PM
Hi All,

I'm trying to hack my wordpress home page to enable users to enter in a package tracking number and pass it to boxoh.com, an online package tracker.

All I need is a bit of code to pass the number to the URL in the following format:

http://boxoh.com/?t=85642012466&rss=1

where "85642012466" is the number the user enters in.

Any help would be greatly appreciated.

itsallkizza
01-18-2009, 12:38 AM
A simple form, method="get", will do that for you:


<form action="http://boxoh.com/" method="get">
<input type="hidden" name="rss" value="1" />
<input type="text" name="t" /><br />
<input type="submit" value="submit" />
</form>

No Javascript is needed unless you want to validate.

pbase
01-18-2009, 12:51 AM
and this will result in a URL formatted thusly?

http://boxoh.com/?t=85642012466&rss=1

pbase
01-18-2009, 07:53 AM
That worked. Much thanks, itsallkizza.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum