text form with php
Moderator: General Moderators
text form with php
Hi all. I'm new to the forums and to php programming. I hope you can give me some help. What I need a form like the one we use to post in the forums. I basically need the text manipulation buttons (Bold, italic etc). I store the text in a field of a table using mysql. I'd like to ask someone to give me a simple php script creating this. Do i need extra fields in the table to store text format? TY in advance.
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
Re: text form with php
That's not the way we do it here! The forum is for us to learn - so you would need to write some code and post it with a question....
You are looking for a javascript/AJAX solution for text entry with Bold, Italic etc (Google for TinyMCE or Spaw) and then write a php script to store the results in a mysql database. Tiny MCE and Spaw replace a textarea with an editor. Then write an html form for text entry including that textarea.
You need some PHP to check the input and store it in the mysql database table.
A typical database table would include a TEXT field for the text and an INT field for the identifier of each entry which would be an auto-incrementing integer.
That's a bit of a learning curve - but I'm doing that sort of thing after not that long. I found the tutorials at http://www.tizag.com/phpT/ pretty helpful
You are looking for a javascript/AJAX solution for text entry with Bold, Italic etc (Google for TinyMCE or Spaw) and then write a php script to store the results in a mysql database. Tiny MCE and Spaw replace a textarea with an editor. Then write an html form for text entry including that textarea.
You need some PHP to check the input and store it in the mysql database table.
A typical database table would include a TEXT field for the text and an INT field for the identifier of each entry which would be an auto-incrementing integer.
That's a bit of a learning curve - but I'm doing that sort of thing after not that long. I found the tutorials at http://www.tizag.com/phpT/ pretty helpful