PDA

View Full Version : PHP Questions


lenrapp
07-22-2002, 03:05 PM
Hi Again;

Well we are moving along with our little web site which is now live. You can see it at: http://hedgeco.net

When I was told the programmer wanted to change our web site which was written in ASP to PHP, she never mentioned that I would no longer be able to edit or change the pages in HTML (Dreamweaver) as I was able to do with the ASP pages.

So now I have a web site that I can't even go in and change a simple image. This makes the web site almost worthless to me since I would now have to have the programmer make all the changes.

Is there easy to use software that will enable me to easily make these changes myself or do I now have to pay another programmer to redo this site a third time.

I have done a number of web searches and book marked a bunch of sites that offer PHP help, but not being familiar with programming, I fear I will be at a loss....any help would be greatly appreciated.

Aya
07-22-2002, 06:21 PM
Do you know which method she used to do it? I do PHP two ways (any expert out there may feel free to tell me if I'm doing it the hard way, I don't claim to be an expert :P).

1 - With include files:
<?php
include("header.inc");?>
All your plain text goes here...blah blah blah.
<?php
include("footer.inc");
?>
Header.inc includes all your CSS and heading code. Footer just closes any tables or what have you.

2 - Include a template in the actual link.
http://yourdomain.com/index.php?x=about.html

Both ways would allow you to easily edit your site. On the second one, you'd just have to edit the "about.html" and not worry about any of the other coding. Helps maintain consistency throughout the whole site. So the second way would probably be ideal for Dreamweaver.

Chris
07-26-2002, 04:11 PM
I'd just say open the files with notepad, and then search for the image that you need to change.

Such as downloading (via means of FTP) the main file (Most likely index.php) and searching for the string "images/sep.gif" and it will bring you to the first line that uses it, and then to the next and so on. Aside from the other commands that you can do in PHP, the print() command is normally what prints the HTML.

pete3005
07-26-2002, 04:21 PM
Len,

Buy a book on PHP, first off PHP isn't too difficult to learn a book like Wrox Press Beginning PHP or SAMS PHP and MySQL Web Development will get you up and running in a matter of hours.

The HTML will be in the PHP code, something like

<?php

echo "<img src=\"pic.jpg\">";
?>

Spending 10 hours reading the first few chapters in either book will be well worth it. Your programmer hasn't done anything wrong, if you use a server side language to dynamically create HTML then you can't expect to edit pages in DW.

If your businesses rely on websites then investing a little time learning how to handcode HTML and learning the basics of PHP is essential. You don't need to know much PHP to be able to make some pretty complex web apps.

HTH

Pete

harmonic
07-28-2002, 07:03 AM
http://php.net

along with a book, reading the manual, and using it for function references will help you big time.

also a nifty feature is if you type in php.net/thing, it will look for the functiong "thing", (ie the function "in_array()" can be found at http://www.php.net/in_array )