well the user will go to the url which will have a token in it...if token exists then it will unblock account.
now i want the user_id so i can send the user to the change password action...I'm passing the user_id as a parameter so if the $user_id parameter is not null in the change password action he/she can change password without logging in.
else if null and not authenticated then redirected to log in...if that sounds right
i couldnt think of another way of letting the user change password without being authenticated.
is it possible to get the value of user_id when updating a row?..this query works but im struggling to get the user_id (doesnt return a result)
UPDATE users
SET status = 'Active',
token = NULL
WHERE token = 'test'
AND status = 'Blocked'
AND (SELECT user_id as `user_id`)
if i'm not able to do it that way then i could use the following, but would be great if i was able to do this all in one query.
SELECT LAST_INSERT_ID();
thank you
use the code below of top of your script's while developing...let us know if you get an error of some kind.
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(E_ALL);
thanks for your post
if i use
$body = ob_get_contents();
instead then i get no 11 at end of the </html> tag...as for it being the response there's nothing in there that could cause it... =/
hey guys...im having a issue when using ob_flush()...what im getting is a 1 at the end of my html depending on how many templates i render...in this instance i get 11 at the end of my html in the browser,
render in my view class:
public function render($file_name)
{
if (preg_match("/\.html$/i", $file_name))
{
ob_start();
extract($this->_variables);
require_once PRIVATE_DIRECTORY . 'application' . DS . 'views' . DS . $file_name;
$body = ob_flush();
}
$this->_repsonse->append_body($body);
}
inside my controller:
$this->view->render('template.html');
template.html
my header is here
<? $this->view->render('content.html') ?>
my footer here
how the source looks in browser:
my header is here
content is here
my footer here11
any idea why i get 1's after my html when using ob_start() please?
thank you
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.