0
votes
alert('Your Comment is added!')"; } else{ echo "alert('Cannot Comment')"; } } ?>
<!doctype html>

<meta charset="UTF-8">

<meta name="description" content="" >

<meta name="author" content="">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Compaign Shack </title>

<link rel="shortcut icon" type="image/png" href="img/fevicon.png"/>

<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">


<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">

<link rel="stylesheet" type="text/css" href="css/style.css">

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1

/jquery.min.js">

    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4

/js/bootstrap.min.js">

<!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
<![endif]-->

<style>

#comment{

border-bottom-left-radius:5px;


border-bottom-right-radius:5px;

border-top-left-radius:5px;

border-top-right-radius:5px;

box-shadow: 10px 10px 5px #888888;

}

<div class="container">
Advetising Agency : ".$agency." , Brand Name : ".$row['br_name'].""; ?> Television
  • Image
  • Outdoor
  • Print
  • Digital
  • radio
  • "; ?> '> " type="video/mp4"> " type="video/ogg"> " type="video/webm"> " style='width:60%; height:60%'> " style='width:60%; height:60%'> " style='width:60%; height:60%'> " style='width:60%; height:60%'> " style='width:60%; height:60%'>
    </div>
    
    Other Details

    Other Details :
    "; ?> Creative Team : $cr
    "; echo "Month : $row[month]
    "; echo "Advertising Agency : $row[ad_agency]
    "; echo "Account Team : $a_t
    "; echo "Brand Name : ".$b_name."
    Campaign Slogan : ".$c_slo ."
    Media Release : ".$m_r ."
    Account Leader : " . $a_l ."
    Production : ". $pr ."
    Research Agency : ". $r_a ."
    Additional Credit : ". $a_c."
    Media : TV,Radio,Outdoor,Digital,Print
    "; } ?> 2014-03-06 7:37 am

    hallo, please help me, i get invalid article id, i already follow all the instruction and no such php?id=1 at my page, im using phpadmin v 5.1,

    without article id, nothing i can progress. tq

    --> Wanna Comment ?? Login here"; } else{ echo "


    "; } ?> "; echo ''.$rrrr[3].''; echo " 2014-03-06 7:37 am"; echo "".$rrrr[2]." "; $na=$rrrr[3]; if($na==$una){ echo ""; } echo " "; } /* echo ""; $qqq="select * from comment where post_id=".$_GET['id']; $rrr=mysqli_query($con,$qqq); while($rrrr=mysqli_fetch_array($rrr)) { $na=$rrrr[3]; echo " $rrrr[3]

    $rrrr[2]

    "; if($una==$na){ echo " delete ";} else{ echo ""; } echo "
    "; } ?> */ ?>


    | Login | Register
    Campaign Shack News Have you ever stumbled across a Pakistani advertisement and wondered about the people and agencies behind the advertising campaign? The creative minds who have attempted to communicate some brand related message to you? Or about the ad work that was done in a particular time frame? Have you ever stumbled across a Pakistani advertisement and wondered about the people and agencies behind the advertising campaign? The creative minds who have attempted to communicate some brand related message to you? Or about the ad work that was done in a particular time frame? Space for Google Adds
    </div>
    

    <?php include("footer.php"); ?>
    
    
    
    
    <div id="picture_view" class="modal fade">
    
    <div class="modal-dialog">
    
        <div class="modal-content">
    
            <div class="modal-header">
    
                <button type="button" class="close" data-dismiss="modal" 
    

    aria-hidden="true">×

                <h4 class="modal-title">View</h4>
    
            </div>
    
            <div class="modal-body">
    
             <img src='img/1.png '/>
    
            </div>
    
            <div class="modal-footer">
    
                <button type="button" class="btn btn-default" 
    

    data-dismiss="modal">Close

            </div>
    
        </div>
    
    </div>
    

    <script src="js/jquery-1.9.1.min.js"></script>
    
    <script src="js/bootstrap.min.js"></script>
    
    <script src="js/custom.js"></script>
    

    When i upload a video individually from FTP it will play and when i'll upload form a website it show the mime type or something remove type error

    Here is the Link: http://campaignshack.com/subarchives.php?id=85

    1
    Add error reporting to the top of your file(s) right after your opening <?php tag error_reporting(E_ALL); ini_set('display_errors', 1); You have some syntax errors.Jay Blanchard

    1 Answers

    0
    votes

    Firstly, you see the semi-colon in

    $row=mysqli_fetch_array($res);{
                                 ^ right there
    

    that is killing your script and tells it to end the statement.

    Nothing in there will executed.

    Remove it.

    $row=mysqli_fetch_array($res){
    

    However, that should be a while loop.

    while($row=mysqli_fetch_array($res)){...}
    

    as in:

    while($row=mysqli_fetch_array($res)){
    
        $img1=$row['image'];
    
        $video=$row['video'];
    
        $show="/vdo/".$video;
    
        $lom=$row['lo_med'];
    
        $agency=$row['ad_agency'];
    
    }
    

    Also make sure that $_GET['id'] is indeed an int and not a string.

    Add or die(mysqli_error($con)) to mysqli_query().

    If it is a string, then you will need to modify your query, such as:

    $id = $_GET['id'];
    $query="select * from archives where id='".$id."'";
    

    But this method is open SQL injection, use mysqli with prepared statements, or PDO with prepared statements, they're much safer.


    Add error reporting to the top of your file(s) which will help find errors.

    <?php 
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    
    // rest of your code
    

    Sidenote: Error reporting should only be done in staging, and never production.