Skip to content

Instantly share code, notes, and snippets.

Created November 9, 2010 21:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
require_once ('db_login.php');
require_once ('db_connect.php');
/*$connection=mysql_connect($db_host, root, doom);
if (!$connection) {
die ("Невозможно подключиться к базе данных: <br/ >".mysql_error());
if (!$db_select) {
die ("Невозможно выбрать базу данных: <br/ >".mysql_error());
} */
function query_all($connection) {
// Записать текст запроса в переменную
$query= "SELECT * FROM main2";
// Исполнить запрос
$result= mysql_query($query);
if (!$result) {
die("Ошибка запроса: <br />".mysql_error());
//Получить и отобразить результаты
while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr><td>$date</td>";
echo "<td>$start</td>";
echo "<td>$end</td>";
echo "<td>$name</td>"; ?>
<textarea name="input_title" rows="4" id="input_title" value="<?php echo $name; ?>"></textarea>;
echo "<td>$avz</td>";
echo "<td>$tech</td></tr>";
query_all ($connection);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment