cookie
phpでcookie実装時にエラーがおきました
発生している問題・エラーメッセージ
chrome
1Warning: Cannot modify header information - headers already sent by (output started at C:\Users\remin\OneDrive\デスクトップ\infinityfree\newfile\pos.php:1) in C:\Users\remin\OneDrive\デスクトップ\infinityfree\newfile\pos.php on line 19
php
php
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <title>POS - php</title> 8 <link rel="stylesheet" href="pos.css"> 9</head> 10<body> 11 <form method="get" action="pos.php"> 12 <input type="submit" class="pos" name="food" value="ポテチ"> 13 <input type="submit" class="pos" name="food" value="ガム"> 14 <input type="submit" class="pos" name="food" value="あめ"> 15 <input type="submit" class="pos" name="food" value="からあげ"> 16 <input type="submit" class="pos" name="food" value="肉まん"> 17 </form> 18 <?php 19 setcookie("nikumann",'youtube'); 20 ?> 21</body> 22</html>
試したこと
if消したりget消したりしました
回答1件
あなたの回答
tips
プレビュー