?!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
mysql_close();
$dial = 'all right (may be) <a href="index.php">go back</a>';
$text = $_POST['txtName'];
$host = "хост"; $user = "юзер"; $pass = "пасс";
$link = mysql_connect($host, $user, $pass) or die('n ' . mysql_error());
mysql_query('USE myboardDB');
$q = mysql_query("SELECT * FROM myboardTable");
$count = ( mysql_num_rows($q) + 1 );
echo $count."<br>";
//mysql_query('USE myboardDB');
mysql_query('INSERT INTO myboardTable (NUMBER, TEXT)
VALUES ("'.$count.'","'.$text.'")') or die('2 ' . mysql_error());
mysql_close();
echo $dial;
?>