faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 3 people (33%) answered Yes
Recently 1 of 3 people (33%) answered Yes


how do i make a var set in the query string available to another file ?? eg to a css

Feb 24th, 2008 19:44
dman, Jeff Kayser, colin xbo, http://www.ttnr.org

just reference the query string variable within the css/html.  try the 
following code as an example -
body {
	background-color:	#<?=$bg?>
<form action='<?=$PHP_SELF?>' method='get'>
Set Page Background Color #<input name='bg' value='<?=$bg?>'>
<input type='submit' value='Change'>