Hi all! Unfortunately, I didn't receive any replies to the problem I sent out on January 16th so I thought I'd send another email and perhaps clarify what I am seeing so that maybe someone CAN help and ask if folks on the list have just not seen this issue before.
The program I am working on allows the customer to view test results based on a keyword. If the results contain a URL (these URLs are entered into the MySQL database as straight text), I make it live using the code snippet below. Unfortunately, I have not been successful doing this no matter what I try. Currently, after I have run the code below, what I see is a link containing the correct text but, when you put the cursor over the link, the actual URL is that of the "base" browser page. For example, I am working on a file located at: http://fake.url.com/testing/Test_Results/search_keyword.php (which is called from form Search_Keyword.php). If the test results that fit the keyword search contains, say, URL http://www.cleanrun.com (again, entered into the database as plain text), this is what will show up in the search output. HOWEVER, when the cursor is placed over the URL (or the URL is clicked), the URL that appears at the bottom of the browser corresponding to the cursor'd URL is http://fake.url.com/testing/Test_Results. Is there something in my PHP config file I might be missing? Is there something in my code I'm not doing correctly? Has anyone else ever seen this problem? HELP!!! I'm at my wits end with this one. I'm afraid I'm not going to be able to make these links live which will make the tool much less usable. Please let me know if you need more information from me in order to help! Thanks so much, Katherine -----Original Message----- From: ELLIOTT,KATHERINE A (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 10:54 AM To: '[EMAIL PROTECTED]' Subject: RE: [PHP] Adding HTTP URL Code Thanks for all your help with my URL code problem! I have come up with a solution that seems to half work and I can't figure out what I need to do to get it fully functional. Given my data string (text) from my database, this is what I do to replace the URL text with a functioning link. I am asking folks that, if they include a URL in their results to surround it by [] so that I can search for the brackets. This is what my text replace line looks like: $data_str = eregi_replace ("(\[http://)([^]]*)", "<a href \"http=\\0\">\\0</a>", $data_str); So, if the URL is (for example) [http://www.cleanrun.com] (in plain text), it will show up for viewing in my browser as http://www.cleanrun.com but the URL associated with it will be that of the directory in the browser "Location" (i.e. http://wrong.url.com/Test_Results). I've tried all sorts of things with the call to eregi_replace but can't figure out what is going on. What the hec??? Can someone help? Many thanks!! Katherine Elliott -----Original Message----- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:05 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Adding HTTP URL Code On Thursday 09 January 2003 04:07, ELLIOTT,KATHERINE A (HP-FtCollins,ex1) wrote: > OK, so I've gotten NO responses to my query below so I > thought I'd ask for something slightly different and see what > I get. With regards to your original query, the answer is in the archives. Try searching for something like "regex url" or "regex hyperlink" etc. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* NOTICE: alloc: /dev/null: filesystem full */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php