<?php
function add_user($id, $pass, $name, $email) {
$result=mysql_query("insert into users values
('$id',ENCRYPT('$pass'),'$name','$email',NULL)");
if($result) {
echo "Row inserted<br />";
} else {
echo mysql_error()."<br />";
}
}
mysql_connect('localhost');
mysql_select_db('foo');
add_user('rasmus','foobar','Rasmus Lerdorf','rasmus@php.net');
add_user('carl','carlspass','Carl AlexandeR Lerdorf','carl@lerdorf.com');
?>