PDA

View Full Version : PHP Question - PHP Includes, Target New


_Xternal34
05-13-2006, 07:19 PM
Ok... I'm not so good at PHP. And you know, I don't really plan to be. But erm.. I just wondering how you do this, because I'm making a site using PHP include.

Ok... what I use for linking is :
<a href=\"link.php\">link</a>

Now... I wanna do a new target, but I don't really know how. I've already tried target="new", but all I get is an error. NOT GOOD! :\ So help a fellw out. :)

And if you could please delete my previous account (Xternal34) and rename this one Xternal34... that'd be juicy plz kthx.

GJay
05-13-2006, 07:32 PM
this has nothing to do with PHP, but:

<a href="http://www.google.com" target="_blank">google</a>

Will work

_Xternal34
05-13-2006, 07:52 PM
Definitely not... <_<

kewlceo
05-13-2006, 08:33 PM
Definitely not... <_<
You would do it the way GJay suggested (keeping in mind it is not XHTML 1.0 strict compatible). It's simpler to end your PHP code and then do your (X)HTML, rather than to try and make everything PHP code.


<?php
// some code
?>
<a href="http://www.google.com" target="_blank">google</a>
<?php
// some more code
?>

Rich Pedley
05-13-2006, 08:41 PM
I think we need to see your code...

_Xternal34
05-14-2006, 01:19 AM
Yeh... I agree...

<div id="x3">
<?php include('data.php');
echo "$nav1body";
?>
</div>

Ok... that is included to data.php... obviously. <a href=\"link.php\">link</a>

I use that as linking.... Any other code you need?

Btw data.php is just using nav1 as a regular variable... ($nav1="adf";).

GJay
05-14-2006, 10:02 AM
What?

Rich Pedley
05-14-2006, 08:56 PM
erm, when I asked to see the code - I actually meant all of it. We are finding it difficult to understand what you want, but by seeing your code we might be able to figure it out.

Bill Posters
05-15-2006, 05:34 AM
You would do it the way GJay suggested (keeping in mind it is not XHTML 1.0 strict compatible).

Fwiw…

The target attribute is also invalid within HTML 4.01 Strict (not just XHTML)

kewlceo
05-15-2006, 05:48 AM
Fwiw…

The target attribute is also invalid within HTML 4.01 Strict (not just XHTML)
Duly noted! :thumbsup: :thumbsup: