2014-03-13 1 views
0

내 사용자 이름을 내 페이지의 목록에 인쇄하고 싶습니다. 나는 확신 내 쿼리 올바른 메신저를 쓴 적이 있지만 나는이 오류 얻을 : 여기데이터베이스에 사용자 이름 목록을 묻는 중

function get_users($username){ 
    echo $username; 
} 

(70)가 제 기능입니다 : 여기

Fatal error: Cannot redeclare get_users() (previously declared in C:\wamp1\www\cms1\user_list.php:70) in C:\wamp1\www\cms1\includes\user_list_functions.php on line 7

이 user_list.php의 일부를 User_list_functions.php : 7

function get_users($username) { 
    global $connection; 
    $query = "SELECT * FROM users_survey WHERE username = {$username} ORDER BY position ASC"; 
    $username = mysql_query($query, $connection); 
    confirm_query($username); 
} 
+0

그리고 무엇을 포함 user_list.php 또는 사용 클래스 (객체 지향 프로그래밍)을 제거 재 선언의 요점은 무엇입니까? –

답변

3

귀하의 오류가 분명하다, 두 get_users 기능

+0

나는 질문을 읽을 때 나는 육체적으로 lol'd. –

+0

나도 그래! = D 때때로 오류 메시지를 읽는 것이 유용 할 수 있습니다. –

0

I이 잉크는 당신이 User_list_functions.php에서 user_list.php 포함되어 있으며 그 두 기능이 충돌하는 이유 ...이다

솔있다 : 하나 ... 더 나은 이해와 결과를

관련 문제