kindly convert this php to java code for register.jsp
@mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="INSERT INTO login_tbl (loginid, password and email) VALUES (".$loginid.?$password.?$email.? $r = mysql_query($sql); if(!$r) {
$err=mysql_error();
print $err;
exit(); }
The code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields ?the loginid, password and email fields. The values of the $loginid, $password and $email variables are passed in from the form in register.html using the post method.
i have built the mysql tables loginid,password and email . i also have the register.html and am using get method to go to register.jsp.
i would like to put the converted code to register.jsp
thanks for ur help
cheers

