Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // loaddata.php
- <?php
- if( isset( $_POST['user_name'] ) )
- {
- $name = $_POST['user_name'];
- $host = 'localhost';
- $user = 'root';
- $pass = ' ';
- mysql_connect($host, $user, $pass);
- mysql_select_db('student');
- $selectdata = " SELECT age,course FROM student_info WHERE name LIKE '$name%' ";
- $query = mysql_query($selectdata);
- while($row = mysql_fetch_array($query))
- {
- echo "<p>".$row['age']."</p>";
- echo "<p>".$row['course']."</p>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment