Welcome Guest, Not a member yet? Register   Sign In
Another redirect issue (profile page)
#3

(05-24-2019, 03:30 AM)InsiteFX Wrote:
PHP Code:
redirect('Your_Controller_name/function_name'); 

This works perfectly but now I got this error within the php:

An uncaught Exception was encountered

Type: Error
Message: Call to a member function bind_param() on boolean
Filename: /home4/cultured/public_html/application/views/profile.php
Line Number: 13
Backtrace:
File: /home4/cultured/public_html/application/controllers/Login.php
Line: 47
Function: view
File: /home4/cultured/public_html/index.php
Line: 315
Function: require_onceĀ 

Its because of this code:
// We don't have the password or email info stored in sessions so instead we can get the results from the database.
$stmt = $con->prepare('SELECT password, email FROM accounts WHERE id = ?');
// In this case we can use the account ID to get the account info.
$stmt->bind_param('s', $_SESSION['name']);
$stmt->execute();
$stmt->bind_result($password, $email);
$stmt->fetch();
$stmt->close();

The main issue is highlighted. Trying to figure out how to change this, can you help with this?
Reply


Messages In This Thread
RE: Another redirect issue (profile page) - by Mekaboo - 05-24-2019, 01:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB