Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - Help needed formatted submit results - Changing data

 
Thread Tools Search this Thread
Old 07-18-2003, 01:53 PM   #1
Default 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




Robert V
  Reply With Quote
Old 07-19-2003, 01:49 AM   #2
Jim Rendant
 
Posts: n/a
Default Re: Help needed formatted submit results - Changing data


Robert V <> wrote in message
news:45SRa.482188$. ca...
> 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
>

try something like "<a href=\"http://".$sitename.\">".$sitename,"\"</a>"
thant should do it!
> <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
>
>



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump