Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

if (USE_PCONNECT == 'true') { //current :false , so do not used now.

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

printf("tep_db_connect result(mysql_connect performed !! ): %s \n",$$link);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

 

Dear whom may concern:

 

I am beginner developer in PHP. When I see $$link. I could not understand it. the code is working now well.

but I want to know the meaning. whey define " global $$link " in upper code?

 

Are there anyone? Could you explain the meaning. I was a programmer in 10 years in others field, not php.

but I know php a little and I could fix the osc code a little.

 

Best regards.

Posted (edited)

Yongil,

 

 

Try here:

 

http://www.w3schools.com/php/func_filesystem_is_link.asp

 

 

 

Chris

 

I think he wants to know how variable variables work Chris.

 

Example: -

$test = 'testing';
$$test = 'tested';
echo $testing; // outputs tested

 

$$test is taking the value of $test and assigning it as a variable name with the value of tested.

Edited by FWR Media
Posted (edited)

:blush: my bad

 

 

Well don't do it again!! :D

 

hurstchoi will probably come back and say that wasn't what he was asking at all :)

Edited by FWR Media

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...