Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

forms and PHP

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
grogoreo



Joined: Tue Apr 12, 2005 7:46 pm
Posts: 11
Location: www.grogoreo.co.uk

PostPosted: Sat May 14, 2005 4:27 pm    Post subject: forms and PHP Reply with quote

hi

I'm trying to make a sort of CMS for a site, in PHP, and am working on the backend. What I want is when a user goes to edit or create a new item, such as a news item, they will not have to code any HTML, or not a lot. What I'm thinking of is something like this forums post submitting form. One of the main things I want is when a carrage return is entered in the form, it will add one in the submitted HTML code. I looked at the source of the phpBB forum and found a bit where I think may do it, something like stripslashes. The text will then be entered into a MySQL database.

I would love a Rich Edit type form like you would in Word or Hotmail etc but that may be a bit much.

Thanks,
Greg
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
skecs



Joined: Fri Apr 22, 2005 10:22 am
Posts: 76
Location: Bathurst, NSW Australia

PostPosted: Sun May 15, 2005 9:13 am    Post subject: PHP & MySQL Web Development Reply with quote

The best book I know on this is PHP & MySQL Web Development by Luke Welling & Laura Thomson - I think it is up to 3rd Edition now. I have used the forums and other sections and they all work quite well.

Capter 26 (in 2nd Edition) is called "Building a Content Management System" which should make it easy for you.

Have you also considered using one of the Open Source CMS like Mambo, phpWebSite or PostNuke like the LXF web site?
_________________
Regards from
Downunder!
.... _
... (0)>
... / /\
.. / / .)
.. V_/_
Linux Powered!
Back to top
View user's profile Send private message
grogoreo



Joined: Tue Apr 12, 2005 7:46 pm
Posts: 11
Location: www.grogoreo.co.uk

PostPosted: Mon May 16, 2005 4:44 pm    Post subject: RE: PHP & MySQL Web Development Reply with quote

Thanks skecs. I'll look into getting that book. I didn't want to use a CMS allready made as with a bespoken one I will learn on the way and also I've found that the design of the page is hindered and can not be what I really like, as you have to use a template or something.

Thanks again,
Greg
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gordon
LXF regular


Joined: Thu Apr 07, 2005 6:01 pm
Posts: 209
Location: Bradford, West Yorkshire

PostPosted: Mon May 16, 2005 8:57 pm    Post subject: RE: PHP & MySQL Web Development Reply with quote

Hi Skecs, neat sig Shocked
_________________
Violence is the last refuge of the incompetent
Back to top
View user's profile Send private message Yahoo Messenger
gizard



Joined: Wed Apr 13, 2005 6:24 pm
Posts: 5

PostPosted: Wed May 18, 2005 5:36 pm    Post subject: RE: PHP & MySQL Web Development Reply with quote

with most thing, they take a while to code. Think about creating an object that gets passed a string and replaces \r with <br />
Also have a look at: http://www.fckeditor.net/demo/default.html
and http://www.blackboard.com/ to get a look at whats possible.

You can also simply enter the data into a database and print out to the right sections. I.e. Header, body.
and in the body, insert the <pre> </pre> tags. Ugly but works if your after a simple solution.
Gizard
http://www.gbdesign.net/index.php?page=erp GBDesign - Data driven ERP web solutions for SME
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
kpzani



Joined: Thu Jun 09, 2005 9:52 pm
Posts: 9

PostPosted: Thu Jun 09, 2005 9:58 pm    Post subject: Answers Reply with quote

First thing

you can convert enters in a text field to <br>s with nl2br($_POST["textfield"]);

next. addslashes will escape any funny quotes either " or ' in the text

htmlspecialchars will convert & to &amp; and " to &quot; etc.

for the gui editor you can build your own there's info on the mozilla site
http://devedge-temp.mozilla.org/viewsource/2003/midas/01/index_en.html
http://www.mozilla.org/editor/midas-spec.html
http://www.mozilla.org/editor/midasdemo/

if you are going to be using php then you are welcome to the source code from my internal CMS, if you're interested email me kriszani@iscavision.com
and i'll give you the url plus a temp username / password for a demo, if you like it then i'll make a copy minus usernames and passwords.

good luck

Kris
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast