I have the same problem with inserting the links in MySQL using Perl.

I can do all the job with Perl, but if the link contains a "?" sign, it is
replaced by the string "NULL" in the MySQL database and the link stored will
be something like:

http://www.server.com/cgi-bin/script.plNULLid=3

Do I need to put a backslash before all non word characters before inserting
the link into the database?

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "Michael T. Babcock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 6:51 PM
Subject: Re: How to Retreive Web Links from MySQL to HTML ???


On Fri, Nov 22, 2002 at 07:40:26AM -0800, tmb wrote:
> Does PHP have to do all the work here...
>
> 1 - fetch the url from the db
> 2 - fetch the link name from the db
> 3 - construct the html code to display it

Yes; what else had you imagined?

If you do it right, it will probably look something like:

<UL>
<?php
$results = ...
while ($row = mysql_fetch_array($results))
{
?>
<LI><A HREF="<?php echo $row['href']; ?>"><?php echo $row['name'];
?></A></LI>
<?php
}
?>
</UL>

--
Michael T. Babcock
CTO, FibreSpeed Ltd.     (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to