Page 1 of 1

folder predicament

Posted: Mon Oct 30, 2006 3:59 pm
by tommy1987
This isnt strictly a PHP problem but I know you guys will know what I am asking..

I have some folders e.g. Art, Technology. I want to make it so that user can type mywebsite.com/art and mywebsite.com/Art and they both go to the same place

how is this done?

Posted: Mon Oct 30, 2006 4:07 pm
by aaronhall
Maybe mod_rewrite and some PHP logic to direct it to the correct page?

Posted: Mon Oct 30, 2006 5:55 pm
by tommy1987
In PHP varialbes can be echoed to produce some output, can something similar be done in javascript, I have the following:

Code: Select all

		function update() {
			//Update category and question when the mouse moves
			var strQuestion = document.form1.question.value
			var strCategory = document.form1.category.value
		}
I want to then do the equivalent of:
<?=$strQuestion?>


Is this possible? - To put this into context, I am making a live updating site which when the update function is called every second, the current values are loaded from the text boxes into the variables, and then printed into a preview somewhere else on the page.

I am new to this kind of thing so please go easy on me and if there is a better way of doing this please say!