Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#154987 - 13/04/2003 18:16 PHP Question
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12320
Loc: Sterling, VA
Just a quick one. I've been doing really well on my own lately, with starting points from David.

Say I'm passing variables through links. I write one like this:
<a href="news-delete.php?id='.$article['id'].'">

That's in the middle of an echo. Now, how do I pass two variables of this type?
_________________________
Matt

Top
#154988 - 13/04/2003 18:52 Re: PHP Question [Re: Dignan]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
You can either do this:


echo "<a href=\"news-delete.php?id=".$article['id']."&amp;x=".$x."\">Delete</a>";


...which can get very messy. Or, what I prefer, is to exit out of the PHP when doing HTML, like so:

?>
<a href="news-delete.php?id=<?php echo $article['id']; ?>&amp;x=<?php echo $x; ?>">Delete</a>
<?php
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#154989 - 13/04/2003 19:40 Re: PHP Question [Re: ricin]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12320
Loc: Sterling, VA
Ahhh, thanks. No, I just didn't know how to connect them. I see a nice & does it Thanks a bunch!
_________________________
Matt

Top
#154990 - 13/04/2003 20:00 Re: PHP Question [Re: Dignan]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Ahh. No problem. I thought you were asking how to correctly format an echo statement to get the correct output for multiple variables.
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top