Create a php/mysql news submit form

Discussion in 'PHP' started by mynameisdi, Mar 21, 2009.

  1. #1
    So I have a social website and I want users to be able to add news to it.

    Obviously I need to create a form that would pass the data to my mysql.

    But at the same time I would need a simple text editor that would enable common tags, such as inserting pictures.

    Any ideas on how to implement this kind of editor into a form?

    Any examples of code? I can't google up what exactly I need :(
     
    mynameisdi, Mar 21, 2009 IP
  2. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    TinyMCE and then save to database ;)
     
    Joak1m, Mar 21, 2009 IP
  3. mynameisdi

    mynameisdi Banned

    Messages:
    977
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I already have this code setup on my admin page, but I have no idea how to edit it. This code will work only from the admin page which is a problem.

    
    	<div class="menuHeader" id="textLTinyMCE">Add</div>
    	<div class="menuBody coolDiv" id="textOptions">
    		<form id="textForm" onsubmit="saveFCK(); return false;">
    			<input type="hidden" name="option" value="add" />
    			<input type="text" name="title" /><br /><br />
    			<div id="fckeditor"></div>
    		</form>
    	</div>
    
    Code (markup):
    But the bad part about it is that I have no idea how to create it in "barebone html" to make it work in another page. Also, I need to add another hidden field in the parse.
     
    mynameisdi, Mar 21, 2009 IP
  4. mynameisdi

    mynameisdi Banned

    Messages:
    977
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    so, anyone? :(
     
    mynameisdi, Mar 22, 2009 IP
  5. aaron d.

    aaron d. Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If your admin already uses fckeditor, then you are best heading off to their website to see some usage examples, so you can figure out how to implement it on other pages. http://www.fckeditor.net/
     
    aaron d., Mar 22, 2009 IP