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

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

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 07-01-09, 20:08   # 1
bilopay
חסום
 
מיני פרופיל
תאריך הצטרפות: Aug 2008
הודעות: 452

bilopay לא מחובר  

בעיה | לא מצליח ליצור עוגייה

בטופס הרשמה זה מצליח ליצור לי עוגייה אבל בעמוד התחברות זה שאני מנסה להיתחבר זה נותן לי שגיעה

קוד php:
PHP קוד:
<?
if (!isset($_POST['login_submit']))
{}
else
{
$username htmlspecialchars$_POST['username'] ) ;
$password htmlspecialchars$_POST['password'] ) ;
if (!empty(
$_POST['username']) && !empty($_POST['password']))
{
$link mysql_connect('localhost' 'root' '') or die('Mysql Error: ' mysql_error());  
mysql_select_db('funni' $link) or die('Mysql Error: ' mysql_error());  
  
$query  "SELECT * FROM user WHERE username='$username' && password='$password'" 
$Result mysql_query($query) or die('Mysql Error: ' mysql_error()); 
$N mysql_num_rows($Result);
if(
$N === false
die(
'Mysql Error: ' mysql_error()); 
if (
$N 1
    {
$erorlogin='שם משתמש או סיסמה לא נכונים';
}
else
{

setcookie("funniuser","$username",time()+31536000); 
setcookie("funnipassword","$password",time()+31536000); 
}
}
else
{
$erorlogin='שם משתמש או סיסמה לא נכונים';
}}
?>
השגיעה:
PHP קוד:
WarningCannot modify header information headers already sent by (output started at c:wampwwwfunniindex.php:2in c:wampwwwfunniindex.php on line 25

Warning
Cannot modify header information headers already sent by (output started at c:wampwwwfunniindex.php:2in c:wampwwwfunniindex.php on line 26 
  Reply With Quote
ישן 07-01-09, 21:04   # 2
Speed
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2008
הודעות: 71

Speed לא מחובר  

תשתמש באלה:
ob_start
ob_end_flush

ob_start(); בתחילת הקוד וob_end_flush(); בסופו.
  Reply With Quote
ישן 07-01-09, 21:56   # 3
SniR-S
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Aug 2008
הודעות: 546

SniR-S לא מחובר  

PHP קוד:
setcookie("funniuser","$username",time()+31536000);  
setcookie("funnipassword","$password",time()+31536000); 
צריך להיות לפני headers (נסה, אולי בגלל זה)
  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. הזמן כעת הוא 22:11.

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