Re: $vars to JS in a linked js page.

From: Date: Fri, 30 Mar 2001 06:36:08 +0000
Subject: Re: $vars to JS in a linked js page.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8025@lists.php.net to get a copy of this message
I think your only choices are to put this value into either a database or if you are using php4 - to use a session varible - or use a cookie if you are trying to persist this value across multiple pages for multiple users...or pass as a querystring to the next page.. or as a hidden form variable if processed on the same page...depends.... psj John Starkey wrote: > I've got 2000 pages that are dependent on one include and I don't wanna > alter it too much and I'd like to use some JS in a linked file. I don't > wanna include it in and have it displayed. > > Is there a way to do: > > $some_number = $mysql_num_rows; > > <link lanuguage="JavaScript" type="text/javascript" > src="external.js"> > > And use the $some_number variable in that external.js file? > > I've tried several ideas, to no avail. Like: changing the .js to a .php > and echoing the value, etc. > > Thanks, > > John > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#8025) next »