Plz help me. I want to insert data in table which is filled by user. But i want to keep that insert query code in same file where i have created my html form. I want not to make insert.php individually.

In this way i want to insert data in my table. so plz help me as sson as possible

In the php file first check whether the form was submitted:

<?php
// assumming you use method=post
if(isset($_POST['submit'])) {

    // do the insert

    // display thankyou message

    // end the script
    die();
}

// if the form was not submitted, display it
// ...
?>

<form action="#" method="post">
...

You are welcome. If you have no more questions regarding this problem, please mark the thread as solved, otherwise we are welcome to leave it open and ask at your own pace. Happy coding.