Form Submit to lightbox

Discussion in 'PHP' started by tom11011, Sep 17, 2012.

  1. #1
    Hi Group.

    I have an html page where a form submits to a php page. It works, but the php page loads an entire page to return just one variable. I was thinking there would be a better and neater way to return the php in the form of a lightbox or modal.

    Here is my form code

    
    <form method="post" action="doadd.php">
    <textarea name="message" cols="20" rows="18"></textarea>
    <input type="submit" value="Create" />
    </form>
    
    Code (markup):
    my doadd.php has the following.

    $message = $_POST['message'];
    Code (markup):
    It inserts this data into a database and then echos the results to the doadd.php page for the user to see.

    The results are just a single line, hence the need for a simpler box.

    Any help appreciated!
     
    tom11011, Sep 17, 2012 IP