folder predicament

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tommy1987
Forum Commoner
Posts: 92
Joined: Tue Feb 21, 2006 8:35 pm

folder predicament

Post 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?
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Maybe mod_rewrite and some PHP logic to direct it to the correct page?
tommy1987
Forum Commoner
Posts: 92
Joined: Tue Feb 21, 2006 8:35 pm

Post 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!
Post Reply