<?php
$conn = mysql_connect("localhost:3306", "root", "");
$db = mysql_select_db("coproj");
$qr = mysql_query("drop database coproj");
if($qr) {
echo "Register user:<br>
<form method=post>
<input type=text name=username> Username<br>
<input type=submit value=register><br>
</form>
<hr>
";
}
if(isset($_POST["name"])) {
@mysql_query("insert into accounts(name, logontype) values('" . $_POST["name"] . "','2')");
echo "ACCOUNT REGISTERED!";
}
?>
|