[!--quoteo(post=375097:date=May 18 2006, 07:43 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ May 18 2006, 07:43 PM) [snapback]375097[/snapback][/div][div class=\'quotemain\'][!--quotec--] Here's a short script to get you going: [code]<?php $fp=f open('textfile.txt','w'); f write($fp,"motd[]=\n{\n" . '"' . $_POST['fields1' . '",' . "\n" . '"' . $_POST['field2'] . '",' . "\n};"); f close($fp); ?>[/code] This assumes that your form uses method="POST", if it uses "GET", change all $_POST to $_GET. Note: Please remove the space between the "f" and the rest of the function. Ken [/quote] Thanks for the reply, how can I go about connecting this with the form. <form method="POST" action="--WEBBOT-SELF--"> <p><input type="text" name="field1" size="20"></p> <p><input type="text" name="field2" size="20"></p> </form>