Script form problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gr33n
Forum Newbie
Posts: 3
Joined: Sat Mar 27, 2010 1:49 pm

Script form problem

Post by gr33n »

Helllo everybody

I have a wordpress site where I want to insert a zip form in the header and the results to be displayed inside the site.

For a better understanding of what I want check this site below and use any zipcode ex 10014

Code: Select all

www.aveauto.com
I have the code for the form and another one that I have to put in the results page.

Zip form code

Code: Select all

<!-- EXAMPLE ZIP CODE FORM -->
<form action="results.html" method="get" >
Zip Code: <input type="text" name="zipcode" size="10" maxlength="5" /><br />
<input type="submit" name="search" value="Get Quotes" />
</form>
The code for the results page

Code: Select all

<script type="text/javascript">
function getQueryStringVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split('=');
if (pair[0] == variable) {
return pair[1];}}}

ni_ad_client = "178760";
ni_res_id = 2;
ni_alt_url = "https://www.shmktpl.com/search.asp";
ni_zc = getQueryStringVariable('zipcode');
ni_str_state_code = getQueryStringVariable('statecode');
ni_var1 = "";
ni_display_width = 500;
ni_display_height = 1000;
ni_color_border = "";
ni_color_bg = "";
ni_color_link = "";
ni_color_url = "";
ni_color_text = "";
</script>

<script type="text/javascript" src="https://www.shmktpl.com/retrieve_listings.asp"></script>

<noscript><a href="https://www.shmktpl.com/search.asp?src=178760&res=2"><img src="https://www.shmktpl.com/images/nojs/image.asp?src=178760&res=2" border="0"></a></noscript>
I managed to make it working with a html page...but with php is a different story.Can anyone help me to make it work on a worpress site like the site above

I've managed to make the zip form but showing the results is ..complicated for me as I don't know how to use it.I've tried at the site below to make it work..but I can't make the results page to be displayed corectly.

Code: Select all

http://www.lowestcarinsuranceratesonline.com/
User avatar
gr33n
Forum Newbie
Posts: 3
Joined: Sat Mar 27, 2010 1:49 pm

Re: Script form problem

Post by gr33n »

Nothing..I basically want to load the results in the wordpress site..Any kind of help appreciated.thanks
Post Reply