Решил прекрутить к своему сайтику капчу. Выбор пал на captcha.ru.
Пришлось повозится немного но вскоре весь код отладил и вроде всё без ошибок. Но после проверки выявилось что данные не попадают в БД.
Вот собственно и сам код. Где напортачил то подскажите люди добрые)
основной фаил:
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?
- include ("block/config.php");
- }
- if (!$result)
- {
- echo "<p>Запрос не прошел. Напишите об этом администратору. <br> <strong>Код ошибки:</strong></p>";
- }
- {
- $new_view = $myrow["view"] + 1;
- }
- else
- {
- echo "<p>Информация по запросу не может быть извлечена в таблице нет записей.</p>";
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="description" content="<? echo $myrow["meta_d"]; ?>" />
- <meta name="keywords" content="<? echo $myrow["meta_k"]; ?>" />
- <link rel="stylesheet" type="text/css" href="css/template.css"/>
- <title><? echo $myrow["title"]; ?></title>
- <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
- </head>
- <body>
- <table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td height="300" align="left" valign="top" class="hedshot"> </td>
- </tr>
- <tr>
- <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <? include ("block/menu.php"); ?>
- </table></td>
- <td class="centre_more">
- <?
- printf ("<p class='post_title2'>%s</p><p class='post_add'>Автор: %s<br>Дата: %s</p><div id='conteyner_my_top'>%s</div><p class='post_my_view'>Просмотров: %s</p>",$myrow["title"],$myrow["author"],$myrow["date"],$myrow["text"],$myrow["view"]);
- echo "<p class='post_comments'><br>Коментарии к этой заметке:</p>";
- {
- do
- {
- printf ("<div class='ramka_comm'><p class='post_com_obza'>Коментарий добавил(а): <strong>%s</strong> <br> Дата: <strong>%s</strong></p><p class='my_com-fon'>%s</p></div>",$myrow3 ['author'],$myrow3 ['date'],$myrow3 ['text']);
- }
- }
- ?>
- <br><br><br>
- <p class='post_comments2'>Добавить ваш коментарий:</p>
- <form action="com_ment.php" method="post">
- <p><label class="autor_name">Ваше имя:</label><p><input name="author" type="text" size="30" maxlength="30" /></p></p>
- <p><label class='post_comments2'>Текст комментария: <br> <textarea name="text" cols="35" rows="4"></textarea></label></p>
- <p>Введите текст с картинки:</p>
- <p><input name="keystring" type="text"></p>
- <input name="id" type="hidden" value="<? echo $id ?>" />
- <p><input name="sub_com" type="submit" value="Комментировать"></p>
- </form>
- </td>
- </tr>
- </table></td>
- </tr>
- <? include ("block/footer.php"); ?>
- </body>
- </html>