This is probably fairly easy for the PHP gurus but not for me.
Does anyone have an example of a PHP script/form where I can have two TEXTAREA on a form,
and when I click on a cut/copy/paste button, it cut/copy/paste from one TEXTAREA to another.
I know how to echo the contents of the TEXTAREA but I prefer to echo the contents to a TEXTAREA
of the same form on the same page instead.
It is kinda like a FORM verification script but instead of loading the page using echoes, I want
to be able to display the result of the TEXTAREA into another TEXTAREA on the same page.
Any advise will be very much appreciated. Thanks in advance.
Below is basically how the FORM should look like but I don't know how to code the PHP stuff.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang='en'> <head> <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" /> <title>Example Cut/Copy TEXTAREA</title> </head> <body><center><h1>Example Cut/Copy TEXTAREA</h1> <form id="form1" name="form1" method="post" action="<?php echo $PHP_SELF;?>"> <textarea name="coded" cols="60" rows="8" id="coded"></textarea> <br /> <input type="submit" name="Submit" value="Cut/Copy/Convert" /> </form> <textarea rows=20 cols=60><?php return $coded ?> </textarea><br/> </body> </html>