FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Writing to a file by form





DjMilez
I couldn't find out how to do this on the Php website.

But you might have read my other topic and saw that I am (trying) to code a forum system.

If I had a form where you inserted your database connection info, and when a user clicked submit, what code would I use to have it write the information to a file that tells the page to connect to the database?
alalex
Well if you want to setup a forum I have to advise you first that you give a try to already done forum systems like phpbb or others.
Having said this I'll answer your question:
You must have a "process" page, which will be the action of your form. In that page you'll connect to the database (Use google to find out how if you don't know) and then use an INSERT query to send the information to the database.
You must first have a table created and all the basic stuff done. If you are new to php & MySQL try using google for tutorials that will teach you the basic knowledge you have to learn about this.

You have a long way to setup a forum, have luck with it Wink
DjMilez
Thanks a lot alalex. Will go look it up now Smile

Yeah, I know it's a long process. I doubt I'll even finish it lol.

Thanks again.
Related topics
File upload with PHP, Build an upload database for your site
Creating a new Operating System
Any writers here
MySQL problem (as usual)
looking for a games ssite template
New Created Accounts
AJAX and PHP contact form
10 datas from a form to next page
send an email from internet...
3 Things That Microsofft Cant Explain Us
Files Pending To Be Written into the CD
best free webhost?
fetching file form somewhere else and push to user
Upload a file from host to other file host
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.