I am trying to create a version of my site without CakePHP to use a
different free host.
after this much code
$this->set('title', 'Create');
if (!empty($this->params['form'])) {
$email = ($this->params['form']['data']['Account']['email']);
$password = ($this->params['form']['data']['Account']
['password']);
$exists = $this->Account->query("SELECT * FROM accounts WHERE
email = '$email' AND password = '$password'");
if ($this->Account->save($this->params['form']['data']) &&
empty($exists)) {
$_SESSION['trying'] = 'The account was created.';
} else {
$_SESSION['trying'] = 'The account was not created!';
}
$this->redirect('/articles/result');
}
redirection still works
but after this much code
<?php
include ('..\others\definitions.php');
mysql_connect("localhost", "X", "Y") or die(mysql_error());
mysql_select_db("opinionsofamateurs") or die(mysql_error());
$email=$_POST['email'];
$password=$_POST['password'];
$email=htmlentities($email);
$email=mysql_real_escape_string($email);
$password=htmlentities($password);
$password=mysql_real_escape_string($password);
$db_email=mysql_query("SELECT * FROM `accounts` WHERE email =
'$email'");
$db_email=mysql_fetch_row($db_email);
$db_password=mysql_query("SELECT * FROM `accounts` WHERE email =
'$email' AND password = '$password'");
$db_password=mysql_fetch_row($db_password);
if ($email != VALID_EMAIL)
{
} else if ($email == $db_email)
{
header("Location: create3.php?error=already_email");
} else {
if($password != VALID_PASSWORD)
{
header("Location: create3.php?error=invalid_password");
} else if ($password == $db_password)
{
header("Location: create3.php?error=already_password");
} else {
mysql_query('INSERT INTO `accounts` VALUES (``, $email,
$password)');
}
}
mysql_close();
redirection does not work
Can anybody explain why?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---