Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $theDate = date("F j, Y");
- $IPAddress = $_SERVER["REMOTE_ADDR"];
- $SQLcon = mysql_connect("localhost","root","root");
- $SQLVersion = mysql_get_server_info($SQLcon);
- mysql_select_db("lab2", $SQLcon);
- $twoNames = mysql_query("SELECT `name` FROM `lab2` LIMIT 0,2");
- var_dump($twoNums);
- while ($row = mysql_fetch_array($twoNames, MYSQL_NUM)) {
- $nameone = $row[0];
- $nametwo = $row[1];
- }
- $rec5query = mysql_query("SELECT `regnum` FROM `lab2` LIMIT 0,2");
- $twoNums = mysql_fetch_array($rec5query, MYSQL_BOTH);
- echo " <table border='1'>
- <tr>
- <td>Rectangle 1 <br> Hamish Jefford 10166503 $theDate</td>
- <td>Rectangle 2 <br> $IPAddress </td>
- </tr>
- <tr>
- <td>Rectangle 3 <br> $SQLVersion </td>
- <td>Rectangle 4 <br> $nameone $nametwo </td>
- </tr>
- <tr>
- <td>Rectangle 5 <br> $twoNums[0] <br> $twoNums[1] </td>
- <td>Rectangle 6 <br> Enter a username: <br>
- <form name=\"input\" action=\"labtwo.php\" method=\"post\">
- <input type=\"text\" name=\"usrNoInput\" method=\"post\"/>
- <input type=\"submit\" name=\"submit\"/>
- </form>
- </td>
- </tr>
- <tr>
- <td>Rectangle 7 <br> Input new user's name: <br>
- <form name=\"NewUsr\" action=\"labtwo.php\" method=\"post\">
- <input type=\"text\" name=\"newNameUsr\" method=\"post\"/>
- <input type=\"submit\" name=\"submit\"/>
- </form>
- </td>
- <td>Rectangle 8 <br>
- <form name=\"login\" action=\"labtwo.php\" method=\"post\">
- Username: <input type=\"text\" name=\"usrNameIn\" method=\"post\"/>
- <br>
- Password: <input type=\"text\" name=\"usrPassIn\" method=\"post\"/>
- <input type=\"submit\" name=\"submit\"/>
- </form>
- </td>
- </tr>
- <tr>
- <td>Rectangle 9 <br> Pass yes/no? </td>
- <td>Rectangle 10 <br>
- hello hamish!!!!!!!!
- </td>
- </tr>
- </table> ";
- ?>
Add Comment
Please, Sign In to add comment