how to display the data that filled up by user after submit the form?
right i'm doing project e-complaint, can me how display data have been filled user based on submitted form display primary key user reference.
here insert form code:
<?php if(isset($_post["compsubmit"])){ $category=$_post['category']; $typedamage=$_post['typedamage']; $serial=$_post['serial']; $location=$_post['location']; $description=$_post['description']; $name= $_session['sess_nama']; $sid=$_session['sess_sid']; $course= $_session['sess_course']; $con=mysql_connect('localhost','root','') or die(mysql_error()); mysql_select_db('kktm') or die("cannot select database"); $sql="insert complaint2(name,id,department_course,category,type_damage,serial,location,data_time,complaint,status,report) values ('$name','$sid','$course','$category','$typedamage','$serial','$location',now(),'$description','pending','')"; $result=mysql_query($sql); }else { echo "fail complaint!"; } ?>
i hope can me this..
thank you.
you using deprecated mysql connection. you must switch mysqli or pdo.
you not implementing data validation , sanitation. you must.
but answer question, can add following code:
echo "<pre>";
print_r($_post);
echo "</pre>";
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment