daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Apr 20th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $theDate = date("F j, Y");
  4. $IPAddress = $_SERVER["REMOTE_ADDR"];
  5. $SQLcon = mysql_connect("localhost","root","root");
  6. $SQLVersion = mysql_get_server_info($SQLcon);
  7. mysql_select_db("lab2", $SQLcon);
  8. $twoNames = mysql_query("SELECT  `name` FROM  `lab2`  LIMIT 0,2");
  9. while ($row = mysql_fetch_array($twoNames, MYSQL_NUM)) {
  10.     printf($row[0], $row[1]);
  11. }
  12.  
  13. $rec5query = mysql_query("SELECT `regnum` FROM  `lab2`  LIMIT 0,2");
  14. $twoNums = mysql_fetch_array($rec5query, MYSQL_BOTH);
  15.  
  16. echo " <table border='1'>
  17. <tr>
  18. <td>Rectangle 1 <br> Hamish Jefford 10166503 $theDate</td>
  19. <td>Rectangle 2 <br> $IPAddress </td>
  20. </tr>
  21. <tr>
  22. <td>Rectangle 3 <br> $SQLVersion </td>
  23. <td>Rectangle 4 <br> </td>
  24. </tr>
  25. <tr>
  26. <td>Rectangle 5 <br> $twoNums[0] <br> $twoNums[1] </td>
  27. <td>Rectangle 6 <br> Enter a username: <br>
  28. <form name=\"input\" action=\"labtwo.php\" method=\"post\">
  29. <input type=\"text\" name=\"usrNoInput\" method=\"post\"/>
  30. <input type=\"submit\" name=\"submit\"/>
  31. </form>
  32. </td>
  33. </tr>
  34. <tr>
  35. <td>Rectangle 7 <br> Input new user's name: <br>
  36. <form name=\"NewUsr\" action=\"labtwo.php\" method=\"post\">
  37. <input type=\"text\" name=\"newNameUsr\" method=\"post\"/>
  38. <input type=\"submit\" name=\"submit\"/>
  39. </form>
  40. </td>
  41. <td>Rectangle 8 <br>
  42. <form name=\"login\" action=\"labtwo.php\" method=\"post\">
  43. Username: <input type=\"text\" name=\"usrNameIn\" method=\"post\"/>
  44. <br>
  45. Password: <input type=\"text\" name=\"usrPassIn\" method=\"post\"/>
  46. <input type=\"submit\" name=\"submit\"/>
  47. </form>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td>Rectangle 9 <br> Pass yes/no? </td>
  52. <td>Rectangle 10 <br>
  53. </td>
  54. </tr>
  55. </table> ";
  56. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top