Jump to content

williamh69

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

0 Neutral

About williamh69

  • Rank
    Member
  1. Hi guys i have this error, Parse error: syntax error, unexpected end of file in C:\wamp64\www\nigthclub\videos.php on line 103 but i know is probably easy to solve but for some reason i dont see the error. please help me <?php session_start(); ?> <?php error_reporting (E_ALL ^ E_NOTICE); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <link href="tablefiestas.css" rel="stylesheet" type="text/css" /> <title>La Taverna de Juan</title> </head> <body> <div id="container"> <div id="header"> <!--MENU BAR--> <?php include("includes/db.php"); ?> </div> <!--VIDEOS--> <?php $query = ("SELECT * from videos"); $result = mysqli_query($connection,$query); $num_per_page =05; ?> <table border="1" width="100%"> <tr> <td>Video Id</td> <td>Titulo</td> <td>Video</td> </tr> <tr> <?php while ($row=mysqli_fetch_assoc($result)) { $videoid = $row['videoid']; $titulo = $row['titulo']; $url_video = $row['url_video']; ?> <td><?php echo $videoid ?></td> <td><?php echo $titulo ?></td> <td><?php echo $url_video ?></td> </tr> <?php}?> </table> <?php $query = "SELECT * from videos"; $pr_result = mysqli_query($connection,$query); $totalrecord = mysqli_num_rows($pr_result); echo $totalrecord; ?> <br> <div id="footer"> <!--FOOTER--> <?php include("includes/footer.inc.php"); ?> </div> </div> </body> </html>
  2. hi trying to make a grid of two columns , data from db using mysqli and php, but it does not work...can you guys help me thanks in advance <?php $limit=2; $count=0; echo"<table border='0' align='center' cellpadding='2' cellspacing='2' width='70%'>"; $query = "SELECT * FROM posts"; $select_all_categories_query = mysqli_query($connection, $query); while ($row = mysqli_fetch_assoc($select_all_categories_query)){ $post_image = $row['post_image']; $post_title = $row['post_title']; $post_content = $row['post_content']; $post_user = $row['post_user']; $post_date = $row['post_date']; if ($count < $limit) { if($count ==0) { echo"<tr>"; } echo"<div class='post-img'>"; echo"<div class='img'>"; echo"<img src='assets/img/blog/$post_image' alt='Blog'>"; echo"</div>"; echo"<div class='tag'>"; echo"<a href='#'><span class='icon'><i class='fas fa-tags'></i></span> Business</a>"; echo"</div>"; echo"</div>"; echo"<div class='cont'>"; echo"<h6><a href='blog-single.html'>$post_title</a></h6>"; echo"<p>$post_content</p>"; echo"<div class='info'>"; echo"<a href='#'><span class='author'><img src='assets/img/blog/4.png' alt='Post'></span>$post_user</a>"; echo"<a href='#' class='right'><span class='icon'><i class='fas fa-clock'></i></span> $post_date</a>"; echo"</div>"; echo"</div>"; }else { $count=0; echo"<div class='post-img'>"; echo"<div class='img'>"; echo"<img src='assets/img/blog/$post_image' alt='Blog'>"; echo"</div>"; echo"<div class='tag'>"; echo"<a href='#'><span class='icon'><i class='fas fa-tags'></i></span> Business</a>"; echo"</div>"; echo"</div>"; echo"<div class='cont'>"; echo"<h6><a href='blog-single.html'>$post_title</a></h6>"; echo"<p>$post_content</p>"; echo"<div class='info'>"; echo"<a href='#'><span class='author'><img src='assets/img/blog/4.png' alt='Post'></span>$post_user</a>"; echo"<a href='#' class='right'><span class='icon'><i class='fas fa-clock'></i></span> $post_date</a>"; echo"</div>"; echo"</div>"; } $count++; } echo"</tr></table>"; ?> this is the result i want this kind of result thank you
  3. Got it... my mistake.. calling wrong function syntax
  4. Hi guys I AM NEW TO PHP AND MYSQLI... TRYING TO CALL FUNCTION BUT I GOT ERROR CANT FIGURE OUT WITH IT IS, THANKS FOR HELP ME functions.php <?php function Updatepost(){ global $db; $query = "UPDATE posts SET title='Yo me quiero casar con gloria', body='Me gusta el 69' WHERE id=3"; $result = mysqli_query($db, $query); if(!$result){ echo mysqli_error($db); } else{ echo "updated row sucessfully"; } } ?> Index.php <?php include("includes/db.php"); include("functions/functions.php"); ?> <?php function Updatepost(); ?> ERROR Parse error: syntax error, unexpected ';', expecting '{' in C:\wamp64\www\gloria-blog\index.php on line 9 THANKS
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.