Jump to content

passing params via url


garry27

Recommended Posts

i'm having problems with a parameter which i'm passing via the url. when it gets passed to a php script via a <script element and i echo it out as a js variable, it messes up the rest of the js variables i'm outputting (they show up as undefined).

 

here's how i'm sending the info to map_data.php. both a and b vars are valid and the function works perfectly. its just the one session crawl_ctrl which is the culprit. it doesn't matter if it's set or not, its still manages to screw up subsequent scripts.

 

 

<?php

...
obtain_crawl_id(); //sets session var for crawlid and optionally for crawl_ctrl

$a = $_SESSION['crawl_ctrl'];
  $b = $_SESSION['crawl_id'];
  
  // see html_fns.php  
  do_html_header('Create Pub Crawl', 'googleApi'
            ,'printLatLng.php?' . $_SERVER['QUERY_STRING'] 
		. '&crawlctrl=' . $a
		. '&crawlid=' . $b 
		,'mapFunctions.js' 
		,'tableFunctions.js');
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/36743-passing-params-via-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.