php上的Mongodb注册表
你能告诉我这个代码有什么问题吗!我试图通过我得到错误的职位php上的Mongodb注册表,php,mongodb,Php,Mongodb,你能告诉我这个代码有什么问题吗!我试图通过我得到错误的职位 <?php include_once("config.php"); if(loggedIn()): header('Location: members.php'); endif; if(isset($_POST["submit"])): if(!($_POST["password"] == $_POST["password2"])): echo "<p>Your passwords d
<?php
include_once("config.php");
if(loggedIn()):
header('Location: members.php');
endif;
if(isset($_POST["submit"])):
if(!($_POST["password"] == $_POST["password2"])):
echo "<p>Your passwords did not match</p>";
exit;
endif;
$query = $collection->findOne(array("login" => $_POST["login"]));
if(empty($query)):
newUser($_POST["login"], $_POST["password"]);
cleanMemberSession($_POST["login"], $_POST["password"]);
header("Location: members.php");
else:
echo '<p>Username already exists, please choose another username.</p>';
endif;
endif;
?>
该代码中有许多错误。您可能应该解决这些问题(如果不是一行,这可能会更容易)(永远不会工作。你真的希望我们阅读你的代码吗?它没有格式化或其他任何东西…我可以通过电子邮件将我的代码发送给你们中的一位吗?因为我使用的是aptana studio php!只需在问题中正确格式化你的代码,然后我将阅读它,并从一些基本的php教程开始。这些代码都有问题。