הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 02-04-07, 12:46   # 1
username1
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 182

username1 לא מחובר  

שגיאה בקובץ התחברות ( PHP )

הקובץ מכיל את הקוד הנ"ל:

PHP קוד:
<center><font face=arial size=3>
<? 
include "includes/config.php";
include 
"includes/includes/db.php";

$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];

if(
$submit) {
$sql 
SELECT * 
FROM members WHERE 1 
AND username = '$username' 
AND password = '$password' 
"

    
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
    while (
$row mysql_fetch_array($result)) { 
        
$username $row["username"]; 
        
$password $row["password"];
        
$id $row["id"];
        }
if(!
mysql_num_rows($result)) {
echo 
"שם משתמש או סיסמה שגויים";
exit();
}

    
setcookie("user"$username,time() + 3600);
    
setcookie("pw"$passwordtime() + 3600);
    
setcookie("id"$idtime() + 3600);
echo 
"<meta http-equiv='refresh' content='5; url=index.php'>";
}
?> </center></font>
והשגיאה:
ציטוט:
Warning: Cannot modify header information - headers already sent by
אשמח לעזרה.
__________________
סטיבן, איש מכירות של חברת Sprint-Serv
מייל: Steven@Sprint-Serv.net
תא קולי: 057-6500000 מספר מנוי 3333 ( נא השאירו הודעות בתא הקולי ואחזור אליכם בהקדם )

I close my eyes and I can see you dead
  Reply With Quote
ישן 02-04-07, 12:49   # 2
Gal Shafrir
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,626

Gal Shafrir לא מחובר  

תוסיף בתחילת הקוד:

PHP קוד:
ob_start(); 
ובסוף הקוד:

PHP קוד:
ob_end_flush(); 
__________________
בברכה,
גל שפריר - מעצב ומפתח אתרים.

עופר שפריר - במאי, תסריטאי ומפיק.
  Reply With Quote
ישן 02-04-07, 12:53   # 3
username1
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 182

username1 לא מחובר  

עדיין שגיאה.
__________________
סטיבן, איש מכירות של חברת Sprint-Serv
מייל: Steven@Sprint-Serv.net
תא קולי: 057-6500000 מספר מנוי 3333 ( נא השאירו הודעות בתא הקולי ואחזור אליכם בהקדם )

I close my eyes and I can see you dead
  Reply With Quote
ישן 02-04-07, 12:59   # 4
Gal Shafrir
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,626

Gal Shafrir לא מחובר  

התכוונתי לפני ה center וה-font, ואחרי הסגירה שלהם.
__________________
בברכה,
גל שפריר - מעצב ומפתח אתרים.

עופר שפריר - במאי, תסריטאי ומפיק.
  Reply With Quote
ישן 02-04-07, 13:03   # 5
username1
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 182

username1 לא מחובר  

זה מה שעשיתי.. עדיין שגיאה
PHP קוד:
<center><font face=arial size=3>
<? 
ob_start
();
include 
"includes/config.php";
include 
"includes/includes/db.php";

$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];

if(
$submit) {
$sql 
SELECT * 
FROM members WHERE 1 
AND username = '$username' 
AND password = '$password' 
"

    
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
    while (
$row mysql_fetch_array($result)) { 
        
$username $row["username"]; 
        
$password $row["password"];
        
$id $row["id"];
        }
if(!
mysql_num_rows($result)) {
echo 
"שם משתמש או סיסמה שגויים";
exit();
}

    
setcookie("user"$username,time() + 3600);
    
setcookie("pw"$passwordtime() + 3600);
    
setcookie("id"$idtime() + 3600);
echo 
"<meta http-equiv='refresh' content='5; url=index.php'>";
}
ob_end_flsuh();
?> </center></font>
__________________
סטיבן, איש מכירות של חברת Sprint-Serv
מייל: Steven@Sprint-Serv.net
תא קולי: 057-6500000 מספר מנוי 3333 ( נא השאירו הודעות בתא הקולי ואחזור אליכם בהקדם )

I close my eyes and I can see you dead
  Reply With Quote
ישן 02-04-07, 13:10   # 6
Meir
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Dec 2006
גיל: 34
הודעות: 383

Meir לא מחובר  

אתה צריך לשים את הob_start לפני הכל

PHP קוד:
<? ob_start(); ?>
<center><font face=arial size=3>
<? 
include "includes/config.php";
include 
"includes/includes/db.php";

$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];

if(
$submit) {
$sql 
SELECT * 
FROM members WHERE 1 
AND username = '$username' 
AND password = '$password' 
"

    
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
    while (
$row mysql_fetch_array($result)) { 
        
$username $row["username"]; 
        
$password $row["password"];
        
$id $row["id"];
        }
if(!
mysql_num_rows($result)) {
echo 
"שם משתמש או סיסמה שגויים";
exit();
}

    
setcookie("user"$username,time() + 3600);
    
setcookie("pw"$passwordtime() + 3600);
    
setcookie("id"$idtime() + 3600);
echo 
"<meta http-equiv='refresh' content='5; url=index.php'>";
}
?> </center></font>
<? ob_end_flsuh(); ?>
__________________
רק אחרי שנמצאים בחושך, אפשר להעריך את האור.
  Reply With Quote
ישן 02-04-07, 13:12   # 7
Matchs
תודה על תרומתך.
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: מרכז.
הודעות: 935

Matchs לא מחובר  

זה flush..
__________________
לפניות, אנא השאירו לי הודעה פרטית.
Matchs.
  Reply With Quote
ישן 02-04-07, 13:16   # 8
username1
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 182

username1 לא מחובר  

תיקנתי, ועדיין שגיאה של
ציטוט:
Warning: Cannot modify header information - headers already sent by
__________________
סטיבן, איש מכירות של חברת Sprint-Serv
מייל: Steven@Sprint-Serv.net
תא קולי: 057-6500000 מספר מנוי 3333 ( נא השאירו הודעות בתא הקולי ואחזור אליכם בהקדם )

I close my eyes and I can see you dead
  Reply With Quote
ישן 02-04-07, 13:21   # 9
חיים
חבר וותיק
 
חיים's Avatar
 
מיני פרופיל
תאריך הצטרפות: Sep 2006
מיקום: עפולה
גיל: 32
הודעות: 1,548
שלח הודעה באמצעות ICO אל חיים שלח הודעה באמצעות MSN אל חיים Send a message via Skype™ to חיים

חיים לא מחובר  

כי זה שולח לך תוכן תמחק את זה:<center><font face=arial size=3>
__________________
בברכה, חיים.

  Reply With Quote
ישן 02-04-07, 13:24   # 10
Eran-s
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 2,609

Eran-s לא מחובר  

אתה מאנקלד את הקובץ הזה בקובץ אחר?
__________________
מפתח ומתחזק אתרים.
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 20:06.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ