3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include ('db_connect.php'); if (isset($_POST['S1'])) { $A1 = $_POST['T1']; $A2 = $_POST['T2']; $Q = @mysql_query("SELECT * FROM emct_instructor WHERE ins_id='$A1' AND ins_password='$A2'"); $R = @mysql_fetch_array($Q); if (@mysql_num_rows($Q) == 1) { $_SESSION['FULLNAME'] = $R['ins_fname']; print "<script>window.location='faculty.php';</script>"; } else print "<script>alert('Invalid Username or password')</script>"; } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Faculty Log-in</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> <style type="text/css"> <!-- .style1 { color: #1C74A4; font-size: 13px; } .style17 {font-size: 14px; color: #006AD5; } --> </style> </head> <body> <!-- start header --> <div id="header"> <div id="logo"> <h1></a></h1> <p>&nbsp;</p> <p>&nbsp;</p> </div> <div id="menu"> <ul> <li><a href="facultyoverview.php">Faculty overview </a></li> <li class="current_page_item"><a href="facultylog.php">faculty log-in </a></li> </ul> </div> </div> <!-- end header --> <!-- start page --> <div id="page"> <!-- start leftbar --> <div id="leftbar" class="sidebar"> <ul> <li> <h2>&nbsp;</h2> </li> <li></li> </ul> </div> <!-- end leftbar --> <!-- start content --> <div id="content"> <div class="post"> <h1 class="title">Faculty Log-in </h1> <div class="entry"> <form name="F1" method="POST"> <p><fieldset> <table width="364" border="0"> <tr> <td width="75"><span class="style17">Faculty ID: </span></td> <td width="273"><input type="text" name="T1"></td> </tr> <tr> <td><span class="style17">Password:</span></td> <td><input type="password" name="T2"></td> </tr> <tr> <td>&nbsp;</td> <td><input name="S1" type="submit" value="Login"> <span class="style1">Forgot password? </span></td> </tr> </table> </fieldset> </form> </div> <p class="links">Faculty must remember your password or ID number to Log-n. </p> </div> </div> <!-- end content --> <!-- start rightbar --> <div id="rightbar" class="sidebar"> <ul> <li> </li> <li></li> <li> <div id="calendar_wrap"> <table summary="Calendar"> <caption> January 2014 </caption> <thead> <tr> <th abbr="Monday" scope="col" title="Monday">M</th> <th abbr="Tuesday" scope="col" title="Tuesday">T</th> <th abbr="Wednesday" scope="col" title="Wednesday">W</th> <th abbr="Thursday" scope="col" title="Thursday">T</th> <th abbr="Friday" scope="col" title="Friday">F</th> <th abbr="Saturday" scope="col" title="Saturday">S</th> <th abbr="Sunday" scope="col" title="Sunday">S</th> </tr> </thead> <tfoot> <tr> <td abbr="September" colspan="3" id="prev"><a href="#" title="View posts for September 2007">&laquo; Sep</a></td> <td class="pad">&nbsp;</td> <td colspan="3" id="next">&nbsp;</td> </tr> </tfoot> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td id="today">4</td> <td>5</td> <td>6</td> <td>7</td> </tr> <tr> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td>15</td> <td>16</td> <td>17</td> <td>18</td> <td>19</td> <td>20</td> <td>21</td> </tr> <tr> <td>22</td> <td>23</td> <td>24</td> <td>25</td> <td>26</td> <td>27</td> <td>28</td> </tr> <tr> <td>29</td> <td>30</td> <td><a href="#">31</a></td> <td class="pad" colspan="4">&nbsp;</td> </tr> </tbody> </table> </div> </li> </ul> </div> <!-- end rightbar --> <div style="clear: both;">&nbsp; <p>&nbsp; </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> </div> </div> <!-- end page --> <hr /> <div id="footer"> <p>&copy;2014 All Rights Reserved. &nbsp;&bull;&nbsp;EMCOTECH</p> </div> <div align=center></div> </body> </html>

preferences:
36.19 ms | 402 KiB | 5 Q