Jump to content

Destramic

Members
  • Posts

    969
  • Joined

  • Last visited

Everything posted by Destramic

  1. 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.
  2. 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
  3. 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);
  4. thanks for that if (preg_match("/\.html$/i", $file_name)) { ob_start(); extract($this->_variables); require_once PRIVATE_DIRECTORY . 'application' . DS . 'views' . DS . $file_name; $body = ob_get_contents(); ob_clean(); } $this->_response->append_body($body); solved it now...thanks for your input guys ...much appreciated
  5. well its ob_flush() i need to use...but still getting the return of 1's at the end of the html...so i meant how to sort so it stops showing the 1's?
  6. any ideas on how i can sort this please?
  7. 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... =/
  8. 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
×
×
  • Create New...

Important Information

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.