jmilane Posted September 25, 2006 Share Posted September 25, 2006 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 scriptwhere 32 is really a variable $lastidso I am trying [code]<a href=\"http://www.mysite.com/script.php?=$lastid\">View Record</a>;[/code]isnt working.help?thanks so much. Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/ Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 [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]? Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/#findComment-98259 Share on other sites More sharing options...
jmilane Posted September 25, 2006 Author Share Posted September 25, 2006 [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]?? Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/#findComment-98260 Share on other sites More sharing options...
mewhocorrupts Posted September 25, 2006 Share Posted September 25, 2006 [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. Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/#findComment-98265 Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 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> Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/#findComment-98267 Share on other sites More sharing options...
jmilane Posted September 25, 2006 Author Share Posted September 25, 2006 [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. Link to comment https://forums.phpfreaks.com/topic/21992-need-help-formatting-a-url-to-be-emailed-from-within-a-script/#findComment-98283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.