Posted by Hilarion on 07/13/05 14:29
Luigi Donatello Asero wrote:
> I wonder whether I could write links within a table at mysql as text so that
> the user could follow these links which would be displayed on the table on
> the webpage.
I think you should try thinking for yourself and read some manuals before
asking questions on usenet, cause your questions are getting a bit annoying.
What is the difference between plain text (which you know that can be stored
in MySQL database) and URL or HTML? URL and HTML are also text, so they can
be stored in any SQL database. The difference is the way you use the text
stored in the DB.
<?php
$math_formula_from_DB = 'x + 2y <= z';
$url_from_DB = 'http://some.domain.com/some/file.php?some=param&and=other';
$html_from_DB = 'Some <b>HTML</b> formatted <i>text</i>.';
echo 'formula: ' . htmlspecialchars( $math_formula_from_DB ) . "<br />\n";
echo 'URL: <a href="' . htmlspecialchars( $url_from_DB ) . '">'
. htmlspecialchars( $url_from_DB ) . "</a><br />\n";
echo 'HTML: ' . $html_from_DB . "<br />\n";
?>
Try exchanging values between $math_formula_from_DB and $html_from_DB and
rerun the script and you'll see the difference.
Hilarion
Navigation:
[Reply to this message]
|