Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class test
- {
- private $server;
- private $db;
- private $user;
- private $pass;
- function __construct($var1, $var2)
- {
- // do something... validate var1 and var2
- // do $this->var1=$var1; etc
- }
- // other functions
- ...
- public function login($parameter1)
- {
- $this->new=$parameter1;
- my connection and here i would like to use
- $this->server,
- $this->db,
- ...
- }
- }
- ?>
- <?php
- include 'connections.php';
- $class = new test(var1, var2);
- $class -> login($parameter1);
- ?>
- <?php
- $server = 'something';
- $db = 'something';
- $user = 'something';
- $pass = 'something';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement