Re: Introduction of newbie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mogens,

I'm a bit ahead of you on the PHP curve, but that does not make me an 
expert... but here are some thoughts from a fellow amatuer...

First thing to recognize is that PHP is a server-side scripting 
language, meaning that PHP interacts with the web server (e.g. Apache). 
When the web server sees a file extension of .php (or .php3, or 
whatever) it passes the page to PHP to parse all the <?php ... ?> 
(and/or <? ... ?>) parts. EVERYTHING between <?php ... ?> must be in PHP 
syntax.  PHP parses and processes these parts, and REPLACES them with 
html, which the web server then returns to the client browser.

PHP has a built-in interface to MySQL database (and others, including 
ODBC.)  In order to minimize the tedious and repetitious code to connect 
PHP to the database, fetch rows, process error conditions, and 
disconnect, someone has written (or more likely, downloaded) a PHP 
Class, which I think of as a series of functions.  After you play with 
PHP for a little while, I think you will be able to pretty well figure 
out how the class is currently being used... and it's probably unlikely 
you'll have to change much, except possibly for queries, but that should 
be fairly apparent after a bit of tail-chasing.

Rather than write your own page to access the data, I suggest looking 
into PhpMyAdmin.  It is an open-source PHP-based set of utility pages 
that allow you to do almost anything against a MySQL database, e.g. 
create / alter DB objects, issue queries, insert rows, etc.

The book I got started with PHP/MySQL is the Sitepoint book "Build Your 
Own Database-Driven Website Using PHP & MySQL"... I liked it 'cuz it 
starts at the beginning.

Hope this helps, at least a little,
Paul


Mogens Eliasen said the following on 3/30/2006 11:56 PM:
> Hi all - I am Mogens from BC in Canada - and I now realize that I have
> to learn this PHP thing, as I am left with a web site that uses it -
> with the programmer gone....  and, I need to make some changes and
> improvements....
>
> I am pretty good with HTML - but PHP has thrown me completely off....
> I have no clue where to begin.  I can make a little meaning out of
> some of teh code on my pages, but not at all enough to understand what
> is actually going on.   I bought some books and e-books about it,
> hoping to learn this - but I have yet to find anything that makes
> sense, WITHOUT assuming that I am a full-time professional tech who
> makes a living on maintaining a commercial web server...
>
> I have a database (MySQL) connected to my web site, and an affiliate
> program running that uses it - and it works.
>
> The tasks I am looking at includes what I believe are very simple
> tasks, like:
>
> - I need to be able to read a value in the database and display it on
> a web page that is in .php format with html coding;  I refuse to
> believe that I need to read a 600-page book in order to that...
>
> - I need to make a web page for myself that will allow me to search in
> the database for all purchases made by a given customer;  this one, I
> acknowledge, could be more cumbersome, as it deals with more than one
> parameter.
>
> - I need to use the above to do stats and math on the data; tis is
> less urgent, but it will be important for me later.
>
>
> I found a web page that appears to cover quite a bit of what I am
> looking for.  It is called a PHP CLASS - whatever that means.  The URL
> is http://www.phpclasses.org/browse/package/2943.html - it contains no
> explanations in regards to what it is and how it works.
>  
> It this where I should start?  Or will that just lead me into more
> frustrations?  Where do I find an overview of the terminology, so
> pages like this are a little better than Greek to me?
>
> Any ideas and suggestions are certainly welcome.
>
> Cheers,
>
> Mogens
>
>
>
>
>
>
>
>
>
>
> PHP Data object relational mapping generator
> http://www.metastorage.net/
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "php-objects
>       <http://groups.yahoo.com/group/php-objects>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        php-objects-unsubscribe@xxxxxxxxxxxxxxx
>       <mailto:php-objects-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>


PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux