Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
$con= mysql_connect("localhost","root","");
mysql_select_db("phptutor",$con);
if (!$con){
die('could not connect'.mysql_error);
}
@$a=$_POST['Uname'];
@$b=$_POST['Upass'];
@$c=$_POST['Uadrs'];
@$d=$_POST['Uph'];
if(@$_POST['addval'])
{
$sql="insert into tbl_insert_data(User_name,User_pass,User_address,User_ph) values('".$a."','".$b."','".$c."','".$d."')";
echo "insert data";
mysql_query($sql);
}
$con= mysql_connect("localhost","root","");
mysql_select_db("phptutor",$con);
if (@$_POST['showdata'])
{
echo $show_result=mysql_query("select User_name,User_pass,User_address,User_ph from tbl_insert_data");
echo "
| All User | |||
| User_name | User_pass | User_address | User_ph |
| ".$row['User_name']." | ";".$row['User_pass']. " | ";".$row['User_address']." | ";".$row['User_ph']." | ";
"
?>

Posted May 29, 2015, 2:09 AM
Dipankar BiswasPosted May 28, 2015, 8:25 AM