View Single Post
Old 02-06-2005, 08:23 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
hey plomon, the concept is a lot like jsp. one thing not showed is the connect to mysql. just fill in the information in the mysql_connect string here. if it is a remote server, just put in the ip.
PHP Code:
<?
if (!$dbcnx mysql_connect("server""user""password"))
  die(
"Could not connect to MySQL DB: " mysql_error());
?>
this should probably be at the top of the page. now, idx gave you a good example, and if you know jsp, then i assume you may also have a grasp on the sql language ( so i wont' go into details on your sql insert )

$id = $_POST['id']; is exactly the same thing as you using: String id = request.getParameter("id"); in jsp.

if you needed to access the variable 'age' from your form, then you would use $_POST['age']

let us know how it goes.
__________________
Mike
sde is offline   Reply With Quote