Re: Links in a table in mysql
- From: "Hilarion" <hilarion@xxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jul 2005 13:29:43 +0200
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 .
- Follow-Ups:
- Re: Links in a table in mysql
- From: Luigi Donatello Asero
- Re: Links in a table in mysql
- References:
- Links in a table in mysql
- From: Luigi Donatello Asero
- Links in a table in mysql
- Prev by Date: Re: Parse error!
- Next by Date: Re: PHP Function ?
- Previous by thread: Links in a table in mysql
- Next by thread: Re: Links in a table in mysql
- Index(es):
Relevant Pages
|