Click to See Complete Forum and Search --> : Books


Jonathan
08-04-2003, 12:25 PM
Does anyone know of any good CGI books from www.barnesandnobel.com?

goofball
08-04-2003, 04:10 PM
"Sams Teach Yourself PERL in 21 Days"

go to bn.com and do a KEYWORD search for: 0672320355

Jonathan
08-04-2003, 04:11 PM
What can perl do?

pyro
08-04-2003, 04:21 PM
When one says CGI, most of the time people think Perl, as that is the most common language to write CGI script in. CGI scripts can also be written in PHP, C, and a host of other languages. If I ever do CGI programming (which is rare) I use Perl, but I use PHP for most of my server side programming. Basically, Perl is a full fleadged programming language making it more powerful than PHP, but it has a steeper learning curve.

"What can Perl do" is a hard question to answer, because it can do so much. Counters, Guestbooks, Forums, Form Handlers, etc... Basically, it can do the same things that other serverside languages can do -- interact with the server.

Jonathan
08-04-2003, 04:23 PM
My focus right now is a shopping cart, either making one on my own or using FrontPage so what lang. would you suguest?

pyro
08-04-2003, 04:32 PM
I'm a great fan of PHP, so I would, of course, recommend using that, but it could also be done in Perl, ASP, JSP, etc. I'd recommend starting with smaller projects, though. A shopping cart is more complex than a beginner is going to want to tackle. First, learn the language of your choice, then make the shopping cart...

Jonathan
08-04-2003, 04:36 PM
I know PHP, HTML, Javascript, and CSS. Now, how do I make a shopping cart with PHP? Dont you need a CGI script?

Charles
08-04-2003, 04:43 PM
Originally posted by Jonathan
What can perl do? That's an easy question because Perl can do everything. And it can do everything because it's modular and because a vast army of generous programmers with way too much time on their hands have made available a huge library of modules.

Jonathan
08-04-2003, 04:44 PM
oh

but do you have any suguestions, or can you answer my last post?

pyro
08-04-2003, 04:46 PM
You know it, or you are learning it? There is a big difference...

PHP doesn't need CGI to make a shopping cart. It is capable by itself, though it would be much more effective with a database, such as mySQL.

Jonathan
08-04-2003, 04:48 PM
I know it farely well
<?
print Hi
?>

:)

So you are saying I should make a shopping cart with php and mysql... how do i do that?!

pyro
08-04-2003, 04:53 PM
That should be:

<?PHP
echo "Hi";
?>

;)

And your questions is very broad... As I stated earlier, a shopping cart is going to take a farily good grasp of PHP and mySQL (or some other database language). Perhaps you'd like to take a look at some of the scripts at http://php.resourceindex.com/Complete_Scripts/Shopping_Carts/ to see what others have done.

Jonathan
08-04-2003, 04:55 PM
okay, but do you have any ideas on books for my-sql..

and

isn't

<?PHP
print Hi;
?>

correct?

pyro
08-04-2003, 05:01 PM
Nope, it must be enclosed in quotation marks...

I have the Visual QuickStart Guide on MySQL by Larry Ullman. http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=2UUWGN8XYA&isbn=0321127315&itm=16

Jonathan
08-04-2003, 05:04 PM
but it is the print command... and

OH... wait... oops

<?
$sorry = Sorry, pyro... mixed them up
print $sorry
?>

how would i put 2 of those together? like real text and a variable?

print "Hi $person";

that right?

or how does the echo command go?

nkaisare
08-04-2003, 05:14 PM
Jonathan, reading your previous few replies, I am tempted to quote pyro
You know it, or you are learning it? There is a big difference...

Start small. Learn as you go along.

Shopping cart can be done in PHP, ASP, Perl, JSP, just about any server side language. You will have to learn at least one of them really well to implement a project like shopping cart.

Note: Assumption here is that your shopping cart is not a CS-101 course shopping cart with 5 items, 1 form and 2 cgi pages. Its bigger project than that

pyro
08-04-2003, 05:16 PM
Ok, you are learning PHP... Got it... ;)

This:

<?
$sorry = Sorry, pyro... mixed them up
print $sorry
?> Would need to be:

<?
$sorry = "Sorry, pyro... mixed them up";
print $sorry;
?>at bare minimum, though I never use short tags, and don't recommend doing so. I would use <?PHP to open any php tags. Why? Because short tags can be disabled in the php.ini file, causing the script you just wrote for your server to not function on your friends. So, any text string MUST be encapsulated with quotes, and every line of PHP must end with a semicolon (barring, of course, lines the begin functions, etc...)

And, to combine variables and text, you can do it with the method you mentioned, but only if you use double quotes to encapsulate your string. If you useprint 'Hi $var'; the output will be Hi $var, rather than Hi (the value assigned to $var). So, another way to include text and variables is to use the concatenater opperand to concatenate your text and variables. Take a look at this:

<?PHP
$var = "pyro";
echo "Hi ".$var;
?>That will print Hi pyro, and would print the same if you used single quotes to encapsulate the text part of the string.

Jonathan
08-04-2003, 05:17 PM
I was just kiddin... geez..

Jonathan
08-04-2003, 05:19 PM
But thank you... i usually get confused with which is which

nkaisare
08-04-2003, 05:20 PM
Originally posted by Jonathan
I was just kiddin... geez..
Yeah, I have a problem... I take myself a lil too seriously :)

Jonathan
08-04-2003, 05:22 PM
:)

pyro
08-04-2003, 05:23 PM
And, one of my pet-peeves is people saying the "know" a language when they really do not... ;) Hope no offence was taken by my replies.

Jonathan
08-04-2003, 05:24 PM
lol... i have tears ... i am being flooded by the overwhelming pain of pyro's posts

Jeff Mott
08-06-2003, 10:45 PM
"Sams Teach Yourself PERL in 21 Days"This doesn't hope to tell you everything you need to know about Perl. And, to be honest, if you really think you're going to truly learn Perl, or any other programming language, in 21 days then you are just dreaming. It takes as long as it takes. A general rule of thumb I have found in regards to books: I would always avoid anything that claimed to teach me a skill in a certain number of days, weeks or months or any book where the title proclaimed that the intended readers were in any way mentally challenged.

The best resource for Perl books is at http://learn.perl.org/. Some of these are authored by Perl's inventor. Others by active developers of Perl. You probably won't need all of these though. Your best choice is probably Learning Perl (3rd ed) for an into, which should be enough to be able to understand the (free) documentation. http://www.perldoc.com/

goofball
08-07-2003, 08:14 AM
Definately agree. There's no way you're going to totally learn Perl in 21 days (unless you're the Lawnmower Man)
But I suggested the book because it uses language & a style that makes it easy for beginners in Perl.
You should definately bookmark those 2 sites that Jeff mentioned.
I also like http://www.perlmonks.org/