I wrote this
<form method="post" id="create">
<div class="panel panel-success">
<div class="panel-heading">
<p>Create a new Wall Post</p>
</div>
<div class="panel-body">
<textarea cols="80" id="text" name="text" rows="10" style="visibility: hidden; display: none;"></textarea>
<script>
$('#text').wysibb(options);
</script>
<div class="pull-right">
<br>
<button onclick="$('#text').val($('#text').htmlcode())" type="submit" name="create" class="btn btn-success">Post</button>
<button type="reset" name="reset" class="btn btn-danger">Reset</button>
</div>
</div>
</div>
</form>
<?php
if (isset($_REQUEST['create'])) {
$p = WallPostManager::createWallPost($user, UserManager::isLoggedIn(), $_POST['text']);
if ($p != false) {
Utils::alert("News Post created", false);
header('refresh: 1');
}
}
But for some reason, im getting the 'text' in bbcode when im specifying it to be on .htmlcode(), what could be happening? am i doing something wrong?
Aucun commentaire:
Enregistrer un commentaire