Jump to content

Is it possible to target table or something in PHP?


ztealmax

Recommended Posts

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.php
now if i would that one to open in table row 2, is that possible?
[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 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
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 ;)
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>
<?php
if(isset($_GET['target'])){
include($_GET['target'].".php");
} else {
echo "&nbsp;";
}
?>
</td>
</tr>
</table>[/code]

Ray

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.