Reply to Re: Links in a table in mysql

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация