I am a new user in PHP and currently developing a blogging web-site using PHP. I have designed a simple design of Create Blog page using HTML syntaxs, created database fields in MySQL as 1) Blog-Id 2) User-Id 3) Blog-title 4) Blog-text. Now if I am supposed to give interface like bold, italic, then how could I give it using PHP as scripting language?? I am unawre of Jscript.
cblog.php code is as follow:
<?
session_start();
if ($_POST) {
file_put_contents("file.txt",$_POST['text']);
header ("Location: ".$_SERVER['PHP_SELF']);
exit;
}
$text = htmlspecialchars(file_get_contents("file.txt"));
?>
<title>Cblogs</title>
<fieldset>
<legend>Create New Blog</legend>
<form action="" method="post" enctype="multipart/form-data">
<table width="400" border="0" bordercolordark="#000000">
<tr>
<td width="129"><b><i>TITLE:</i></b></td>
<td width="259"><input type="text" name="title" size="40"/></td>
</tr>
</table>
<table width="44%" border="0">
<tr>
<td height="123" width="75%">
<fieldset>
<legend>Text</legend>
<textarea name="text" rows="20" cols="80"><?=$text?></textarea>
</fieldset>
</td>
</tr>
</table>
<table border="0">
<tr>
<td> </td><td width="20%"><input type="submit" name='submit' value="SUBMIT"/></td>
<td width="25%"><input type="reset" name="reset" value="RESET"/></td>
</tr>
</table>
</form>
</fieldset>