PO DODANIU TEGO KODY NIE DZIALA MI WYSYLANIE
http://www.ocena.log.ugu.pl/ NIC SIE NIE POKAZUJE NA STRONIE POMOZECIE
poprawiony kod ktory nadal nie dziala pomoze ktos
<head>
<meta http-equiv=?Content-Type? content=?text/html; charset=utf-8? />
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
</head>
<script>
$(document).ready(function() {
$('form').submit(function(e) {
e.preventDefault();
div = $(this).attr("data-desc='#contener'");
desc = $('textarea[name="tresc"]').val();
desc = $('input[name="zrodlo"]').val();
desc = $('input[name="image"]').val();
desc = $('input[name="login"]').val();
desc = $('input[name="temat"]').val();
$(div).html(desc)
});
});
</script>
<div id="contener">
wyswietlanie przeslanego formularza w tym divie
</div>
<?php
<form data-dest=#contener method="POST">
<input type="url" name="zrodlo" class="wyg_input" autocomplete="off" required placeholder="Podaj link skąd wzięty został
artykuł..."/>
<input type="url" name="image" class="wyg_input" autocomplete="off" required placeholder="Podaj link do zdjęcia..."/>
<input type="text" name="login" class="wyg_input" autocomplete="off" required placeholder="Podaj swój nick..."/>
<input type="text" name="temat" class="wyg_input" required autocomplete="off" placeholder="Podaj treść twojego tematu... "/>
<textarea name="tresc" class="wyg_text" rows="3" required autocomplete="off" placeholder="Treść twojej
wiadomości..."></textarea>
<button type="submit" class="btn_wyslij" name="wyslij">Wyślij wiadomość</button>
</form>
</body>
</html>';
($_POST['tresc']) && !empty($_POST['temat'])) {
$data = date('Y-m-d H:i:s'); $ip = $_SERVER['REMOTE_ADDR'];
mysql_query ("INSERT INTO `tematy` (`zrodlo`, `image`,`login`, `data`, `ip`, `tresc`, `temat`) VALUES('$zrodlo'
,'$image', '$login', '$data', '$ip', '$tresc', '$temat')");
header('Location: '.$_SERVER['REQUEST_URI']); }
else {
$query = mysql_query ("SELECT * FROM `tematy` ORDER BY `tematy`.`data` DESC");
echo '<div id="st" ><div id="pt">';
echo"<a href='{$shout['zrodlo']}'</a>"; echo "<img src='{$shout['image']}'/>" .'<b id="autor"> '.'Autor: '.$shout['login'].'</b> ' .'</br>'
.'<h1 id="temat">'.$shout['temat'].'</h1> ' .'</br>'
.'<p id="art_tre">'.$shout['tresc'].'</p>'.'</br>'
.'<br/>'
.'Czas Napisania: '.$shout['data'] .'</br>'
.'</div></div>';
}
}
?>