Jump to content


Photo

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


  • Please log in to reply
5 replies to this topic

#1 jmilane

jmilane
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 25 September 2006 - 03:26 PM

I want to email the equivalent of

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

from within a php script

where 32 is really a variable $lastid

so I am trying

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

isnt working.

help?

thanks so much.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 September 2006 - 03:33 PM

$lastid = 32;
echo "<a href=\"http://www.mysite.com/script.php?id=$lastid\">View Record</a>";

Notice the id?

#3 jmilane

jmilane
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 25 September 2006 - 03:34 PM

$lastid = 32;
echo "<a href=\"http://www.mysite.com/script.php?id=$lastid\">View Record</a>";

Notice the [b]id[/i]?


the [/i]??

#4 mewhocorrupts

mewhocorrupts
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts
  • LocationParker, CO

Posted 25 September 2006 - 03:41 PM

I want to email the equivalent of

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

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


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.
-mewhocorrupts

#5 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 September 2006 - 03:43 PM

Yeah sorry, that was a typo. Look at the bolded text....

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

#6 jmilane

jmilane
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 25 September 2006 - 03:56 PM

Yeah sorry, that was a typo. Look at the bolded text....

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


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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users