Jump to content

Few Questions on functions


Danny620

Recommended Posts

i am thinking of making a few functions to make life easiser thing is i want to know a few things

 

say i was making a function called viewprofile this would need a $dbc & a user id would i

say

 

include the file in the function for database connections or pass it as a par  say

 

function viewprofile(){

 

include('datbase.php');

 

then use that like to do searches and things or

 

}

 

include('datbase.php');

 

then create function

 

function viewprofile($dbc,$id){

 

}

Link to comment
https://forums.phpfreaks.com/topic/173474-few-questions-on-functions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.