Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

First Scripting Language for Web

Name: Anonymous 2013-09-08 22:37

I want to get off my mind of C and ((Scheme)) for a while and learn a scripting language for the web. My professor asked me if I could do a Javascript job for him and I said, I'd have to learn it first.

I want to learn Javascript or CoffeeScript but since the latter is simply a transcompiler for the other, should I learn Javascript first before getting to Coffeescript? I heard Coffeescript often makes more optimized code than Javascript, what if I just learn Coffeescript and submit the transcompiled code to my professor?

Name: Anonymous 2013-09-21 18:32

>>27
The ``wrong'' information they give seems mostly to relate to PHP and MySQL, where you find atrocities like these in the first page where they cover insert statements:

<?php
$con=mysqli_connect("example.com","peter","abc123","my_db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$sql="INSERT INTO Persons (FirstName, LastName, Age)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";

if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "1 record added";

mysqli_close($con);
?>


Terrible! Something which is, of course, to be expected from anything related to PHP, but this one is specially bad.

Source: http://www.w3schools.com/php/php_mysql_insert.asp

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List