Jump to content

Archived

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

jmilane

need help formatting a url to be emailed from within a script

Recommended Posts

I want to email the equivalent of

[code]<a href="http://www.mysite.com/script.php?=32">View Record</a>[/code]

from within a php script

where 32 is really a variable $lastid

so I am trying

[code]<a href=\"http://www.mysite.com/script.php?=$lastid\">View Record</a>;[/code]

isnt working.

help?

thanks so much.

Share this post


Link to post
Share on other sites
[code=php:0]
$lastid = 32;
echo "<a href=\"http://www.mysite.com/script.php?id=$lastid\">View Record</a>";
[/code]

Notice the [b]id[/b]?

Share this post


Link to post
Share on other sites
[quote author=thorpe link=topic=109424.msg440999#msg440999 date=1159198422]
[code=php:0]
$lastid = 32;
echo "<a href=\"http://www.mysite.com/script.php?id=$lastid\">View Record</a>";
[/code]

Notice the [b]id[/i]?
[/quote]

the [/i]??

Share this post


Link to post
Share on other sites
[quote author=jmilane link=topic=109424.msg440990#msg440990 date=1159197991]
I want to email the equivalent of

[code]<a href="http://www.mysite.com/script.php?=32">View Record</a>[/code]

[code]<a href=\"http://www.mysite.com/script.php?=$lastid\">View Record</a>;[/code]

[/quote]

What they meant was that in your link, you didn't specify what POST variable $lastid is supposed to be assigned to.  Your link wouldn't work because of that.  The "[/i]" thing was a formatting error, but it took me a moment to figure out what it meant too.

Share this post


Link to post
Share on other sites
Yeah sorry, that was a typo. Look at the bolded text....

<a href=\"http://www.mysite.com/script.php?[b]id[/b]=$lastid\">View Record</a>

Share this post


Link to post
Share on other sites
[quote author=thorpe link=topic=109424.msg441010#msg441010 date=1159199004]
Yeah sorry, that was a typo. Look at the bolded text....

<a href=\"http://www.mysite.com/script.php?[b]id[/b]=$lastid\">View Record</a>
[/quote]

Ooohhh... okay. Thanks. You are right of course.

Share this post


Link to post
Share on other sites

×

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.