roadrunner75 Posted January 5, 2010 Share Posted January 5, 2010 I have form data that I would like to save to a csv file. If appears that my _Post data is empty every time I try and save things to a file. I am not sure what I am doing wrong. Any help that you can give me would be great. Below are the 2 php files I am using to test this ablity. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/187279-saving-_post-data-to-a-file/ Share on other sites More sharing options...
teamatomic Posted January 5, 2010 Share Posted January 5, 2010 $write="$Name,$Gender,$DOB,$and,$more,$with,$seperator"; file_put_contents("$FileName","$write"); HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/187279-saving-_post-data-to-a-file/#findComment-988986 Share on other sites More sharing options...
roadrunner75 Posted January 5, 2010 Author Share Posted January 5, 2010 That looks much eazier than what I was doing. Thanks It does not seem to explain why my _Post data seems empty and no data is displayed. Link to comment https://forums.phpfreaks.com/topic/187279-saving-_post-data-to-a-file/#findComment-988996 Share on other sites More sharing options...
premiso Posted January 5, 2010 Share Posted January 5, 2010 In test.php you are using smart quote around the HTML name field: name=”3Dchild4” Change those to be regular quotes: name="3Dchild4" On all fields and it should work just fine. As Smart quotes are not valid HTML. Link to comment https://forums.phpfreaks.com/topic/187279-saving-_post-data-to-a-file/#findComment-989004 Share on other sites More sharing options...
roadrunner75 Posted January 7, 2010 Author Share Posted January 7, 2010 Thank you that was it! It works great now! Link to comment https://forums.phpfreaks.com/topic/187279-saving-_post-data-to-a-file/#findComment-990325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.