FYI_Geek Posted March 8, 2010 Share Posted March 8, 2010 I am looking for a way to make it easier to call events so i can just call it from the commen .php so i don't have to keep re-writing out the sql = every time i need it. Whats the best way to go about doing this. I am trying to go with php call function, still learning so it's going slow lol. My issue is, i have a database connect, to table users, when i call that function nothing happens and no error message. there was an error. include "includes/common.php"; function users(){ return ($users); } I will try again after i get home tonight. Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/ Share on other sites More sharing options...
sonnieboy Posted March 9, 2010 Share Posted March 9, 2010 can anyone, please help, please? Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1023326 Share on other sites More sharing options...
sonnieboy Posted March 9, 2010 Share Posted March 9, 2010 I am truly sorry. I was clicking on my own thread and clicked this in error. Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1023327 Share on other sites More sharing options...
cs.punk Posted March 9, 2010 Share Posted March 9, 2010 I am looking for a way to make it easier to call events so i can just call it from the commen .php so i don't have to keep re-writing out the sql = every time i need it. Whats the best way to go about doing this. I am trying to go with php call function, still learning so it's going slow lol. My issue is, i have a database connect, to table users, when i call that function nothing happens and no error message. there was an error. include "includes/common.php"; function users(){ return ($users); } I will try again after i get home tonight. Why not show your 'users' function to us? Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1023495 Share on other sites More sharing options...
FYI_Geek Posted March 9, 2010 Author Share Posted March 9, 2010 Why not show your 'users' function to us? Huh? maybe i am hearing you wrong but what does my sql have to do with calling the function? I just wanted to know the best way to call it so i can make it easier for me to use. The above aint working. Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1023631 Share on other sites More sharing options...
Adam Posted March 9, 2010 Share Posted March 9, 2010 I don't think you've explained what you're trying to acheive clear enough. You want a series of functions you can inlcude to perform repetitive queries? Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1023640 Share on other sites More sharing options...
FYI_Geek Posted March 10, 2010 Author Share Posted March 10, 2010 I don't think you've explained what you're trying to acheive clear enough. You want a series of functions you can inlcude to perform repetitive queries? Yeah sorry about that, i was in a rush i had so much to to lol. But i got it after i studied the online functions. I believe i got it done, seems to work ok fine. function validate_users() { * PHP/SQL INFO } function user_login() { * PHP LOGIN HERE } On the pages i used: include "data/functions.php:; validate_users(); If i missed anything let me know thanks! Link to comment https://forums.phpfreaks.com/topic/194556-need-help-in-making-a-commenphp-file/#findComment-1024212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.