#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    New to PHP & confused!


    Hi all,
    thanks for being here because I could use some help.
    I hope this is not a really dumb question, but here goes anyway.

    I've recently purchased a PHP scrip for a classifieds ads website for my small local community.

    I've never worked with a PHP website script before, and I'm confused, here's my problem. When I logon to my server and view my website files, I do not see any HTML files that I can actually download and work on using Dream Weaver. All files are PHP. When I download and open a PHP files in Dream Weaver, such as the index.php page, there's nothing there to work on other then the PHP script. How the heck can I work on my pages as HTML files so I can ad some pictures and links etc. to the pages?
    I know HTML Ok, and I've never had a problem working on my pages before, but If I can't see the actual HTML side of the pages, I can't work on them. What am I missing?
    I hope someone here knows what I'm talking about and can point me in the right direction. Thanks in advance for any help anyone can provide.
  2. #2
  3. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    PHP does not equal HTML.

    PHP produces HTML.

    So the answer to your question is, you can't. You can't open a PHP file and edit the HTML of your page. You can however learn PHP and use it to produce a page for you.

    That being said, your PHP file may contain bits of HTML that you can edit directly. It really just depends. It sounds like your best bet is to spend $20 on a book if you intend on doing this. Otherwise, spend $20 and have a someone else make a few simple edits for you.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    If the script is well designed it should have template or view files that define the appearance of the site. In most cases, those files will contain mostly HTML with PHP or some other language mixed in. Often, you can edit those files and as long as you leave the dynamic parts alone you should be OK without even really knowing PHP.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by E-Oreo
    If the script is well designed it should have template or view files that define the appearance of the site. In most cases, those files will contain mostly HTML with PHP or some other language mixed in. Often, you can edit those files and as long as you leave the dynamic parts alone you should be OK without even really knowing PHP.
    What you say is exactly what I thought it would or should be...I believe I've looked at every darn file within the site directory, I do not see any HTML files at all. Maybe I missed them somehow, I take another very close look later today. Here's what gets me, how the heck was this site even created if there's no way to work on the actual "appearance of the site" having said that, I did find a way to work on the pages. I went to the index.php page live on the net, when I view the page source on the internet, sure enough all the HTML code is there. So, I downloaded the page directly from the net, and saved it on my hard drive, as (index.html). When I open it up in Dreamweaver, then I can see the appearance of the page and can make changes to it, no problem. Then I just save it back as (index.php) again. Everything seems just fine when I upload the page and view it on the net. However, the page has a login feature, that login function no longer works!?

    Heck if I know???
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by E-Oreo
    If the script is well designed it should have template or view files that define the appearance of the site. In most cases, those files will contain mostly HTML with PHP or some other language mixed in. Often, you can edit those files and as long as you leave the dynamic parts alone you should be OK without even really knowing PHP.
    Ok, I went and took another good look at all my site files and folders, nowhere do I see any HTML files, so, that brings me to believe the script is NOT well designed!

    I now have a new question. Would it be expensive to hire someone who knows and understands these things well enough to do what ever is needed to the script, so I can work on the pages as regular HTML pages?
  10. #6
  11. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by billnebie
    What you say is exactly what I thought it would or should be...I believe I've looked at every darn file within the site directory, I do not see any HTML files at all. Maybe I missed them somehow, I take another very close look later today. Here's what gets me, how the heck was this site even created if there's no way to work on the actual "appearance of the site" having said that, I did find a way to work on the pages. I went to the index.php page live on the net, when I view the page source on the internet, sure enough all the HTML code is there. So, I downloaded the page directly from the net, and saved it on my hard drive, as (index.html). When I open it up in Dreamweaver, then I can see the appearance of the page and can make changes to it, no problem. Then I just save it back as (index.php) again. Everything seems just fine when I upload the page and view it on the net. However, the page has a login feature, that login function no longer works!?

    Heck if I know???
    Everything you're describing is exactly what should happen.

    Index.php is a PHP file that generates HTML and sends it to the user's browser when the page is requested. By viewing the page source, you are seeing that generated HTML. Saving that code will produce a page that looks identical. But since our are saving plain HTML back to a PHP file, you are removing all of the PHP functionality that makes the login system work.

    In other words, everything is working exactly as it should.

    If you only know HTML, you should not be trying to edit a PHP script. (At least, not without learning some about PHP.)
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  12. #7
  13. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by billnebie
    I now have a new question. Would it be expensive to hire someone who knows and understands these things well enough to do what ever is needed to the script, so I can work on the pages as regular HTML pages?
    It may be expensive. Rates can vary drastically.

    However, if you're wanting to use plain HTML, why don't you just drop the PHP script altogether? I'm guessing you can't because you need a login system? In which case, why don't you just hire a professional to do it for you.

    For best results, you should either learn PHP or hire someone and not be directly involved. Anything else will only make things more difficult.

    If you really want to have creative control, you should pay someone to convert your whole site over to a CMS system that is designed to allow this.
    Last edited by Nilpo; July 24th, 2013 at 10:09 AM.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  14. #8
  15. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by billnebie
    Would it be expensive to hire someone who knows and understands these things well enough to do what ever is needed to the script, so I can work on the pages as regular HTML pages?
    Just to clarify, you cannot edit a PHP script using a WYSIWYG HTML editor because PHP is not HTML. At a bare minimum, you would need to learn HTML properly to edit the code behind.

    Otherwise, my suggestion of having someone convert the whole site to a CMS would apply. Most CMS systems include a basic WYSIWYG editor.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by Nilpo
    Just to clarify, you cannot edit a PHP script using a WYSIWYG HTML editor because PHP is not HTML. At a bare minimum, you would need to learn HTML properly to edit the code behind.

    Otherwise, my suggestion of having someone convert the whole site to a CMS would apply. Most CMS systems include a basic WYSIWYG editor.
    Perhaps I will look into converting it to CMS. My site isn't very large. I wonder, are there people here on this Forum who may be interested in doing a conversion like this for me?
  18. #10
  19. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    Originally Posted by billnebie
    Perhaps I will look into converting it to CMS. My site isn't very large. I wonder, are there people here on this Forum who may be interested in doing a conversion like this for me?
    I'm sure there are. I might be interested. I'll PM you my contact info. I'm sure there are probably a few others who might be interested in taking a look at your project.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by Nilpo
    I'm sure there are. I might be interested. I'll PM you my contact info. I'm sure there are probably a few others who might be interested in taking a look at your project.
    I don't see a mailbox where you PM me?

    Like I said, my site is a classifieds ads site, I just launched it to the web about a month ago. It has over 100 registered members and about that many ads posted. I'm wondering if the registered members and posts would be retained if the site were converted to CMS? I'll go now and look around here for the PM mail...

    Oh, if you want to see the site go to Google or Yahoo and search on okanogan classifieds, my site will be at the top of the search results. It's name is the URL. Hope it's ok that I posted this part?
  22. #12
  23. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    You should be able to find your private message here.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!

IMN logo majestic logo threadwatch logo seochat tools logo