0

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

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by broj1
0

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">
...

Edited by broj1

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.