I am new to PHP in Ubuntu 13.10. But I am pretty much able to handle Ubuntu. However
my question is that I can't add any data to phpmyadmin through a PHP
code, though my code is perfect. Because I have the same code in WAMP server, and it worked perfectly. But in Ubuntu I just can't add any data to the database. Below seen is the the code of php file;
<?php
$db_name="mydb";
$table_name="student";
$con=@mysql_connect("localhost",root);
$db=@mysql_select_db($db_name,$con);
$sql="insert into $table_name (name,course,mobile,address)"."values ('$_POST[n1]','$_POST[n2]',$_POST[n3],'$_POST[n4]')";
$r=@mysql_query($sql,$con);
echo "----Insert successfull----,<br><br><hr/>";
echo "<a href=index.html>Back</a>";
?>
Please tell me whether I am wrong or is there is any bug/problem in phpmyadmin.