Создаю логин форму. Проблема с сэтингом куки(вроде): setcookie(uid,$row['uid'],time()+60*60*24*7);
Warning: Cannot modify header information - headers already sent by (output started at P:\home\crazzard.net\www\login-status.php:61) in P:\home\crazzard.net\www\login-status.php on line 74.
Весь интернет перерыл подобной ошибки с куки не нашел
$CMBsearch = mysql_query("SELECT COUNT(*) as count FROM accounts WHERE username = '$LogInusername' AND password = '$LogInpassword'"); $CMBcount = mysql_fetch_array($CMBsearch);
if(!$LogInusername=="" && !LogInpassword==""){ if($CMBcount['count']>=1){ $CMBsearch2 = mysql_query("SELECT * FROM accounts WHERE username = '$LogInusername' AND password = '$LogInpassword'"); while($row = mysql_fetch_array($CMBsearch2)){ setcookie(uid,$row['uid'],time()+60*60*24*7); echo("<a class=insidedata><div class=textcont>Logged in as ".$row['username']."</div></a>"); } } else{ echo ("<a class=insidedata><div class=textcont>Username and password combination invalid</div></a>"); } echo $_COOKIE['uid']; } else{ echo ("<a class=insidedata><div class=textcont>Fill all fields and try again</div></a>"); } ?>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
Wasc
Всем привет.
Создаю логин форму. Проблема с сэтингом куки(вроде): setcookie(uid,$row['uid'],time()+60*60*24*7);
Warning: Cannot modify header information - headers already sent by (output started at P:\home\crazzard.net\www\login-status.php:61) in P:\home\crazzard.net\www\login-status.php on line 74.
Весь интернет перерыл подобной ошибки с куки не нашел
Вот форма логина:
Вот непосредственно код php код:
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.