Help needed formatted submit results - Changing data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert V

    Help needed formatted submit results - Changing data

    Hi all, another area I could use some help with is changing submitted data
    based on the data conditions ... I will elaborate. I have a form textarea
    where a user can type in some text. This text is sent to a perl script that
    eventually will send that data to someone by email in HTML format. Here is
    where I need some help.

    If a user was to type in a web address www.mysite.com etc, in the text box,
    I would like my script to detect web addressed and add the necessary HTML
    tags before and after ... this is needed because unlike MIME email, HTML
    email must have the A HREF tags in order for the link to become hyperlinked.
    So here is what I need ... a code example that will detect a web address in
    the submitted data and add the

    <a href="http://www.mysite.com" >www.mysite.com "</a>

    tags before and after the found web address. I see Perl Forum scripts do
    this all the time but i have no idea how it's done. If you are able to
    provide an example that would be wonderful. Thankx!

    RV


  • Jim Rendant

    #2
    Re: Help needed formatted submit results - Changing data


    Robert V <ducott@hotmail .com> wrote in message
    news:45SRa.4821 88$Vi5.12525096 @news1.calgary. shaw.ca...[color=blue]
    > Hi all, another area I could use some help with is changing submitted data
    > based on the data conditions ... I will elaborate. I have a form textarea
    > where a user can type in some text. This text is sent to a perl script[/color]
    that[color=blue]
    > eventually will send that data to someone by email in HTML format. Here is
    > where I need some help.
    >
    > If a user was to type in a web address www.mysite.com etc, in the text[/color]
    box,[color=blue]
    > I would like my script to detect web addressed and add the necessary HTML
    > tags before and after ... this is needed because unlike MIME email, HTML
    > email must have the A HREF tags in order for the link to become[/color]
    hyperlinked.[color=blue]
    > So here is what I need ... a code example that will detect a web address[/color]
    in[color=blue]
    > the submitted data and add the
    >[/color]
    try something like "<a href=\"http://".$sitename.\"> ".$sitename,"\" </a>"
    thant should do it![color=blue]
    > <a href="http://www.mysite.com" >www.mysite.com "</a>
    >
    > tags before and after the found web address. I see Perl Forum scripts do
    > this all the time but i have no idea how it's done. If you are able to
    > provide an example that would be wonderful. Thankx!
    >
    > RV
    >
    >[/color]


    Comment

    Working...