Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

PHP following a hyperlink

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

PHP following a hyperlink

Postby mccareth » Tue Oct 22, 2002 6:12 am

Hi there,

I'm rather new to php, I know in ASP there is a way to use code to follow a certain link, but is there a way in PHP. What I mean is I want the PHP code to redirect to a certain page accordingly.

I'm sure there is a way to do this, I'm just not finding it. If anyone could help, I'd appreciate it.

Thank you.
mccareth
New php-forum User
New php-forum User
 
Posts: 8
Joined: Wed Oct 02, 2002 6:02 am

Postby DoppyNL » Tue Oct 22, 2002 6:54 am

You're question makes me think that ASP also does stuff client side. I thought that ASP was only server-side (like PHP)?
I don't know ASP, so I might be misunderstanding you..

Anyway, with PHP you create HTML-files wich are sent to the user.
So you van use normal html-links wich the user can click to request another page.

If you're processing a file and you want to run code wich is in another file you can use the function include.

Greetz Daan
DoppyNL
 

More like this....

Postby mccareth » Tue Oct 22, 2002 6:58 am

I think I explained that poorly...

Here's an example.

If the user's machine uses English then direct automatically to the english version of the site.

If the user's machine uses French then direct to that part of the site.

That's not exactly what I'm doing, but this example is easier to explain.
mccareth
New php-forum User
New php-forum User
 
Posts: 8
Joined: Wed Oct 02, 2002 6:02 am

Postby Jay » Tue Oct 22, 2002 7:32 am

How EXACTLY do you do that in ASP? You can only know if the client is british or french from either their Browser details (available to PHP) or from their IP (also available to PHP).

If you want to see what variables you have to play with, use print_r($_SERVER) and it'll output all the variables the server knows of. You can then use this to perhaps achieve the same thing, which I think is what you're asking!
Jay
 


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.