i need one help that is returning data just after submit inside the database.I am explaining my code below.
addCourse.php:
<?php
$course_name=stripslashes($_POST['course_name']);
$course_short_name=stripslashes($_POST['course_short_name']);
$semester=stripslashes($_POST['semester']);
$con = mysql_connect('localhost', 'root', '******');
mysql_select_db('go_fasto', $con);
$qry ='INSERT INTO db_course (course_name,short_name,semester) values ("' . $course_name . '","' . $course_short_name . '","' . $semester . '")';
$qry_res = mysql_query($qry);
if ($qry_res) {
echo "Course has added successfully";
} else {
echo "course could not added ";
}
?>
This file is called using ajax and all returning value will appear in ajax's success function.Here i need to return both the submitted data and success message to ajax's success function.Please help me to resolve this issue.