1 html code <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 html code "http://www.w3.org/TR/html4/strict.dtd">
5 html code <script type="text/javascript">
6 javascript comment // javascript comment
7 javascript code document.write("Hello World!")
9 html code <style type="text/css">
10 css comment /* css comment */
12 css code color: black;
17 html code <table cellSpacing=1 cellPadding=2 bgColor=black border=0>
18 html code <tr bgColor=white>
19 html code <td>First</td>
20 html code <td>Last</td>
21 html code <td>Email<td>
26 php comment ## Comment with a hash symbol ##
27 php code mysql_connect("localhost", "db user", "db pass")
28 php code or die("DB CONNECT ERROR: " . mysql_error());
30 php code mysql_select_db("db name")
31 php code or die("DB SELECT ERROR: " . mysql_error());
33 php code $query = "SELECT fname, lname, email FROM table ORDER BY lname";
35 php code $result = mysql_query($query)
36 php code or die("DB SELECT ERROR: " . mysql_error());
38 php code while($row = mysql_fetch_array($result))
40 php code $lname = $row['lname'];
41 php code $fname = $row['fname'];
42 php code $email = $row['email'];
44 php comment // Spaghetti code starts....(slopping html code in)
47 html code <tr bgColor=white>
48 php code <td><?=$fname?></td>
49 php code <td><?=$lname?></td>
50 php code <td><?=$email?><td>
55 php code } // end while
56 php comment // Spaghetti code is both a source of praise and complaints