Creating a Contact Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shivu123
    New Member
    • Jul 2008
    • 2

    Creating a Contact Form

    [code=html]<form name="dataform" onSubmit="retur n checkform();" action="contact .php" method="post" >[/code]


    how to create this contact.php, how it works.
    Last edited by pbmods; Jul 30 '08, 10:56 AM. Reason: Added CODE tags.
  • geess
    New Member
    • Jul 2008
    • 3

    #2
    At first specify the requirements like username,email id,subject, msg (text area) design this using html and write php coding to connect with database to store the detail or email to admin .[code=php]
    <?php
    include "connect.in c";
    $q="insert into tblnm values('$uname' ,'$email','$sub ','$msg')";
    $ex=mysql_query ($q);
    if
    {
    echo "msg has been sent";
    }
    else
    {
    echo "not";
    }
    ?>
    [/code]


    or
    u can email to admin email id
    using php email function[code=php]
    $q=mail('$email ','$sub','$msg' ,'$from');[/code]
    Last edited by pbmods; Jul 30 '08, 10:55 AM. Reason: Added CODE tags.

    Comment

    Working...