PHP Simple feedback application






feedback.html



<html>

<head>
<title>Feedback  Page</title>
<style type='text/css'>
table {
background:#dedfff;
font-family:verdana;
 }
 .strip{background:#7b869c}
</style>
</head><body>
<form action='savefeed.php' method='post'>
<table align=center>
<tr><td >Name<td ><input   name=txtname></td></tr>
<tr><td >Email    <td ><input name=txtemail></td></tr>
<tr><td >Office address<td ><textarea name=tareaoffice rows=3 cols=30></textarea></td></tr>
<tr><td >Mobile no. <td ><input name=txtmobile></td></tr>
<tr><td >Designation <td ><input name=txtdesignation></td></tr>
<tr><td >Expert areas<td ><input name=txtexpertarea></td></tr>
<tr><td >Comment<td ><textarea name=tareacomment rows=3 cols=30></textarea></td></tr>
<tr class='strip' ><td colspan=2 align="center"><input type='submit' value=submit name='cmdsubmit'><input type='reset' value='clear' name='cmdclr'></td></tr>
</table></form></body></html>




savefeed.php


<?php

if(isset($_POST['txtname']))
{
$cn=mysql_connect('localhost','root');
    mysql_select_db("College",$cn);
   $query="insert into feedback(name,email,addr,phone,desg,expert,comment) values('";
   $query.=$_POST['txtname']."','".$_POST['txtemail']."','".$_POST['tareaoffice']."',".$_POST['txtmobile'].",'".$_POST['txtdesignation']."','".$_POST['txtexpertarea']."','".$_POST['tareacomment']."')";
   $res=mysql_query($query);

    if($res)
     {
     echo "<h3>Thanks! Feedback submitted.</h3>";
     include("http://kbkashid.blogspot.com/");
     }
     else
     {
        echo "<h3>Error! Try again</h3>";
        include("feedback.html");
     }


}
else
{

include("feedback.html");
}
?>


MySQl Queries:
 create database college;

 use college;

 create table feedback(
 fedid BIGINT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY,
 name varchar(20) not null,
 email varchar(20) not null,
 addr varchar(50) not null,
 phone BIGINT(11),
 desg varchar(12),
 expert varchar(20),
 comment varchar(100));

8 comments:

  1. Full of heavenly and virtuosic words.
    canon ink

    ReplyDelete
  2. For a long time me & my friend were searching for informative blogs, but now I am on the right place guys, you have made a room in my heart! Learn more

    ReplyDelete
  3. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. scopri di piu

    ReplyDelete
  4. i read a considerable measure of stuff and i found that the method for composing to clearifing that precisely need to say was great so i am inspired and ilike to come back again in future.. Mehr Informationen

    ReplyDelete
  5. My friend recommended this blog and he was totally right keep up the fantastic work! mejores vpn

    ReplyDelete
  6. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. privacyenbescherming.be

    ReplyDelete
  7. Should you feel find it difficult to, you undoubtedly is not able to; If you don't intend, to have failing. Things are subject to intellect, reduction of hundreds exercises are hopeless prior to starting. https://getmoreprivacy.com

    ReplyDelete
  8. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. blockchain jobs canada

    ReplyDelete

Thanks for visiting my Blog!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog