Script requirements

Hello, I have an admin control panel on my website I’ve created. I have it successfully submitting my data into my database.

Now comes the hard part. After my database submission I need the following also done - some of which I’m not even sure is possible with PHP alone - if not I guess I’ll do it manually

After it submits to database -
-Create file with default file (I can create a template for it to recall if needed)
-Have it recall appropriate blog data from the database
-E-mail out to my newsletter subscribers.
-Automatic script to submit article to Twitter/Facebook/RSS Feed? Is it possible?

Where should I start with this? What can I rule out as possible?

That’s all possible. Start with the first part.

Create file with default file (I can create a template for it to recall if needed)

What kind of file? On the server?

http://php.net/manual/en/function.file-put-contents.php
http://php.net/manual/en/function.file-get-contents.php

If you need to send it back to the client, there are tons of other methods depending on how you want it done.

the next 2 are obvious

Automatic script to submit article to Twitter/Facebook/RSS Feed? Is it possible?

Just check the API docs for twitter and facebook, eg: https://dev.twitter.com/docs

Those APIs look really confusing - I’ll try to sift through the documentation

Yes the file will be on the server which will actually be the page created for the blog article. Let’s say I write about CSS resets. I may name the page and it will be created and stored in /public_html/blog/css-resets.php

The css-resets.php page needs to pull from a template.php and be inserted in. Should I have the template page store variables in, and upon me creating the page, set the variables so that when I include the file, the template page can plug in the varaibles as needed?

Wondering whether I should just do create file and then fopen / write? Write on the blank page (css-resets) the template.php?