how to show the preview after typed in text editor;

Below is a sample of a form using preview and submit if it helps.

<?
if (isset($_POST['submit']))
	{
	//form submission data
	}
?>

<html><body>
<form method='post'>
<textarea cols=50 rows=12 name='formtext'><? echo $_POST['formtext'] ?></textarea>
<input type='submit' value='submit' name='submit'>
<input type='submit value='preview' name='preview'>
</form>
</body></html>

<?
if (isset($_POST['preview']))
	{
	echo $_POST['formtext'];
	}
?>
commented: tahnks alot +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.