Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('имя базы', $link);
$result = mysql_query('SELECT text FROM `table`');
while ($row = mysql_fetch_assoc($result)) {
echo($row['text']);
}
mysql_free_result($result);
mysql_close($link);
?>
<?php
$link = mysql_connect('localhost', 'user', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('base-name', $link);
$result = mysql_query('SELECT text FROM `content`');
while ($row = mysql_fetch_assoc($result)) {
$row[`content`]=htmlspecialchars($row[`content`],ENT_QUOTES);
echo($row[`content`]);
}
mysql_free_result($result);
mysql_close($link);
?>
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/acc151/public_html/domain.ru/pars.php on line 8
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/acc151/public_html/domain.ru/pars.php on line 12
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/acc151/public_html/domain.ru/pars.php on line 8
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/acc151/public_html/domain.ru/pars.php on line 12
$result = mysql_query('SELECT text FROM `content`');
if ($result){
while ($row = mysql_fetch_assoc($result)) {
echo htmlspecialchars($row[`text`],ENT_QUOTES);
}
} else {
echo mysql_errno() . ": " . mysql_error();
}
mysql_free_result($result);