• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change variable value in php file

#1
Hello
I have below data in application/config/config.php
$config['sms_number'] = '0123124123123';

Now i need to change it without manual
So i need get data via user and set it to $config['sms_number']
Maybe?
Reply

#2
Don't. Store the value in your database and create a form to change the value and update the record.
Reply

#3
(09-11-2017, 08:52 AM)Wouter60 Wrote: Don't. Store the value in your database and create a form to change the value and update the record.

Why?
Reply

#4
I dont quite understand your problem? If the sms number changes why would you have it in the $config array in the first place?
The config is normally used for things that dont change.

When does the number change? When a user logs in? Then I agree with Wouter60 the sms number should be in the database with the other user relevant data.
On the package it said needs Windows 7 or better. So I installed Linux.
Reply

#5
https://codeigniter.com/user_guide/libra...onfig-item
Reply

#6
(09-11-2017, 09:49 AM)rtenny Wrote: I dont quite understand your problem? If the sms number changes why would you have it in the $config array in the first place?
The config is normally used for things that dont change.

When does the number change? When a user logs in? Then I agree with Wouter60 the sms number should be in the database with the other user relevant data.

I understood your purpose.
I try save data in database
Thanks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.