Advertisement
Guest User

Untitled

a guest
Jan 9th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.26 KB | None | 0 0
  1. $host="localhost";
  2. $user="root";
  3. $pass="daniel090";
  4. $db="scoala";
  5.  
  6. $id=$_GET['id'];
  7.  
  8. $gen=$_GET['gen'];
  9.  
  10. $nr=$_GET["nr"];
  11.  
  12. $conn=mysqli_connect($host,$user,$pass) or die("Nu ma pot conecta la baza de date");
  13.  
  14. mysqli_select_db($conn , $db) or die ("Nu gasesc baza de date");
  15.  
  16.  
  17.  
  18.  $query_meniu_orizontal=mysqli_query($conn,"SELECT * FROM meniu_orizontal_pg WHERE id='$id'");
  19.  
  20.  $query_meniu_lateral=mysqli_query($conn,"SELECT  * FROM meniu_lateral_pg WHERE name='$gen'");
  21.  
  22.  
  23.    
  24.   while($result1=mysqli_fetch_array($query_meniu_orizontal)){
  25.      
  26.          
  27.          include ($result1['Pagina']);
  28.        
  29.       }
  30.      
  31.   while($result2=mysqli_fetch_array($query_meniu_lateral)){
  32.         include ($result2['link']);
  33.       }
  34.      
  35.  
  36.  
  37. mysqli_select_db($conn , $db) or die ("Nu gasesc baza de date");
  38.  
  39.  
  40.         ?>
  41.    </article>
  42.    
  43.    
  44.  
  45.      
  46.      <!--SCRIPT DE PAGINARE-->
  47.    
  48.  
  49.        
  50. <?php
  51.      
  52.  
  53.  
  54.    
  55.  
  56.        
  57.   //Selectam articolele din baza de date
  58.   $query=mysqli_query($conn,"SELECT * FROM $gen ");
  59.   $num_rows=mysqli_num_rows($query);
  60.  
  61.        
  62.    while($articole=mysqli_fetch_array($query)){
  63.           echo "<a href=\"index.php?nr=$articole[id]&gen=$gen\">Filmul a</a>";
  64.        if(isset($nr)){
  65.                 include ("Filme/$articole[nume_film]") ;
  66.    
  67.          }
  68.      
  69.          
  70.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement