php help

Associate
Joined
1 Mar 2006
Posts
425
im trying to make links like this

www.example.com/index.php?page=Example_page

im trying code like the below in the PHP File

Code:
<?php
 $Example_Page = "http://www.example.com/example2.htm";} 
?>

and this is the html

Code:
<html>
<a href="http://www.example.com/?page=Example_Page">click</a>
</html>
from clicking

www.example.com/index.php?page=Example_page

want to be able to go to

www.example.com/example2.htm

this doesnt work what am i doing wrong

hope this makes sense

any help would be nice

thanks
 
Warning: key() [function.key]: Passed variable is not an array or object in /home2/denbyuk/public_html/example.php on line 2
 
tryed chaning it to

foreach ($_GET as $param => $value) {
printf('<param name="%s" value="%s" /><br>',$param,$value);
}
but it still stayed on the same line but included <br> :P
 
argh found a problem

im using this php to send params to an activex control

its a basic chat.ocx

but when i use links like this

index.php?server=gggg

it only printf's the param names and overrides the html from showing/loading..

when i run plain index.php the chat works but has no params.

code

Code:
<html>
 </object>
<OBJECT ID="ChatFrame"
CLASSID="CLSID:982E01D9-0386-441C-B151-83035135A918"
CODEBASE="CHAT.ocx">

foreach ($_GET as $param => $value) {

printf('<PARAM NAME="%s" value="%s">%s',$param,$value,"\n");
 }  
</OBJECT>
</BODY>
</HTML>
<html>

any idea how to make it printf the php part and write the html as well?

http://denby.ukhost-group.co.uk/index3.php?Server=irc.amcool.net

cheers
 
Last edited:
Back
Top Bottom