Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.59 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
  5. <?php
  6. $servername = "localhost";
  7. $username = "root";
  8. $password = "";
  9.  
  10. // Create connection
  11. $conn = new mysqli($servername, $username, $password);
  12.  
  13. // Check connection
  14. if ($conn->connect_error) {
  15. die("Connection failed: " . $conn->connect_error);
  16. }
  17. // echo "Connected successfully";
  18. ?>
  19. <?php
  20. $servername = "localhost";
  21. $username = "root";
  22. $password = "";
  23. $dbname = "test";
  24.  
  25. // Create connection
  26. $conn = new mysqli($servername, $username, $password, $dbname);
  27. // Check connection
  28. if ($conn->connect_error) {
  29. die("Connection failed: " . $conn->connect_error);
  30. }
  31. if (isset($_POST["header"]) && !empty($_POST["header"]) && isset($_POST["message"]) && !empty($_POST["message"]))
  32. {
  33. // echo "Yes, header is set";
  34. $sql = "INSERT INTO blog (header, message) VALUES ('".$_POST['header']."','".$_POST['message']."');";
  35. echo $sql;
  36. if ($conn->query($sql) === TRUE) {
  37. //echo "New record created successfully";
  38. } else {
  39. echo "Error: " . $sql . "<br>" . $conn->error;
  40. }
  41. }
  42. $conn->close();
  43. ?>
  44.  
  45. <head></head>
  46. <body>
  47. <div id="header">
  48. <div id="navbar">
  49. <ul>
  50. <a href="http://localhost/test/homepage.html"><li>Home</li></a>
  51. <a href="http://localhost/test/aboutus.html"><li>About Me</li></a>
  52. <a href="http://localhost/test/mytimeinaol.php"><li>My Time in AOL</li></a>
  53. <a href="http://localhost/test/contact.html"><li>Contact</li></a>
  54. <a href="http://localhost/test/mymission.html"><li>My Mission</li></a>
  55. <a href="https://www.facebook.com/imtippsy"><li>Facebook</li></a>
  56. </ul>
  57. </div>
  58. <h2>My Time in Aol</h2>
  59. </div>
  60. <div><
  61. <div><tr><h3><em>My First Day in AOL</em> </h3>
  62. <p>My first day within the AOL headquarters was very pleasing. I started by singing in and talking to my contact within AOL, Catriona Keating. Catriona handes us out timetables and brought us to the 10 AM search team meeting. here they went over the progress they've made since the last meeting and any errors etc. We were given a short tour and then I was assigned to the Ad Tech team on Floor 9. I attended a meeting also known as a scrum at 2pm with the ad tech team in which a video conference calls was made to people around the globe. After the meeting the others students and I went to meet someone named Rob, Rob gave us a tour around the offices(Floors 6-11). We started with the games room which includes a pool table, fuzball and table tennis. On the 10th floor is the canteen where employees can have their breakfast and lunch at no cost, the 9th floor is currently where I am situated. This floor belong mainly to the Ad Tech team and same with floor 8. Floor 7 is where the reception is located where we must sign in every morning and meet our contact Catriona to recieve our laptops. The search team mainly uses this floor and it is where we attended our first meeting. The 6th floor has a range of uses from hosting the new interns, the finance team, the team that takes care of the front-end of the AOL homepage and more."</p>
  63. </tr>
  64. <tr><h3><em>My Second Day in AOL.</em></h3>
  65. <p>The second day was straight forward and not much happened. As usual we started of by signing in at the reception, grabbing out laptops then heading up to the floor 9 for the day. We sat down by our desks and and power on our laptops. We were told to start on our project using weebley but instead it go suggested that we build the website ourself. I finished the HTML & CSS course then got to progress on making the site. I used most of the stuff I learned in the course to create the site so the codecademy course was very helpful. That pretty much continued till the end of the day.</p></tr>
  66. <tr><h3><em>My Third Day in AOL.</em></h3></tr>
  67. <p>The third day was actually a great experience in my opinion. We spent the day with Derek in the I.T department. We started of with opening a computer, removing the hard drive, followed by the RAM, the graphics processing unit and the optical drive. After taking them out we were tasked to place all the parts back in successfully and make sure the computer starts up without beeping. I managed to get it to work without beeping then was given the task of installing windows 7 so I formatted the hard drive and installed a clean copy. While windows installed Derek talked us through taking laptop components out and placing them back in again. When the computer finished installing windows 7 we were given a list of software to install to the computer and we were also given a usb to save the installers to. This didn't take o long and when we finished installing them we had to make sure that the version of windows it had was up to the latest version.</p>
  68. </tr>
  69. <tr><h3><em>My Fourth Day in AOL</em>
  70. </h3></tr>
  71. <p>The fourth day was quite interesting. From morning until noon we were with Stephanie in Errigal on Floor 7. She was giving us a course on how to style our curriculum vitaes, what we could change on our own and an example of good and bad CV's. She also gave us tips for interviews and how we should act, say, and do etc. After the course we went to one of the adtech scrum meetings in which we were introduced to the project manager Kieran, the scrum master for the days meeting. He told us jobs in which we could do in the future etc. After the scrum we got back to working on our projects until the end of the day.</p>
  72. <?php
  73. $servername = "localhost";
  74. $username = "root";
  75. $password = "";
  76. $dbname = "test";
  77.  
  78. // Create connection
  79. $conn = new mysqli($servername, $username, $password, $dbname);
  80. // Check connection
  81. if ($conn->connect_error) {
  82. die("Connection failed: " . $conn->connect_error);
  83. }
  84.  
  85. $sql = "SELECT header, message FROM blog";
  86. $result = $conn->query($sql);
  87.  
  88. if ($result->num_rows > 0) {
  89. // output data of each row
  90. while($row = $result->fetch_assoc()) {
  91. echo "<h3> " . $row["header"]. " </h3><br>" . " <p>" . $row["message"]. "</p><br>";
  92. }
  93. } else {
  94. // echo "0 results";
  95. }
  96. $conn->close();
  97. ?>
  98. <div id="blog"><legend>New Blog</legend>
  99.  
  100. <form action="insert.php" method="post">
  101. Header: <input type="header" name="header"><br>
  102. Story: <textarea name="message" rows="10" cols="30">
  103.  
  104. </textarea><br>
  105. <input type="submit">
  106. </form>
  107. </fieldset></div>
  108. </div>
  109. <div id="footer">
  110. <div id="button">
  111. <a href="https://mail.google.com/mail/u/0/?view=cm&fs=1&to=jamiemcg2399@gmail.com&s&tf=1"><p>Send me an <span class="bold">e-mail</span>!</p></a>
  112. </div>
  113.  
  114. </body>
  115. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement