Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all 14348 articles
Browse latest View live

User Profile Creation

$
0
0
Hello Heart 

I wanted to see if anyone knew of a good template to use for creating user profiles(a la social network). I have login/register made and found a cool admin management repo via github that I will be looking to implement and adjust. I just need to user profile to compliment it. Are there any out there? Ive been searching for some already made and I can just tweak to fit what I want but can do from scratch as well. Thank you so very much!!

Heart  Heart ,
Mekaboo

When will be Codeigniter 4 Stable Release Date??

$
0
0
When will be release codeigniter 4 stable version?

SSL for my localhost

$
0
0
I use google oauth2 in my app. I have my site secured by RapidSSL. It works fine. I am also trying to develop on my localhost. The error I get on my localhost is "OAuth2 request failed: Service responded with error:". I think that oauth2 requires a host to be ssl. Has anyone run across this? Where can I get a quick, cheap, ssl cert to use on my local Apache on localhost?

Suggested hosting

$
0
0
Hi all,

Having done some CI sites before, I've decided for this current project to use CI again.

This new project will potentially have a lot of users of various kinds.  Not all of course will be online at the time time.  In addition the site will need to support document uploads and downloads of scanned documents.  It will be a web app that we sell to users the services it provides.

There will be need for the site to run some automatic utilities such as scanning a table and sending out "update" emails to expired users.  There will be some date related stuff where a scan will occur and if something has been been done by a date then emails are sent etc.

At first, since this thing has not been sold yet we are probably going to host with a smaller typical host like SiteGround or something fairly inexpensive.

However if this thing goes where we hope it goes we will need much more.   I have little experience in the "much more" category.  I know that we can fire up either VM or static hosts on things like Amazon, but what else is there for high speed, high demand sites?

It seems you go from "shared" to dedicated type hosting.   Are there any great deals, things to stay away from? etc?

The principles of this project are not webadmins and I don't want to do that job either so if this grows we will likely hire a webadmin but I'm hoping we can find a site with some reasonable services built right in.   

Any suggestions, thoughts, ideas?

For the start, the low-end, anyone have any recommendations?  SiteGround ok?

thanks in advance!

Texts with accented characters being saved as NULL with PHP-FPM and MySQL

$
0
0
Hi there, folks.

I'm facing this issue for more than a week without any clue what to do. I've posted it on Stack Overflow and also spent sometime discussing it on #php at irc.freenode.net. I was advised to seek for more CI specialized support, so here I am.

I'm going to leave the URL for the Stack Overflow question, is that ok? I think this way you folks can read what I was asked about.

Here is it:
https://stackoverflow.com/questions/5575...-and-mysql

Any tip?

Thanks a lot!

Link veiws within a function

$
0
0
Hello all!

I have a login page that has a register button. Issue is that when I cant link the register button to my register_page.php. I keep getting 404 PAGE NOT FOUND when I have the page in my view folder. This is my code:

    public function index()
    {
        $this->load->view('welcome_message');
    
    }
    public function hello()
    {
        $this->load->view('header');
      $this->load->view("login");
          $this->load->view('footer');
    }    
    public function register()
    {
        $this->load->view('header');
      $this->load->view("register_page");
          $this->load->view('footer');
    }    

    
   
Do I have to have multiple functions or just have one? Do I use an anchor? Ive tried a different controller(Register.php) but that didnt work either. Thanks for the help.



Heart Heart ,
Mekaboo

Multi Language Project

$
0
0
Hello dear community.

I have started a new, private project and am now at the point where I just do not know how to continue.

It's about translations.
I have meticulously ensured that everything in my project is written in English (even if that is not my mother tongue).

The standard translations from the libraries are not a problem, which I got translated quickly. Translating the other texts is not a problem either, just how I can then integrate them in the project, so I'm having my difficulties.

I do not want to have a ready-made solution presented here, but I could use one or the other approach.

I intend to have a drop-down menu in the header bar where you can choose the language.

Since there is also a login area, I want the users to be able to set their language in the profile, which is then automatically called up with the login.

The default language is English, but how can I change it dynamically?

I know well that I also need language files that I fill with keywords and deposit corresponding texts.

About suggestions, I would be very grateful.

And besides: Happy EasterWink

Your Kighlander

PS: Translated with Google  Big Grin

help with the route and localization ?!

$
0
0
Hello ! Wink 
I just recently started learning the framework, thanks to the CI team for this Heart
But I have questions here:
1) How to implement such a system of routers on CI4:
 
Code:
FOLDER CONTROLLERS:
/controlers
   /auth.php - [welcome & signup & signin <-- methods]
   /and other *.php
   /classes not
   /yet needed..

FOLDER VIEWS:
/views
   /Auth
       welcome.php
       signup.php
       signin.php
   /and other folders...

I need the user to enter 3 different links on one and the same page, for example when entering:
http: //site.com/
http: //site.com/en/auth/
http: //site.com/en/auth/welcome
He saw the "welcome" page...


p.s. You don’t need to write all the code for me, just ask how to correctly use the functions $ route-> add () & $ route-> get () and if possible $ route-> group();

Question №2:
How to make multilingual website through url ?

P.S. I tried to do all this through:

$ route-> get ('{locale} / (: alpha) / (: alpha) / (: alphanum)', '$ 1 :: $ 2 / $ 3', ['offset' => 1]); but nothing happened Sad

p.s.s. If you need to provide something, just piggy and I'll do it! I really hope for your invaluable help.  Heart Heart Heart

.png   Снимок экрана (899).png (Size: 153.02 KB / Downloads: 1)

Error Handling with very basic SQL query

$
0
0
Hi Guys,

I have built this simple code which uses a specific database configuration and then runs SELECT query on the EMPLOYEE table.
This table has very huge database and I believe because of that, the db is throwing error. Which is fine.  
Below is my code. I have done the error handling code in this but it still throws attached error on browser. I want it to suppress throwing error on browser and catch it into variable so I can display it properly. Because I would like to use this code for an API server.

Ignore the part where the code is commented for $DB_MYSQL. That is for future use, I am going to switch database on specific occassions.

PHP Code:
$DB_MSSQL $this->load->database('mssql_db'TRUE);
$DB_MSSQL->db_debug FALSE;

//$DB_MYSQL = $this->load->database('mysql_db', TRUE);
//$DB_MYSQL->db_debug = FALSE;

$sql "SELECT * from EMPLOYEES";
$result  $DB_MSSQL->query($sql);

echo 
$sql.'<hr/>';

if(
$result){
 
$row $result->result_array();
 
 
$count=1;
 foreach(
$row as $record){
 echo 
"[ $count ] ";
 
var_dump($record);
 echo 
'<hr/>';
 
$count++;
 
 
ob_flush(); flush();
 }
}
else{
 
$error $DB_MSSQL->_error_message();
 
var_dump($error);

Happy Easter

Sanitize string for url

$
0
0
Hi
I have some string (A & K Motel or A Fleur D'Eau or A La Belle Etoile - Yourtes / Yurt de la CJA)
I need encode this values and use their in address
example :
http://example.com/info/92h1-A & K Motel
or
http://example.com/info/92h1-A Fleur D'Eau or A La Belle Etoile

But i cannot use special character in address and i have to convert this character to readable character
example :
http://example.com/info/92h1-A--K-Motel

I need convert space or & character to readable character and use in address and get it in other controller and do query
Sorry for my bad question and details

Thanks

display data from the database

$
0
0
please help me to get this enlightenment.
I want to display data from the database to be like this.
[Image: GQZXtRh]
this is just an example and ignore total penjualan and pendapatan.

from this table
[Image: mGfrv8q]

thanks before

file_exists and DRY principle

Separating controllers so they can work on their own

$
0
0
Hello all! 

Besides the default controller I made another called Register with a function called pass. I added a button that would link from default controller to Register and it ends up showing a 404 error. I look in the url and this is what shows up:

http://culturedkink.com/index.php/Welcom...ister/pass

I realize no matter how many controllers I create it ends up being connected to the default (Welcome). How do I separate so they can function on their own?

Heart Heart ,
Mekaboo

Database Connection

$
0
0
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => '192.168.1.55',
    'username' => 'sa',
    'password' => 'admin1234',
    'database' => 'MyDatabase',
    'dbdriver' => 'sqlsrv',
    'dbprefix' => '',
    'pconnect' => TRUE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

this is my database connection and working fine...

but when i copy folder to run at another computer it's now working


error :
unable to connect to your database server using the provided setting.

i try to change
    'db_debug' => FALSE,


it's working but some CI function not working
like  : num_rows() , etc..

i use xampp, and sql server database

Migration Methods

Accessing default controller

$
0
0
hi,

Just installed beta2.

For some reason I can't access the default controller by just going to http://localhost:8080/mysite/

only by going to http://localhost:8080/mysite/public

I have changed the baseUrl to


PHP Code:
public $baseURL 'http://localhost:8080/mysite/'

also in the env file.

Thanks

condition based Print icon should be visible?

$
0
0
I want to restrict download pdf file at two attempts only. Is there any possibility to block or hide using php or php codeigniter. need suggestion

Process Controller file before run

$
0
0
I want make something like this

i have controller in controller folder example News.php

in news php all code encode to base64,so i want to make before controller run .Codeingiter eval and decode that code.Is possible doing in codeigniter?

thanks,sorry for my bad english

CI Starter

$
0
0
I've been developing with CI for a few years(since 2009), but never really had a forum account for some reason(or maybe I did but deleted it, I can't remember)

Anyway, a while ago, I put together a CI starter project with composer support, testing, proper exception support and a bunch of other stuff like plates templating etc.

Wondered if there would be any interest in this, and if so if this was the best place to link to it or not?
Viewing all 14348 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>