Jump to content

[SOLVED] Ugh... Headers Already Sent


pugboy

Recommended Posts

Yes, I DID read the sticky, and CAN NOT figure out this header problem...

 

<?php
$user = $_POST["user"];
$pass = md5(md5(md5($_POST["pass"])));
mysql_connect("localhost", "****", "****") or die(mysql_error());
mysql_select_db("ffforum_shop") or die(mysql_error());
$q = "SELECT pass FROM user WHERE user = '" . $user . "'";
$result = mysql_query($q);
list($passv) = mysql_fetch_array($result);
if(!$pass==$passv){
die("Wrong password. Press your back button to try again.");
}
$q = "SELECT id FROM user WHERE user = '" . $user . "'";
$result = mysql_query($q);
list($store) = mysql_fetch_array($result);
setcookie('user', $user, $time);
setcookie('sid', $store, $time);
?>
Logged in correctly. Head over to the <a href='panel/index.php'>Control panel</a>.

 

 

Does ANYONE see ANYTHING wrong with this? I see no whitespace in the WHOLE entire code!!! Am I being really stupid?

Link to comment
https://forums.phpfreaks.com/topic/113991-solved-ugh-headers-already-sent/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.