This discussion is archived
1 Reply Latest reply: Jan 2, 2011 11:52 PM by 799151 RSS

submit data on mysql using php or html

815170 Newbie
Currently Being Moderated

I have a mysql database and i insert data in the table using html form which uses a php script.
How can i insert data into the table from java me?
my php file looks like this


$con = mysql_connect("","a7456565_zzz","zzz");
if (!$con)
die('Could not connect: ' . mysql_error());

mysql_select_db("a7456565_db", $con);

$sql="INSERT INTO GPS (lat,lon)

if (!mysql_query($sql,$con))
die('Error: ' . mysql_error());
echo "1 record added";



  • Correct Answers - 10 points
  • Helpful Answers - 5 points