Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2005, 11:25 AM
WebProWorld Pro
 

Join Date: Apr 2004
Posts: 163
roam_dx RepRank 0
Default Passig parameters in URL - PHP

hi all,

i have no knowledge of PHP coding at all, but have worked many years with HTML, so if anyone can give me ideas on how I can get this done, it would be much appreciated.

My client needs to get a form up on the site for his associates for whom this website generates some leads. The associate company has provided him with the form and given some intructions on how to apply it so that the leads and chat function are tracked correctly.

These are the instructions:


Please dont forget to send parameters when you are calling the page. The parameters sent in the url are used for tracking and data logging purpose.

ex:-


http://www.xyz.com/bankapp/?parnerID...roup=city&keyw
ord=city&channeltype=partner



Now in the form I found these inputs with the instructions below:

<!--
You MUST fill in all hidden fields of the form having 'n/a' with real values
using javascript, JSP, PHP or any other dynamic tools.
-->

so I entered the values in the form,

<input type="hidden" name="channel" value="leadgen">
<input type="hidden" name="camp" value="leadgen">
<input type="hidden" name="keyword" value="city">
<input type="hidden" name="adkey" value="city">
<input type="hidden" name="adgroup" value="city">
<input type="hidden" name="channeltype" value="partner">


I think this looks ok, except I don't know how to do this in PHP - Please dont forget to send parameters when you are calling the page,

Can anyone help! How do I pass parameters in the URL with the submit button, im not posting the form since this is for a client, but if anyone can help I can PM the URL.

thanks
Reply With Quote
  #2 (permalink)  
Old 11-29-2005, 01:04 PM
WebProWorld Member
 

Join Date: Feb 2005
Location: United States
Posts: 111
wsmeyer RepRank 0
Default

Above the <input...> lines there will be a <form...> line that dictates what type of form it is and what it should do. Yours would look something like this:

<form name="form1" method="get" action="url.htm">

The GET method tells it to append the url with the variables, so if you had the hidden inputs you quoted in your post, the submit button would take the user to the url...

http://url.htm?channel=leadgen&camp=...eltype=partner

The simplest type of submitting is just a button which would look like this:

<input type="submit" value="submit" />

where value is the text printed on the button itself.

In general, the whole form needs to have this format:

<form>
<input type="hidden" />
<input type="submit" />
</form>

As for writing it dynamically with PHP, the inputs would look something like this...

<input type="hidden" name="channel" value="<?php print $leadgen; ?>">

but we need to know where these variable are coming from to give more help.

William.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0