Should I?

Discussion in 'HTML' started by auntie_biotic, Nov 27, 2004.

  1. As you will see from my website. I am self taught and have just about
    mastered the basics of html. I have even less knowledge of cgi but have
    managed a message forum. I have just been told by my web hosting that PHP
    and mysql are now provided.

    My question is due to lack of time and funds which would I be better off
    learning more about to further my site.
    CGI, PHP or mysql. I am thinking of purchasing a "For Dummies or Learn in
    24 Hours" book on one of the subjects from Amazon

    PS: Is it true that PHP and CGI do the same things?

    I apologise if posting in the wrong area.
    Thanks in advance.

    Website http://www.tbandu.co.uk
    Message board http://www.tbandu.co.uk/cgi-bin/teemz/teemz.cgi
     
    auntie_biotic, Nov 27, 2004
    #1
    1. Advertising

  2. auntie_biotic wrote:

    > As you will see from my website.  I am self taught and have just about
    > mastered the basics of html.


    http://validator.w3.org/check?verbose=1&uri=http://www.tbandu.co.uk/
    http://www.allmyfaqs.com/faq.pl?Tableless_layouts
    http://css-discuss.incutio.com/?page=UsingPoints

    > My question is due to lack of time and funds which would I be better off
    > learning more about to further my site.
    > CGI, PHP or mysql.


    MySQL is a common database.

    CGI is a way for a webserver to get a resource from the output of a program
    instead of reading a static file. Often when people say "CGI" they really
    mean "Perl accessed using CGI".

    PHP is a programming language.

    In the context of the web, you'll find MySQL pretty useless without PHP,
    Perl CGI, or some other server side programming environment.

    > PS: Is it true that PHP and CGI do the same things?


    No. PHP is a programming language that is usually (but not always) used on a
    server to generate HTML documents on the fly. It can also be used outside
    the context of a webserver for more general programming. PHP is usually
    installed as a module for the webserver, but it can also be used through
    CGI.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #2
    1. Advertising

  3. auntie_biotic

    Toby Inkster Guest

    auntie_biotic wrote:

    > My question is due to lack of time and funds which would I be better off
    > learning more about to further my site.
    > CGI, PHP or mysql.


    If you already know some CGI (by which I assume you mean Perl) then keep
    going with that, and bring MySQL into the mix -- there is a rather good
    Perl module to let Perl talk to MySQL.

    > PS: Is it true that PHP and CGI do the same things?


    They are different ways of achieving much the same effect.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Nov 27, 2004
    #3
  4. "David Dorward" <> skrev i meddelandet
    news:coauio$ata$1$...
    > auntie_biotic wrote:
    >
    > > As you will see from my website. I am self taught and have just about
    > > mastered the basics of html.

    >
    > http://validator.w3.org/check?verbose=1&uri=http://www.tbandu.co.uk/
    > http://www.allmyfaqs.com/faq.pl?Tableless_layouts
    > http://css-discuss.incutio.com/?page=UsingPoints
    >
    > > My question is due to lack of time and funds which would I be better off
    > > learning more about to further my site.
    > > CGI, PHP or mysql.

    >
    > MySQL is a common database.
    >
    > CGI is a way for a webserver to get a resource from the output of a

    program
    > instead of reading a static file. Often when people say "CGI" they really
    > mean "Perl accessed using CGI".
    >
    > PHP is a programming language.
    >
    > In the context of the web, you'll find MySQL pretty useless without PHP,
    > Perl CGI, or some other server side programming environment.
    >
    > > PS: Is it true that PHP and CGI do the same things?

    >
    > No. PHP is a programming language that is usually (but not always) used on

    a
    > server to generate HTML documents on the fly. It can also be used outside
    > the context of a webserver for more general programming. PHP is usually
    > installed as a module for the webserver, but it can also be used through
    > CGI.


    What are the main disadvantages or advantages to use Perl instead of php to
    send data to a database and viceversa?

    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk
    http://www.scaiecat-spa-gigi.com/sv/stora-herrskor-fran-italien.html
     
    Luigi Donatello Asero, Nov 27, 2004
    #4
  5. auntie_biotic wrote:

    > As you will see from my website.  I am self taught and have just about
    > mastered the basics of html.


    http://validator.w3.org/check?verbose=1&uri=http://www.tbandu.co.uk/
    http://www.allmyfaqs.com/faq.pl?Tableless_layouts
    http://css-discuss.incutio.com/?page=UsingPoints

    > My question is due to lack of time and funds which would I be better off
    > learning more about to further my site.
    > CGI, PHP or mysql.


    MySQL is a common database.

    CGI is a way for a webserver to get a resource from the output of a program
    instead of reading a static file. Often when people say "CGI" they really
    mean "Perl accessed using CGI".

    PHP is a programming language.

    In the context of the web, you'll find MySQL pretty useless without PHP,
    Perl CGI, or some other server side programming environment.

    > PS: Is it true that PHP and CGI do the same things?


    Not really. PHP is a programming language that is usually (but not always)
    used on a server to generate HTML documents on the fly. It can also be used
    outside the context of a webserver for more general programming. PHP is
    usually installed as a module for the webserver, but it can also be used
    through CGI.

    So PHP can do the same job as CGI, but it doesn't have to. (Of course any
    decent programming language can do the same things that PHP can do - but
    CGI is explicitly there for communicating between the webserver and some
    program)

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #5
  6. auntie_biotic

    Mitja Guest

    On Sat, 27 Nov 2004 22:32:04 +0000, David Dorward <>
    wrote:

    >> My question is due to lack of time and funds which would I be better off
    >> learning more about to further my site.
    >> CGI, PHP or mysql.

    > MySQL is a common database.


    > CGI is a way for a webserver to get a resource from the output of a
    > program
    > instead of reading a static file. Often when people say "CGI" they really
    > mean "Perl accessed using CGI".

    Or sometimes more correctly (though still not completely correctly) "just
    about any program accesed through CGI"


    > In the context of the web, you'll find MySQL pretty useless without PHP,
    > Perl CGI, or some other server side programming environment.

    To the OP: this is because you have to acces the base somehow and convert
    the "raw" results to a pretty-looking html page. So learn PHP first, later
    on you'll use it to acces the MySQL database (using the SQL language, but
    that one is quite simple).

    >> PS: Is it true that PHP and CGI do the same things?

    >
    > Not really. PHP is a programming language that is usually (but not
    > always) used on a server to generate HTML documents on the fly. It can
    > also be used outside the context of a webserver for more general
    > programming. PHP is
    > usually installed as a module for the webserver, but it can also be used
    > through CGI.

    Agreed.
    OP: You needn't worry about how is the way php is installed on your server
    called, just refer to host's instructions on how to actually use php
    scripts (once the're written).

    > So PHP can do the same job as CGI, but it doesn't have to. (Of course any
    > decent programming language can do the same things that PHP can do - but
    > CGI is explicitly there for communicating between the webserver and some
    > program)

    Now I find this a bit confusing. CGI stands for Common Gateway _Interface_
    - it is a way of accessing programs, not a program or programming
    language. It can't "do" anything.
    See also http://www.google.com/search?q=cgi definition


    --
    Mitja
     
    Mitja, Nov 27, 2004
    #6
  7. auntie_biotic

    Mitja Guest

    On Sat, 27 Nov 2004 22:25:20 GMT, Luigi Donatello Asero
    <> wrote:

    > What are the main disadvantages or advantages to use Perl instead of php
    > to send data to a database and viceversa?

    There are none - both use the same underlying system, i.e. the same
    database server. Use what you're more familiar with. If you're choosing
    between perl and php, I recommend the latter - somewhat less powerful, but
    easier and cleaner.



    --
    Mitja
     
    Mitja, Nov 27, 2004
    #7
  8. Luigi Donatello Asero wrote:

    > What are the main disadvantages or advantages to use Perl instead of php
    > to send data to a database and viceversa?


    Perl DBI (the standard way to access databases in Perl) is the easiest and
    most elegant relational database abstraction layer I've encountered. (And
    you have such things as Class::DBI to futher abstract it if you wish).

    I've always found the internal PHP database handing routines to be a pain to
    work with, especially once you start dealing with things such as magic
    quotes (are they on or off?). There is probably something in PEAR to make
    it nicer, but its been a few years since I had to write anything in PHP
    that connected to a database so my experience is a bit out of date.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #8
  9. Mitja wrote:

    > There are none - both use the same underlying system, i.e. the same
    > database server. Use what you're more familiar with. If you're choosing
    > between perl and php, I recommend the latter - somewhat less powerful, but
    > easier and cleaner.


    I'd say Perl was cleaner and, while harder to get started with, somewhat
    easier to master.

    Isn't opinion nice?

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #9
  10. Mitja wrote:

    >> So PHP can do the same job as CGI, but it doesn't have to. (Of course any
    >> decent programming language can do the same things that PHP can do - but
    >> CGI is explicitly there for communicating between the webserver and some
    >> program)


    > Now I find this a bit confusing.


    CGI is a means by which a server gets dynamically generated data.

    PHP can be a means by which a server gets dynamically generated data
    (although it does the dynamic generation internally)

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #10
  11. "David Dorward" <> skrev i meddelandet
    news:cob0bo$cf6$1$...
    > Luigi Donatello Asero wrote:
    >
    > > What are the main disadvantages or advantages to use Perl instead of php
    > > to send data to a database and viceversa?

    >
    > Perl DBI (the standard way to access databases in Perl) is the easiest and
    > most elegant relational database abstraction layer I've encountered. (And
    > you have such things as Class::DBI to futher abstract it if you wish).
    >
    > I've always found the internal PHP database handing routines to be a pain

    to
    > work with, especially once you start dealing with things such as magic
    > quotes (are they on or off?). There is probably something in PEAR to make
    > it nicer, but its been a few years since I had to write anything in PHP
    > that connected to a database so my experience is a bit out of date.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is


    Thank you for your answers.
    It was nice to hear different points of view.
    Actually, I have already read a bit about
    Perl and PHP,
    but I need learn much more.
    Which sites and books would you advice for Perl and which for PHP?


    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk
    http://www.scaiecat-spa-gigi.com/sv/stora-herrskor-fran-italien.html
     
    Luigi Donatello Asero, Nov 27, 2004
    #11
  12. Luigi Donatello Asero wrote:

    > Which sites and books would you advice for Perl


    Learning Perl: http://www.amazon.co.uk/exec/obidos/ASIN/0596001320/
    http://learn.perl.org/

    > and which for PHP?


    I haven't found a good book on PHP. The online manual isn't too bad
    (although its ignorance about HTML is frightening: "The
    arg_separator.output php.ini directive allows to customize the argument
    seperator. For full XHTML conformance, specify &amp; there." (Of course you
    have to express & as &amp; in HTML as well as XHTML - so why on earth is &
    the default?! This is a pet hate of mine.)

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #12
  13. "David Dorward" <> skrev i meddelandet
    news:cob30s$e0n$1$...
    > Luigi Donatello Asero wrote:
    >
    > > Which sites and books would you advice for Perl

    >
    > Learning Perl: http://www.amazon.co.uk/exec/obidos/ASIN/0596001320/
    > http://learn.perl.org/
    >
    > > and which for PHP?

    >
    > I haven't found a good book on PHP. The online manual isn't too bad
    > (although its ignorance about HTML is frightening: "The
    > arg_separator.output php.ini directive allows to customize the argument
    > seperator. For full XHTML conformance, specify &amp; there." (Of course

    you
    > have to express & as &amp; in HTML as well as XHTML - so why on earth is &
    > the default?! This is a pet hate of mine.)


    Which online manual?



    www.php.net ?

    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk
    http://www.scaiecat-spa-gigi.com/sv/boendeiitalien.html
     
    Luigi Donatello Asero, Nov 27, 2004
    #13
  14. Luigi Donatello Asero wrote:
    > Which online manual?
    > www.php.net ?


    Yes

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 27, 2004
    #14
  15. auntie_biotic

    Art Sackett Guest

    David Dorward <> wrote:

    > CGI is a means by which a server gets dynamically generated data.


    If I might, and without any desire or intent to step on any toes:

    RFC3875 says:

    1.1. Purpose

    The Common Gateway Interface (CGI) [22] allows an HTTP [1], [4]
    server and a CGI script to share responsibility for responding to
    client requests. The client request comprises a Uniform Resource
    Identifier (URI) [11], a request method and various ancillary
    information about the request provided by the transport protocol.

    The CGI defines the abstract parameters, known as meta-variables,
    which describe a client's request. Together with a concrete
    programmer interface this specifies a platform-independent interface
    between the script and the HTTP server.

    The server is responsible for managing connection, data transfer,
    transport and network issues related to the client request, whereas
    the CGI script handles the application issues, such as data access
    and document processing.

    If your definition of "dynamically generated" happens to include
    "anything that's the output of a program", you'd be correct. OTOH, if
    the act of opening and outputting the content of a static text file is
    not within the scope of your definition of dynamically generated, then,
    well... a bit less correct, perhaps.

    --
    Art Sackett,
    Patron Saint of Drunken Fornication
     
    Art Sackett, Nov 28, 2004
    #15
  16. auntie_biotic

    Art Sackett Guest

    Mitja <> wrote:

    > If you're choosing
    > between perl and php, I recommend the latter - somewhat less powerful, but
    > easier and cleaner.


    I'm with Mr. Dorward: Perl is cleaner. But I'll add the qualifier, "...
    depending upon who wrote it." I've seen some terribly obfuscated perl,
    but then again, I've seen some truly elegant, easy to read perl, too.

    Ever since PERL5 brought us the ability to do OO, I've seen lots more
    elegant, easy to read perl.

    One of the great things about perl is that it allows (but doesn't
    force) us to isolate code from markup. This way, the programmers can
    focus on writing great code, the web designers can focus on creating
    great web sites, and neither has to know the other's business. This is
    how I've been writing my CGI (and mod_perl) apps for years, and it
    works great. Sometimes it's a challenge to get the web designers' heads
    wrapped around the concept of templates, but once the magical click
    happens, it's a breeze. And it's nice on the web design front to be
    able to totally change the look of the site without ever touching
    software.

    <plug mode="shameless">I'm available today if anyone's interested in
    some custom CGI. A major client just postponed a project...</plug>

    --
    Art Sackett,
    Patron Saint of Drunken Fornication
     
    Art Sackett, Nov 28, 2004
    #16
  17. auntie_biotic

    Phillip Parr Guest

    I used PHP and MySQL Web Development, 3rd Edition by welling and thomson
    which was fantastic. It teaches you both from beginner to advanced, and
    leaves you being able to do pretty much anything.

    Phil

    "David Dorward" <> wrote in message
    news:cob30s$e0n$1$...
    > Luigi Donatello Asero wrote:
    >
    >> Which sites and books would you advice for Perl

    >
    > Learning Perl: http://www.amazon.co.uk/exec/obidos/ASIN/0596001320/
    > http://learn.perl.org/
    >
    >> and which for PHP?

    >
    > I haven't found a good book on PHP. The online manual isn't too bad
    > (although its ignorance about HTML is frightening: "The
    > arg_separator.output php.ini directive allows to customize the argument
    > seperator. For full XHTML conformance, specify &amp; there." (Of course
    > you
    > have to express & as &amp; in HTML as well as XHTML - so why on earth is &
    > the default?! This is a pet hate of mine.)
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
     
    Phillip Parr, Nov 28, 2004
    #17
  18. auntie_biotic

    Mitja Guest

    On Sat, 27 Nov 2004 23:06:52 +0000, David Dorward <>
    wrote:

    > I'd say Perl was cleaner [than PHP] and, while harder to get started
    > with, somewhat
    > easier to master.
    >
    > Isn't opinion nice?


    Sure it is :)
    I must admit that I only got started with both PHP and Perl, just enough
    for a quick fix or two in existent scripts. But I have seen quite more
    than just one programmer's code in both languages, and still think php is
    easier to read... Ah well. While we're at it, when it comes to readability
    and general language ideology, I'm for Python anyway.


    --
    Mitja
     
    Mitja, Nov 28, 2004
    #18
  19. "Mitja" <> skrev i meddelandet
    news:eek:psh6ahdh8dob4us@localhost...
    > On Sat, 27 Nov 2004 23:06:52 +0000, David Dorward <>
    > wrote:
    >
    > > I'd say Perl was cleaner [than PHP] and, while harder to get started
    > > with, somewhat
    > > easier to master.
    > >
    > > Isn't opinion nice?

    >
    > Sure it is :)
    > I must admit that I only got started with both PHP and Perl, just enough
    > for a quick fix or two in existent scripts. But I have seen quite more
    > than just one programmer's code in both languages, and still think php is
    > easier to read... Ah well. While we're at it, when it comes to readability
    > and general language ideology, I'm for Python anyway.



    What about Java?
    Java is used on the client side, isn´t it?
    Is it not possible to send data to a data base by using Java?
    And, as you mentioned Python, you may want to recommend a site and/or a
    book about it.

    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk
    http://www.scaiecat-spa-gigi.com/
     
    Luigi Donatello Asero, Nov 28, 2004
    #19
  20. Mitja wrote:

    > I must admit that I only got started with both PHP and Perl, just enough
    > for a quick fix or two in existent scripts. But I have seen quite more
    > than just one programmer's code in both languages


    That's just coding style. You can write obfuscated code in PHP and Perl, and
    you can write clean code in both too.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 28, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathew George
    Replies:
    1
    Views:
    2,382
  2. CM
    Replies:
    1
    Views:
    508
    Ed Kaim [MSFT]
    Oct 14, 2003
  3. ~~~ .NET Ed ~~~

    How should control images should be handled?

    ~~~ .NET Ed ~~~, Oct 31, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    253
    John Saunders
    Nov 3, 2004
  4. Josef 'Jupp' SCHUGT

    What the FAQs should and should not contain

    Josef 'Jupp' SCHUGT, Aug 19, 2005, in forum: Ruby
    Replies:
    0
    Views:
    206
    Josef 'Jupp' SCHUGT
    Aug 19, 2005
  5. botp
    Replies:
    6
    Views:
    230
    Joel VanderWerf
    Oct 5, 2010
Loading...

Share This Page