Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24
  1. #21

    Hey george..if error then set echo $errors[0] else if account activated then echo @$errors...hahaha

  2. #22
    Quote Originally Posted by cardwell164 View Post
    mga sir thank you gyud kaayo sa mga help. however naa nsad another problem ni arise huhu. i hope mo tabang gihapon mo hehe.

    mao ni ang situation, gusto nako ipa display si $data para maka hibaw ko if ni work ba or ma pasa ba jud ang query. kaso sa pag display pa lang d na man mo gawas. i dont know if asa dapita ang error if sa syntax ba sa sql or something wrong jud sa php code nako. anyway mga bros here it goes

    mao ni ako init.php

    Code:
    <?php
    session_start();
    
    require 'database/connect.php';
    require 'functions/general.php';
    require 'functions/users.php';
    
    if (logged_in() == true)
    {
        $session_user_id = $_SESSION['userid'];
        $user_data = user_data($session_user_id, 'userid', 'username', 'password', 'firstname', 'lastname', 'email');
    }
    
    $errors = array();
    ?>
    and mao ni akong users.php. ang ako lang gi include diri is ang kato rang function nga feel nako naa ang error mahitabo

    Code:
    function user_data($userid)
    {
        $data = array();
        $userid = (int)$userid;
    
        $func_num_args = func_num_args();
        $func_get_args = func_get_args();
    
        if($func_num_args > 0)
        {
            unset($func_get_args[0]);
            $fields = '`' . implode('', $func_get_args) . '`';
            $data = mysql_fetch_assoc(mysql_query("SELECT '$fields' FROM users WHERE userid = '$userid'"));
    
            print_r($data);
    
            return $data;
        }
    }
    hinaot maka tabang gihapon mo nako
    Ang lisud ani TS kay dinha dapit sa $fields gi-implode man nimo unya ang result adto after sa SELECT statement ... if multiple columns separated with comma unta right? But you have this in your implode function implode('', $func_get_args() and not sure why this '`' are on those lines too.

  3. #23
    salamat sa mga tabang mga bro. na figure out na nako. it turned out problem sa pag retrieve sa user id nga gi store sa session ang problem mao dili mo display hehe. salamat kaayo sa mga help

  4. #24
    Quote Originally Posted by cardwell164 View Post
    salamat sa mga tabang mga bro. na figure out na nako. it turned out problem sa pag retrieve sa user id nga gi store sa session ang problem mao dili mo display hehe. salamat kaayo sa mga help
    Would be great to include the working code also.. hehe, great to hear na solve. I'm intermediate on this programming stuff also.

  5.    Advertisement

Page 3 of 3 FirstFirst 123

Similar Threads

 
  1. unsay 1st forum ang imong e view inig log in nimo sa istorya.net?
    By chill_angel25 in forum General Discussions
    Replies: 201
    Last Post: 09-09-2015, 05:12 AM
  2. Replies: 23
    Last Post: 11-28-2012, 08:33 AM
  3. Replies: 17
    Last Post: 06-28-2012, 03:54 PM
  4. Replies: 0
    Last Post: 02-18-2010, 12:20 PM
  5. ned help abt sa program on log in and out sa cafe......
    By blossom1021 in forum Programming
    Replies: 3
    Last Post: 10-18-2006, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top