Here's my current code, I want to send query to MySQL to add the username and password that's just created:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MyCMS Installer</title>
</head>
<body>
<?php
include 'config.php';
print 'Table has been created.'.'<br/>';
print 'Installation succeeded.';
?>
<form action="<?php echo ($_SERVER['PHP_SELF']); ?>?p=submitted" method="POST">
Admin Username: <input type="text" name="adminuser" accesskey="u" /><br />
Admin Password: <input type="text" name="adminpass" accesskey="p" />
</form>
<?php
if (isset($_GET['p']) && $_GET['p'] == 'submitted') {
$adminUserName = $_POST['adminuser'];
$adminPassword = $_POST['adminpass'];
}
$query = 'INSERT INTO `mycms` VALUES('; // please help here
?>
</body>
</html>
Any comments on my implementations are welcomed...
