I'm not new to Perl or CGI but I haven't used a "real" database before. I'm accustomed to DB_File actually.

I had a client come up to me today and asked if I could rewrite a very small PHP site into CGI because their PHP programmer "vanished" and someone referred them to me for my work in CGI.

The site is really small, it's just a sign in form, sign up form, and a few mini things like this. The only thing I can't do right now is the SQL part.

How difficult would it be for me to find out how to store and retrieve specific fields from an SQL database? There are only a few things such as: username, password, name, etc. The database is already setup with their current user information, all I need to do is come up with a CGI version of everything.

Would it be difficult to just find out what I need to know in order to use the premade SQL database on this project? Do you think it would be similar to the code the PHP script is already using?


In reply to SQL- for starters by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.