<?php
include_once('config.php');
$name=$_POST['name'];
$grade=$_POST['grade'];
$dept=$_POST['dept'];
$sql="INSERT INTO member(Name, Grade, Dept)
VALUES('".$name."','".$grade."','".$dept."')";
mysql_query($sql) or die(mysql_error());
include 'config.php';
mysql_select_db("dept_db",$conf);
//$select=mysql_query("Select * from skype_tb where ID=1");
//$select=mysql_query("Select * from reg_fb where ID between 4 and 6");
//$select=mysql_query("Select * from reg_fb where ID != 5");
//$select=mysql_query("Select * from reg_fb where ID <5");
//$select=mysql_query("Select * from reg_fb where First_Name like '%n'");
$select=mysql_query("Select * from member");
echo "<table border=2>";
echo "<tr>";
echo "<th> ID </th>";
echo "<th> Name </th>";
echo "<th> Grade </th>";
echo "<th> Department </th>";
echo "</tr>";
while($row = mysql_fetch_array($select))
{
echo "<tr>";
echo "<td>" .$row['ID']. " </td>";
echo "<td>" .$row['Name']. "</td>";
echo "<td>" .$row['Grade']. "</td>";
echo "<td>" .$row['Dept']. "</td>";
echo "</tr>";
}
echo "</table>";
?>
Warning: include_once(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dlli9 on line 3
Warning: include_once(config.php): Failed to open stream: Operation not permitted in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Warning: Undefined array key "name" in /in/dlli9 on line 5
Warning: Undefined array key "grade" in /in/dlli9 on line 6
Warning: Undefined array key "dept" in /in/dlli9 on line 7
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13
Stack trace:
#0 {main}
thrown in /in/dlli9 on line 13
Process exited with code 255.
Output for 8.0.13
Warning: include_once(config.php): Failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Warning: Undefined array key "name" in /in/dlli9 on line 5
Warning: Undefined array key "grade" in /in/dlli9 on line 6
Warning: Undefined array key "dept" in /in/dlli9 on line 7
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13
Stack trace:
#0 {main}
thrown in /in/dlli9 on line 13
Process exited with code 255.
Output for 7.4.33
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13
Stack trace:
#0 {main}
thrown in /in/dlli9 on line 13
Process exited with code 255.
Warning: include_once(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dlli9 on line 3
Warning: include_once(config.php): failed to open stream: Operation not permitted in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13
Stack trace:
#0 {main}
thrown in /in/dlli9 on line 13
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.26
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dlli9:13
Stack trace:
#0 {main}
thrown in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Warning: include_once(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dlli9 on line 3
Warning: include_once(config.php): failed to open stream: Operation not permitted in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Fatal error: Call to undefined function mysql_query() in /in/dlli9 on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Warning: main(config.php): failed to open stream: No such file or directory in /in/dlli9 on line 3
Warning: main(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dlli9 on line 13
Warning: mysql_query(): A link to the server could not be established in /in/dlli9 on line 13
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Output for 4.3.0 - 4.3.1
Warning: main(config.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/dlli9 on line 3
Warning: main() [http://www.php.net/function.main]: Failed opening 'config.php' for inclusion (include_path='.:') in /in/dlli9 on line 3
Notice: Undefined index: name in /in/dlli9 on line 5
Notice: Undefined index: grade in /in/dlli9 on line 6
Notice: Undefined index: dept in /in/dlli9 on line 7
Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dlli9 on line 13
Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/dlli9 on line 13
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)