echo '<a href="http://linkonsite.com/test.php?value='.$row[1].'">'.$row[2].'</a>';
// на странице test.php
echo $_GET["value"];
Что делать?
<button method="POST" name="buttton" class="btn btn-warning" type="submit">Записать в БД</button>
<input type="submit" name="buttton" class="btn btn-warning" value="Записать в БД">
if (isset($_POST['buttton']))
<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
// далее остальной код
die(json_encode($error));
// или
exit(json_encode($error));
// и
die("всё плохо");
<?php
session_start();
$nom = isset($_SESSION["nom"]) ? intval($_SESSION["nom"] + 1) : 1;
$_SESSION["nom"] = $nom = $nom > 999 ? 999 : $nom;
echo $nom;
iconv ('utf-8', 'windows-1251', $message1), iconv ('utf-8', 'windows-1251', $header)
iconv('windows-1251', 'utf-8', $message1), iconv('windows-1251', 'utf-8', $header)
$name = htmlspecialchars($_POST['name'], ENT_QUOTES, "windows-1251");
...
iconv ('utf-8', 'windows-1251', $message1), iconv ('utf-8', 'windows-1251', $header)
Вот эта дичь не нужна!var email = $('#email').val(); var phone = $('#phone').val(); var text = $('#text').val();
<form id="sendEmail" action="#" method="POST">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<input type="emal" class="form-control" name="email" placeholder="Email" required />
<input type="tel" class="form-control" name="phone" placeholder="Телефон" required />
<textarea class="form-control" name="text" cols="30" rows="10" placeholder="Сообщение" required></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
<button type="submit" class="btn btn-primary">Отправить письмо</button>
</div>
</form>
$(document).ready(function(){
$("form#sendEmail").submit(function(event) {
event.preventDefault();
$.ajax({
type: "POST",
dataType: "html",
url: "page.php",
data: $(this).serializeArray(),
success: function(data) {
$(".modal-header").after(data);
}
});
});
});