ztealmax Posted December 22, 2006 Share Posted December 22, 2006 Hi i have a question if i have set up tables in 3 rows for an example is it someway i can target row 2 with content from selected file?For example:in row 1 i have a small menu with clickable link to example news.phpnow if i would that one to open in table row 2, is that possible? Quote Link to comment Share on other sites More sharing options...
trq Posted December 22, 2006 Share Posted December 22, 2006 Yes its possble. PHP can be sprinkled anywhere you like within html as long as its within <?php ?> tags. Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 22, 2006 Author Share Posted December 22, 2006 [quote author=thorpe link=topic=119617.msg490095#msg490095 date=1166781231]Yes its possble. PHP can be sprinkled anywhere you like within html as long as its within <?php ?> tags.[/quote]how would i do that?? :)is it something like [code]<a href="pagename.php" target=$tablename>hello</a>[/code]or how does it work? got a link to somekind of tutorial on that?//Thanx Martin Quote Link to comment Share on other sites More sharing options...
taith Posted December 22, 2006 Share Posted December 22, 2006 [code]<a href="pagename.php"><?=$tablename?></a>[/code] Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 22, 2006 Author Share Posted December 22, 2006 ahh :D sweet i try it right away ;) thanx m8ehm yea forgot, how do i set the tablename?is it type like this[code]$TABLENAME = "content goes here;"[/code] Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 22, 2006 Author Share Posted December 22, 2006 [quote author=taith link=topic=119617.msg490137#msg490137 date=1166789460][code]<a href="pagename.php"><?=$tablename?></a>[/code][/quote]hmm think i was missunderstod what exactly does <?=$tablename?> do? doesnt it just echo out the name of table instead of targeting?//Cheers Quote Link to comment Share on other sites More sharing options...
taith Posted December 22, 2006 Share Posted December 22, 2006 ya... what do you mean by targeting? Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 22, 2006 Author Share Posted December 22, 2006 well sorry if i cant explain good, me english isnt that good ;)if you have a table like this[code]<table<tr><td><a href="test.php" target="targetname">click me</a></td></tr></table><table><tr><td>{targetname} // So the link i click get into this table if ´possible?</td></tr></table[/code]Hope i made some sence to you ;) Quote Link to comment Share on other sites More sharing options...
taith Posted December 22, 2006 Share Posted December 22, 2006 oooooh... you want anchors[code]<a href="#gototable">Go To Table</a><a name="gototable"></a><table>...[/code] Quote Link to comment Share on other sites More sharing options...
craygo Posted December 22, 2006 Share Posted December 22, 2006 yes you could do it with a couple if then and an include[code]<table><tr><td><a href="<?=$_SERVER['PHP_SELF']?>?target=news">click me</a></td></tr></table><table><tr><td><?phpif(isset($_GET['target'])){include($_GET['target'].".php");} else {echo " ";}?></td></tr></table>[/code]Ray Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 22, 2006 Author Share Posted December 22, 2006 Now this is interesting :Pso infact i can have a menu system, and if clicked it opens it in target..this is so cool :)Thanx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.