PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<html>
<?
session_start();
$emailadd = $_SESSION['Emailadd'];
$con = mysql_connect("fdb3.leadhoster.com","xxxxxxxxxxxxxxx","xxxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("xxxxxxxxxxxxxxxxxx", $con);
$result = mysql_query("SELECT * FROM Account WHERE Emailadd='$emailadd'");
while($row = mysql_fetch_array($result))
{
if($row['Md'] == 'None'){
mysql_query("UPDATE Account SET DJ = '$_POST[DJ]'
WHERE Emailadd=$emailadd");
}
else if($row['DJ'] == 'None'){
mysql_query("UPDATE Account SET Md= '$_POST[Md]'
WHERE Emailadd=$emailadd");
}
}
mysql_close($con);
?>
</html>
what is wrong with this code?
this is the error..
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /srv/disk4/xxxxxx0/www/xxxxxxxxxxxx.com/edit.php:2) in /srv/disk4/xxxxxxxx0/www/xxxxxxxxx.xxxxxxxxxxxxxx.com/edit.php on line 3
Last edited by Benjamin on Sun Nov 20, 2011 7:40 am, edited 1 time in total.
Reason:Added [syntax=php||htm||css||javascript||sql||etc] - Please use [syntax] tags when posting code in the forums! Thanks.