Sign in with
Sign up | Sign in
Your question

PHP or Javascript needed?

Last response: in Business Computing
Share
November 2, 2011 8:43:16 PM

I don't even know how to explain this well, so please bear with me. I searched hotscripts.com, googling key words, but I can't find the right wording! Its driving me nuts...

I am a web designer, who doesn't use PHP. I can design some pretty kick-butt sites but I never dabbled in PHP. I designed a site for my customer, but he would like a feature that where he can type some notes and post it on his site, maybe in a side-bar or where-ever.

Is there any such script that I can try to install (try is the keyword - don't know much about it. All I know how to do is create a PHP database and associate a user with it. So if I find a script somewhere that allows my customer to post something using this PHP script, that would be awesome. I don't want his customers posting on it, just him - so I don't think a log-in box would work.

If he uploads a text file, with what he wants to show on his site, I can show him how to do that - but I don't know the coding how to set this up. Even if it doesn't have anything to do with PHP, what is the best way for this?

Sorry its such a long post - now you can see why I have no idea what to search for to seek assistance.

Thanks everyone!

More about : php javascript needed

November 11, 2011 8:07:40 PM

Hi chewyalf

I'm a PHP developer but what it sounds like is that you want almost a very basic CMS system which updates only one element. If this is the case then you could try simply loading a txt file in via an iFrame if you can grant the user access to FTP upload he can change the txt in this file and upload the changes each time. I've never tried this out but it sounds like it would work. Failing the iFrame (sometimes formatting issues), you could simply put in one line of code;

  1. <!-- your html code here -->
  2. <div class='side_message'>
  3.  
  4. <?php
  5.  
  6. echo file_get_contents('/path/to/textfile.txt');
  7.  
  8. ?>
  9.  
  10. </div>
  11. <!-- your html code here -->


Make sure that the page has either a .php extension (otherwise the code won't parse) or you've set all html/htm extensions to parse as php. (The former is easier)

Hope this helps.

Cheers
James
!