Search Results

Search found 1 results on 1 pages for 'user570782'.

Page 1/1 | 1 

  • trying to redirect the php page is get id is empty ir does not exists.

    - by user570782
    <? include..... if ($picid != $_GET['picid']) || (empty($picid)) { echo "page not working"; } else { $picid = $_GET['picid']; $query = mysql_query("SELECT * FROM pic_info WHERE picid = 'picid1' ");// problem while($rows = mysql_fetch_assoc($query)): $picid = $rows['picid']; $title = $rows['title']; $link = $rows['link']; $description = $rows['description']; $movie_pic = $rows['movie_pic']; $source = $rows['source']; } $get_comment = mysql_query("SELECT * FROM comment WHERE picid ='$picid'");// work partially $comment_count = mysql_num_rows($get_comment); if ($comment_count>0) { messages = " "; while ($com = mysql_fetch_array($get_comment)){ $comment_id = $com['comment_id']; $name = $com['name']; $message = $com['message']; $time_post= $com['time_post']; $messages .= '<em> on ' .$time_post.'</em><b> '.$name.' said.....</b><br/> '.$message.'<hr/>'; // line with problem } } ?> i am stuck i am trying to say that if $_GET['picid']; is empty echo out error message or if the movid does not exist in the db echo out error message. when i run it i get an error. not sure if i am calling the correct function. what am i doing wrong please help

    Read the article

1