How to post the word "title" with a posts's title

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shiva3000
Forum Newbie
Posts: 3
Joined: Wed Aug 13, 2008 10:05 am

How to post the word "title" with a posts's title

Post by shiva3000 »

Hi All,

I'm sure this is a simple problem but I would appreciate any help. My site currently has a simple php form people use to post directly onto the site http://tobeperfectlyhonest.com/?page_id=3

The form works very well, but due to the formatting of my site, I need to have the title of the post prefaced by the words "To be perfectly honest." How do I accomplish this?

Thanks!
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Re: How to post the word "title" with a posts's title

Post by idevlin »

You mean when you are displaying what someone has posted on to the screen?

Erm, you can either just hard code it in the way you have on those pages, or when you save what they have posted, you can prefix it to the user's input before saving it.

Very simple, and not really much of a question, unless I am misunderstanding you?
shiva3000
Forum Newbie
Posts: 3
Joined: Wed Aug 13, 2008 10:05 am

Re: How to post the word "title" with a posts's title

Post by shiva3000 »

How would I prefix it into the user's input? Thanks!
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Re: How to post the word "title" with a posts's title

Post by idevlin »

Code: Select all

$content_title2 = "To be perfectly honest" . $content_title;
And then store the contents of $content_title2 to the database rather than $content_title.
shiva3000
Forum Newbie
Posts: 3
Joined: Wed Aug 13, 2008 10:05 am

Re: How to post the word "title" with a posts's title

Post by shiva3000 »

Thank you so much!
Post Reply