Saturday 15 March 2014

HTML PHP question textarea issue

Posted by Саша 23:57, under | No comments


HTML PHP question textarea issue? HTML PHP question textarea issue?

I want a page to load a textarea that has some text in it, It should be readonly when the page loads.
On the clock of a button I want it to become available for editing or changing the text. But I cannot figure out how to do this. here is my code:



<html>
<body>
<?php
$read = "readonly";
echo $read;
echo '<form action="" method="POST">
<textarea style="border: none; resize: none" rows="15" cols="50% "' . $read . '>hello my name is steve</textarea><br>
<input type="submit" NAME="submit" value="Edit">
</form>';

if(isset($_POST['submit']))
{
$read = "";
echo "<input type='submit' value='Save'>";
echo "poop";
}
else{

echo "It Failed!!";
}

?>

</body>
</html>














0 коммент.:

Post a Comment