Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Loading an image into a View.
Post: RE: Loading an image into a View.

See my post under the "Best Practices" subforum.
190 Views
1 Replies
11-11-2022, 11:08 PM
davecoventry
    Thread: Best place to put user uploaded files.
Post: RE: Best place to put user uploaded files.

Ok, this is what I'm doing. In /public: preview.php PHP Code: -- -- In my view.php file: Code: --
311 Views
1 Replies
11-11-2022, 11:05 PM
davecoventry
    Thread: Loading an image into a View.
Post: Loading an image into a View.

I have some image files in ROOTPATH."writable/users/ which I am trying to display in the user's browser. My Routes.php contains the line:$routes->get('/loadthumbs/(:any)', 'ThumbController::loadthumb...
190 Views
1 Replies
11-06-2022, 12:15 PM
davecoventry
    Thread: Best place to put user uploaded files.
Post: Best place to put user uploaded files.

When the user uploads a document, I've placed it in ROOTPATH."writable/users/userid/" However, there is an image file located in the user's directory that I want to be able to display. I don't want ...
311 Views
1 Replies
10-30-2022, 06:16 AM
davecoventry
    Thread: How do I get the autoincremented ID of the latest inserted row.
Post: RE: How do I get the autoincremented ID of the lat...

It's suddenly started working for me too. I have no idea what I was doing wrong, but it was obviously something stupid. Thanks for your response, and sorry to have wasted everybody's time (inclu...
352 Views
2 Replies
10-16-2022, 02:31 AM
davecoventry
    Thread: How do I get the autoincremented ID of the latest inserted row.
Post: How do I get the autoincremented ID of the latest ...

My code: PHP Code: --     $this->db->simpleQuery('Use D'.$id);     $this->db->table('drawings')->insert(array("name"=>$fname));     return $this->db->insertID(); -- This returns a model object...
352 Views
2 Replies
10-15-2022, 01:14 PM
davecoventry
    Thread: Creating a new database.
Post: RE: Creating a new database.

Just to add that creating tables for the new database is not really straightforward and the code above generates an error when fields and tables are added: "InvalidArgumentException D8 is not a valid ...
429 Views
4 Replies
10-12-2022, 06:04 AM
davecoventry
    Thread: Creating a new database.
Post: RE: Creating a new database.

Thanks! Your response got me thinking and it occurred to me that my database user did not have permissions to create the new database. Once I corrected this, the Model worked as expected... Many th...
429 Views
4 Replies
10-11-2022, 02:44 AM
davecoventry
    Thread: Creating a new database.
Post: Creating a new database.

I've been trying to follow the process for creating a new database, as detailed here: https://codeigniter4.github.io/userguide/dbmgmt/forge.html#forge-createdatabase-db-name PHP Code: --
429 Views
4 Replies
10-10-2022, 12:30 PM
davecoventry
    Thread: Database model to update a field.
Post: RE: Database model to update a field.

kenjis Wrote: (10-04-2022, 11:47 PM) -- PHP Code: -- array('password',$pw) ↓ ['password' => $pw] -- See https://codeigniter4.github.io/CodeIgniter4/database/query_builder.html#builder-update -- ...
263 Views
2 Replies
10-05-2022, 12:28 AM
davecoventry
    Thread: Database model to update a field.
Post: Database model to update a field.

I'm clearly not understanding how the Database model works. I have a php script in /App/Models as follows: PHP Code: -- -- All the functions work except for the last function (updatePassword()),...
263 Views
2 Replies
10-04-2022, 10:58 PM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

I just left it. Seems to work.
509 Views
10 Replies
09-30-2022, 06:43 AM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

Forgive me for asking another question, but the Readme.md describes a file called "/app/Config/Validation.php" I don't appear to have this file: do I just create it? I can't see how it is called.
509 Views
10 Replies
09-29-2022, 11:36 AM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

Thanks, my question is answered in the link you sent. I responded before I actually read it.
509 Views
10 Replies
09-29-2022, 03:38 AM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

Thabks. Much appreciated. When the documentation refers to a '.env' file (with a dot preceding the filename), is this the same as 'env' without the dot? It's a little ambiguous because the d...
509 Views
10 Replies
09-28-2022, 10:17 PM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

If the instructions for installing the captchav3 helper talks about "In the .env file you need to add your personal ReCaptcha keys.", where do I find this .env file? I see there is file called 'env...
509 Views
10 Replies
09-28-2022, 11:48 AM
davecoventry
    Thread: Google Captcha implementation.
Post: RE: Google Captcha implementation.

iRedds Wrote: (09-26-2022, 04:27 PM) -- This library is for CI3.x and below. -- Sheeesh. You know how long I've been struggling to work out what I'm doing wrong? :@
509 Views
10 Replies
09-26-2022, 10:54 PM
davecoventry
    Thread: Google Captcha implementation.
Post: Google Captcha implementation.

I'm trying to impement the google captcha mechanism using the libraries here: https://github.com/mehdibo/Codeigniter-recaptcha I keep getting an error saying that "Undefined property: App\Controlle...
509 Views
10 Replies
09-26-2022, 01:46 PM
davecoventry
    Thread: 404 when accessing a function in a controller
Post: RE: 404 when accessing a function in a controller

Thanks. I've got it working. Using PHP Code: -- $routes->post('/store', 'SignupController::store'); -- in Routes.php did the trick. (I must have had a typo in there when I tried earlier)....
1,046 Views
9 Replies
09-14-2022, 12:48 PM
davecoventry
    Thread: 404 when accessing a function in a controller
Post: RE: 404 when accessing a function in a controller

ozornick Wrote: (09-12-2022, 11:43 AM) -- Advice. Never use hard URLs in links. Use the url_to("login.signup") function when adding route names ['as' => 'login.signup'] You will have fewer problems ...
1,046 Views
9 Replies
09-12-2022, 12:54 PM
davecoventry

Theme © iAndrew 2016 - Forum software by © MyBB