Can someone give me a hand please.? I’m trying to have php submit a new line in between
I have a html textarea:
<form method="post" action="add.php">
<textarea id="area" size="40" cols=22 rows=12 name="area"></textarea>
<input style="margin-top:10px" type="submit" name="submit" value="submit">
</form>
Here is my PHP code:
[code]
<?php $youTube_ID = $_POST['area']; // This is the data from your field $youTube_ID = strip_tags( $youTube_ID ); // This strips any html from the input as a basic security measure. $xml = <<<XML XML; // ----------------------------------------------------------------- if ( ! $handle = fopen( 'file.xml', 'a' ) ) { die("Unable to open file"); } if( ! fwrite( $handle, $xml ) ) { die("Unable to write to file."); } echo "Successfully wrote to xml."; ?>[/code]Here is my XML format:
http://pastie.org/3279073
Thanks to anyone who can help.
Timothy