Pues con esta linea que me has anyadido no me muestra ningun resultado, no se el error pues se carga en ajax la pagina,
para verlo, keepyourlinks.com, usuario juan pass juan (es un usuario de pruebas que tengo), settings y bueno, solo hay una opcion
EDIT,
despues de mas pruebas, estoy con
Código PHP:
<?php
include('configuracion.php');
session_start();
if(!isset($_SESSION['logueado']) | !$_SESSION['logueado'] ){
header("Location: http://keepyourlinks.comxa.com/includes/wellcome.php");
}
$id = $_SESSION['id'];
if(isset($_POST['submit'])){
if($_POST['share']){
$query = mysql_query("SELECT * FROM usuarios WHERE id = '$id'") or die(mysql_error());
$data = mysql_fetch_array($query);
if($data['comparte'] == 1 ) {
$sql = "UPDATE usuarios SET comparte = 0 WHERE id = $id";
$res = mysql_query($sql);
$_SESSION['comparte'] = 0;
}else{
$sql = "UPDATE usuarios SET comparte = 1 WHERE id = $id";
$res = mysql_query($sql);
$_SESSION['comparte'] = 1;
}
}
}
?>
<div id="csc"><!--the_box-->
<span class="tr"></span>
<div class="cssbox"> <div class="cssbox_head"> <h2>SETTINGS</h2> <hr /><br /> </div> <div class="cssbox_body">
<form name = "profile" method="post" action="javascript:FAjax('./php/profile.php','contenidos','share='+document.getElementById('share').value,'POST');">
<label>Select this option if you don't mind if other users find your links
<? if($_SESSION['comparte']==1){
echo "<input type='checkbox' name='share' id='share' checked>";
}
else{
echo "<input type='checkbox' name='share' id='share'>";
}
?>
</label>
<INPUT name="submit" type="submit" value="Enviar">
</form>
</div></div>