Glenskie Posted January 27, 2012 Share Posted January 27, 2012 ok it updates the posts table , but not the notifications table , helP! <?php include("../includes.php"); $session =$logOptions_id; if($session) { $id = $_POST['id']; if(!$id) { $id = $session; } $post = mysql_real_escape_string($_POST['post']); $date = mktime(); $action_type = 0; mysql_query("INSERT INTO posts SET to_id='$id',from_id='$session',post='$post',type='$action_type',date='$date'"); $post_id = mysql_insert_id(); $query = mysql_query("SELECT id,to_id,from_id,post,type,state,date FROM posts WHERE id='$post_id' AND state='0' ORDER BY id DESC LIMIT 15"); print posts($query, "newPost"); if($id!=$session) { mysql_query("INSERT INTO notifications SET user_id='$id', from_id='$session', post_id='$post_id', action_type='$action_type', date='$date'"); } } ?> Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted January 27, 2012 Share Posted January 27, 2012 then either $id == $session or your query is failing for some reason. If you suspect the ladder, use mysql_query to debug the query. Quote Link to comment Share on other sites More sharing options...
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.