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

Entry

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 -
---------
<html>
<head>
<style>
body {
	background-color:	#<?=$bg?>
}
</style>
</head>
<body>
<form action='<?=$PHP_SELF?>' method='get'>
Set Page Background Color #<input name='bg' value='<?=$bg?>'>
<br><br>
<input type='submit' value='Change'>
</form>
</body>
</html>