Re: Help (Text Posting Form)
Well, first, you need your code right. No spaces around equals signs in HTML.
Code:
<form name="strategyform" action="http://www.mediamax.com/tigermonkey/Hosted/strategies.php" method="post">
<textarea name="strategy" cols="30" rows="20"></textarea>
<br>
<button name="submit" type="submit">Post</button>
</form>
What exactly are you trying to do on the other page. If you just want to get the text with the server use...
PHP Code:
<?php
$strategy = $_POST['strategy'];
echo $strategy;
?>
Re: Help (Text Posting Form)
Get the text thats in the form, and send it to another page just to add on to it
Button Click = Send To Page -----> Other Page - Add textarea text to page
does it have to be a script kind of page, or can the text be added to another html
ill try your code
Re: Help (Text Posting Form)
Quote:
Originally Posted by code?
Get the text thats in the form, and send it to another page just to add on to it
Button Click = Send To Page -----> Other Page - Add textarea text to page
does it have to be a script kind of page, or can the text be added to another html
ill try your code
I see what you mean. When you make your form, you need a php program to parse the stuff you send it to it, and have it do stuff. Basicly, the code he provided will do nothing other then display it back in the browser. If you want it to add onto another page, then you would need to make a script that will write to a file.
Let me make you a sample code:
Code:
<?php
$strategy = $_POST['strategy'];
//To add a break so it goes to the next line use this line instead:
//$strategy = "<br />" . $_POST['strategy'];
$filename = 'filetowriteto.html';
if (!$handle = fopen($filename, 'a'))
{
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
?>