Welcome Guest, Not a member yet? Register   Sign In
Getting encrypted name problem.
#9

(08-17-2018, 11:02 AM)jreklund Wrote: Great that you got it all sorted out. :-) Here are some intakes on your code.
I would make sure that you don't receive an error on mkdir. Exit and give the user an error. Or use a fallback folder and log it for an admin that you got an problem.
PHP Code:
mkdir('./assets/img/pets/' $pet_entry_id0777true); 

Same as the above, but only log it for the admin.
PHP Code:
rmdir('./assets/img/pets/' $pet_entry_id); 

Where are you using this one? You are still saving "default_petavatar" correct?
PHP Code:
$errors = array('error' => $this->upload->display_errors()); 

Are this something critical for the user to see? Also that should be passed in flashdata() as you are doing a redirect later. If not log it for an admin.
PHP Code:
echo $this->image_lib->display_errors(); 

As far as I can tell this will never be seen. You are doing a redirect later on.
PHP Code:
$data = array('upload_data' => $this->upload->data()); 

Make sure this are returning true for success or false otherwise. If true = redirect. False = give user all those error messages you want.
PHP Code:
$this->pet_model->create_found_pet($image$pet_entry_id); 

Thank you for pointing out the mistakes here! I'll recheck it and i will inform you as soon as i have any further issues!  Smile

//Life motto
if (sad() == true) {
     sad().stop();
     develop();
}
Reply


Messages In This Thread
Getting encrypted name problem. - by HarrysR - 08-16-2018, 08:12 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 02:10 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 06:20 AM
RE: Getting encrypted name problem. - by InsiteFX - 08-17-2018, 03:49 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 07:11 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 08:20 AM
RE: Getting encrypted name problem. - by InsiteFX - 08-17-2018, 10:21 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 11:11 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 11:02 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB