3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //////////////////////////////////////////////////////////////////*****///////////////////////////////////////////////////////////////////////////////////// // Feedback Pro v1 // // Faculty Evaluation System // // Developed By Shrenik Patel // // July 27, 2009 // // // // Tis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // // //////////////////////////////////////////////////////////////////*****////////////////////////////////////////////////////////////////////////////////////// include('session_chk.php'); include("includes/config_db.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> <?php include('admin_panel_heading.php'); ?> <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> <?php include('left_side.php');?> </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']?>"> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
based on 2YpXd
Output for 5.4.0 - 7.2.0
Warning: include(session_chk.php): failed to open stream: No such file or directory in /in/ptTOT on line 15 Warning: include(): Failed opening 'session_chk.php' for inclusion (include_path='.:') in /in/ptTOT on line 15 Warning: include(includes/config_db.php): failed to open stream: No such file or directory in /in/ptTOT on line 16 Warning: include(): Failed opening 'includes/config_db.php' for inclusion (include_path='.:') in /in/ptTOT on line 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> Warning: include(admin_panel_heading.php): failed to open stream: No such file or directory in /in/ptTOT on line 29 Warning: include(): Failed opening 'admin_panel_heading.php' for inclusion (include_path='.:') in /in/ptTOT on line 29 <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> Warning: include(left_side.php): failed to open stream: No such file or directory in /in/ptTOT on line 33 Warning: include(): Failed opening 'left_side.php' for inclusion (include_path='.:') in /in/ptTOT on line 33 </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
Output for 5.2.3 - 5.3.29
Warning: include(session_chk.php): failed to open stream: No such file or directory in /in/ptTOT on line 15 Warning: include(): Failed opening 'session_chk.php' for inclusion (include_path='.:') in /in/ptTOT on line 15 Warning: include(includes/config_db.php): failed to open stream: No such file or directory in /in/ptTOT on line 16 Warning: include(): Failed opening 'includes/config_db.php' for inclusion (include_path='.:') in /in/ptTOT on line 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> Warning: include(admin_panel_heading.php): failed to open stream: No such file or directory in /in/ptTOT on line 29 Warning: include(): Failed opening 'admin_panel_heading.php' for inclusion (include_path='.:') in /in/ptTOT on line 29 <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> Warning: include(left_side.php): failed to open stream: No such file or directory in /in/ptTOT on line 33 Warning: include(): Failed opening 'left_side.php' for inclusion (include_path='.:') in /in/ptTOT on line 33 </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action="/in/ptTOT"> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
Output for 5.1.0 - 5.2.2
Warning: include(session_chk.php): failed to open stream: No such file or directory in /in/ptTOT on line 15 Warning: include(): Failed opening 'session_chk.php' for inclusion (include_path='.:') in /in/ptTOT on line 15 Warning: include(includes/config_db.php): failed to open stream: No such file or directory in /in/ptTOT on line 16 Warning: include(): Failed opening 'includes/config_db.php' for inclusion (include_path='.:') in /in/ptTOT on line 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> Warning: include(admin_panel_heading.php): failed to open stream: No such file or directory in /in/ptTOT on line 29 Warning: include(): Failed opening 'admin_panel_heading.php' for inclusion (include_path='.:') in /in/ptTOT on line 29 <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> Warning: include(left_side.php): failed to open stream: No such file or directory in /in/ptTOT on line 33 Warning: include(): Failed opening 'left_side.php' for inclusion (include_path='.:') in /in/ptTOT on line 33 </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action=""> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
Output for 4.3.2 - 5.0.5
Warning: main(session_chk.php): failed to open stream: No such file or directory in /in/ptTOT on line 15 Warning: main(): Failed opening 'session_chk.php' for inclusion (include_path='.:') in /in/ptTOT on line 15 Warning: main(includes/config_db.php): failed to open stream: No such file or directory in /in/ptTOT on line 16 Warning: main(): Failed opening 'includes/config_db.php' for inclusion (include_path='.:') in /in/ptTOT on line 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> Warning: main(admin_panel_heading.php): failed to open stream: No such file or directory in /in/ptTOT on line 29 Warning: main(): Failed opening 'admin_panel_heading.php' for inclusion (include_path='.:') in /in/ptTOT on line 29 <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> Warning: main(left_side.php): failed to open stream: No such file or directory in /in/ptTOT on line 33 Warning: main(): Failed opening 'left_side.php' for inclusion (include_path='.:') in /in/ptTOT on line 33 </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action=""> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
Output for 4.3.0 - 4.3.1
Warning: main(session_chk.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/ptTOT on line 15 Warning: main() [http://www.php.net/function.main]: Failed opening 'session_chk.php' for inclusion (include_path='.:') in /in/ptTOT on line 15 Warning: main(includes/config_db.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/ptTOT on line 16 Warning: main() [http://www.php.net/function.main]: Failed opening 'includes/config_db.php' for inclusion (include_path='.:') in /in/ptTOT on line 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> Warning: main(admin_panel_heading.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/ptTOT on line 29 Warning: main() [http://www.php.net/function.main]: Failed opening 'admin_panel_heading.php' for inclusion (include_path='.:') in /in/ptTOT on line 29 <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> Warning: main(left_side.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/ptTOT on line 33 Warning: main() [http://www.php.net/function.main]: Failed opening 'left_side.php' for inclusion (include_path='.:') in /in/ptTOT on line 33 </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action=""> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>