<h1>
<?php
$connect = mysql_connect (localhost, =====, '====');
$select_db = mysql_select_db('======');
$select = mysql_query("SELECT * FROM tabla WHERE kol_vo <> 0 ORDER BY RAND() LIMIT 1");
while($result = mysql_fetch_array($select)) {
echo "
Текст: <a href = 'http://".$result['zak']."' target= _blank><br>ОЗНАКОМИТЬСЯ</a><br><br>
Текст: <a href = 'http://".$result['url_otz']."' target= _blank><br>РАЗМЕСТИТЬ ОТЗЫВ</a><br><br>
";
}
?>
<p><font size="6" color="red" face="Arial">ТЕКСТ</font>
</h1>
<form action='index1.php' method='post'>
<input type='hidden' name='id' value='<?=$result['id']?>'>
<button>Кнопка</button>
</form>
<form action='index1.php' method='post'>
<input type='hidden' name='id' value='<?=$result['id']?>'>
<button>Кнопка</button>
</form>
echo $_POST['id'];
<h1>
<?php
$connect = mysql_connect (localhost, ==========, '==========');
$select_db = mysql_select_db('============');
$select = mysql_query("SELECT * FROM tabla WHERE kol_vo <> 0 ORDER BY RAND() LIMIT 1");
while($result = mysql_fetch_array($select)) {
echo "
Какой то текст: <a href = 'http://".$result['zak']."' target= _blank><br>ОЗНАКОМИТЬСЯ</a><br><br>
Какой то текст: <a href = 'http://".$result['url_otz']."' target= _blank><br>РАЗМЕСТИТЬ ОТЗЫВ</a><br><br>
";
}
?>
<p><font size="6" color="red" face="Arial">ТЕКСТ</font>
</h1>
<form action='index1.php' method='post'>
<input type='hidden' name='id' value='{$result['id']}'>
<button>Кнопка</button>
</form>
<?php
$connect = mysql_connect (localhost, ----------, '----------');
$select_db = mysql_select_db('-----------');
$sql = "UPDATE tabla SET kol_vo = kol_vo - 1 WHERE id = {$_POST['id']}";
$query = mysql_query($sql);
if (!$query) {
die('не работаем' . mysql_error());
}
header('Location: http://f0238493.xsph.ru/');
?>
<?php
$connect = mysql_connect (localhost, =======, '=======');
$select_db = mysql_select_db('-----------');
$select = mysql_query("SELECT * FROM tabla WHERE kol_vo <> 0 ORDER BY RAND() LIMIT 1");
while($result = mysql_fetch_array($select)) {
echo "
САЙТ: $result[zak] <br>
ССЫЛКА: $result[url_otz] <br>
ВОТ: $result[kol_vo] <br>
";
$sql = "UPDATE tabla SET kol_vo = kol_vo - 1 WHERE id = $result['id']";
$query = mysql_query($sql);
if (!$query) {
die('updating error'. mysql_error());
}
else {
echo 1;
}
}
?>
<?php
$connect = mysql_connect (localhost, +++++++, '++++++');
$select_db = mysql_select_db('+++++++');
$select = mysql_query("SELECT * FROM tabla WHERE kol_vo <> 0 ORDER BY RAND() LIMIT 1");
while($result = mysql_fetch_array($select)) {
echo "
САЙТ: $result[zak] <br>
ССЫЛКА: $result[url_otz] <br>
ВОТ: $result[kol_vo] <br>
";
}
$sql = "UPDATE tabla SET kol_vo = kol_vo - 1 WHERE id = $result'id'";
$query = mysql_query($sql);
if (!$query) {
die('updating error'. mysql_error());
}
else {
echo 1;
}
?>
Строк около 50 пока-что, но будут увеличиваться.