Home     Articles & Projects     Products & Web Services     Forum

Forum

Forms and PHP

Hi David,
Is it possible to "remember" the last selection in a dropdown form?

  print "<form method='get' action=''>";
  print "<select name='cur' onChange='this.form.submit()'>";

  function parseCurrency($record)
  {
print "<option value='".$record["ID"]."'>".$record["NAME"]."</option>";
  }
  print '</select>';
  print "</form>";

The dropdown form works with the cookie enabled as per the last post but would like it to keep the last selection.
Thanks,
Simon

Passing variables and .htacces Rewrites

Hi David,

I have set up rewrites successfully with .htaccess but would now like to pass additional variables with the url.

In specific I would like the user to be able to select which currency the parsed results will be shown in. Laterooms offer this by adding

cur=USD

to the end of the xml URL. How is this possible when the urls have been rewritten?
http://www.scottishhotels.net/test/scottish-hotel/()/(101191)Grosvenor-Hotel.html?cur=USD
or
http://www.scottishhotels.net/test/scottish-hotels/(16278654)Auchinleck/?cur=USD

Is there a way to do this and also to make the choice "global" so that all the results remain in USD until it is changed?

Thanks,
Simon

n/a

php variables inside javascript

Hi David,

What is the secret to using PHP variables inside Java Script?

I am busy with a google maps API intergration and am struggling to get Geo codes inside the javascript in order to make it generate maps dynamically. Could you perhaps help please?

I have the 3 variable I need which has been parsed with Magic Parser...

$hotelGeoLong
$hotelGeoLat
$hotelName

and trying to get them in here...
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng($hotelGeoLat, $hotelGeoLong), 13);
map.openInfoWindow(map.getCenter(),
               document.createTextNode("$hotelName"));
      }
    }

Thanks,
Simon

RSS Feed

Hi David,

Am trying to read some values from an rss feed using MagicParser without success, do you mind if I send you the feed for a trial ?

thanks,

Robert

.htaccess Rewrites

Hi David,

So pleased you have opened this forum up - I have soooo many questions and am so hungry for knowledge!

I am using Magic parser to build a site from the Laterooms API, all is going well but have a question regarding .htaccess rewrites.
I believe that the best URL's are short and with that in mind I am trying to construct the URL's

How do you pass information in a URL, but not necessarily use all the information in the rewrite. For example....

hotel/".$results["REGION_CODE"]."-".$results["REGION_DESCRIPTION"]."-".$results["TOWN_CODE"]."-".$results["TOWN_DESCRIPTION"]."

The above URL will pass through 4 variables. I know how to rewrite using all 4, but is it possible to use one variable for the rewrite but still pass the others through for use in the script.

RewriteRule ^hotel/(.*)-(.*)-(.*)-(.*).html$ hotel_results.php?region_code=$1&region_description=$2&town_code=$3&town_description=$4 [NC]

I would like the URL to look like this, but still have the other 3 variables available to use. Does this make sense?
RewriteRule ^hotel/(.*).html$ hotel_results.php?town_description=$1 [NC]

Also is it best to end a rewritten URL with / or .html?

Thanks,
Simon

Shopping.com API

Hi David,

I want to create a site that uses Shopping.com API is magic parser helpfull for this type of site ??

Robert

Differentiation of content

Hi David

Nice idea for a site!

Here's a topic that's been on my mind lately and this seems like a good place to raise it...

Until recently I've been a 'content' affiliate, focusing on smaller sites that house long articles, blogs and so on (I took this route mainly because I have a journalism background). So, my aff links have been all manually added text links and banners as they're easy to maintain on small sites.

But I've always felt I'm missing out on the benefits of the long tail that using product feeds bring. Especially with Christmas coming I wanted to be able to spread out with many more pages and really reach out to those long tail searchers. That's why I got into Price Tapestry.

But one concern is the fact that if we all use the same generic product feeds with duplictate descriptions, product names and so on Google 'thinks' "ah...seen this cookie cutter before" and it's a non starter. So I wonder, do you have any tips on differentiation that can help sites that effectively contain duplicate material to stand out in Google's eyes as different and worthy of inclusion.

Cheers

Oliver

here i am again......

Hi david,

I have this xml feed: {link saved}

You have send me some details, i tested it and it works. I like all the info in the feed published on my site and stored in a mysql database.
If there is no NEW news i like the older news (randomly) showed on my site, if possible.

You have already mysql details so let me know if you need anything more please?

regards (cheers),

Chris

Syndicate content