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?
Link to comment
Share on other sites

[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
Link to comment
Share on other sites

[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
Link to comment
Share on other sites

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 ;)
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.