Jump to content

zazu

Members
  • Content Count

    49
  • Joined

  • Last visited

Community Reputation

0 Neutral

About zazu

  • Rank
    Member
  1. <?php session_start(); $db_username = 'rpre0623_mb95'; $db_password = '0a%Iu(tG6,!@'; $db_name = 'rpre0623_mb95'; $db_host = 'localhost'; $mysqli = new mysqli($db_host, $db_username, $db_password, $db_name); function toate_produsele_active($mysqli) { $push = array(); $result = mysqli_query($mysqli, "SELECT product_id, product_name, category_url, product_short_desc, product_price, product_photo FROM mb95_products") or trigger_error(mysqli_error()); var_dump($result); while($row = mysqli_fetch_array($result, MYSQLI_NUM)) { $push[] = $row; } return $pu
  2. Ok i've used var_dumb and the select is returning NULL but i cant understand why is that cuz the select query seems to be ok.
  3. function toate_produsele_active() { $push = array(); $result = mysqli_query($mysqli, "SELECT product_id, product_name, category_url, product_short_desc, product_price, product_photo FROM mb95_products"); while($row = mysqli_fetch_array($result, MYSQLI_NUM)) { $row = array_map('stripslashes', $row); $push[] = $row; } return $push; } $f = fopen('php://output', 'wb'); if($f) { foreach(toate_produsele_active() as $produs) { $coloane = array( $produs['product_id'], $produs['product_name'], $produs['category_
  4. <?php function toate_produsele_active() { $db_username = 'root'; $db_password = ''; $db_name = 'mb95-romania'; $db_host = 'localhost'; $mysqli = mysqli_connect($db_host, $db_username, $db_password,$db_name); $array_produse = mysqli_query($mysqli, "SELECT product_id, product_name, category_url, product_short_desc, product_price, product_photo FROM mb95_products"); return array($array_produse); } $f = fopen('php://output', 'wb'); if($f) { foreach(toate_produsele_active() as $produs) { $coloane = array( $produs['product_id'], $produs['product_name'],
  5. <?php require_once("config/db-connect.php"); function toate_produsele_active() { $array_produse = mysqli_query($mysqli, "SELECT product_id, product_name, category_url, product_short_desc, product_price, product_photo FROM mb95_products"); while ($row = mysqli_fetch_assoc($array_produse)) { print_r($row); } } $f = fopen('php://output', 'wb'); if($f) { foreach(toate_produsele_active() as $produs) { $coloane = array( $produs['product_id'], $produs['product_name'], $produs['category_url'], $produs['product_short_desc'],
  6. is not working with all columns, i miss something else?
  7. Hey guys, I have to export all my products from database into a csv file when executin the following script but i can't manage to put together the function that returns all my products from database. <?php require_once("config/db-connect.php"); function toate_produsele_active() { $array_produse = mysqli_query($mysqli, "SELECT product_id FROM mb95_products"); return $array_produse; } $f = fopen('php://output', 'wb'); if($f) { foreach(toate_produsele_active() as $produs) { $coloane = array( $produs['product_id'], $produs['product_name'],
  8. Hey guys i have 2 buttons that i hide and show depending on users click. What i want to do is when a user click first button to rememeber in a cookie that the button is clicked and show the secound button and viceversa. My js code that i;m using right now is posted bellow. How can i do this? Thank you very much! var first = document.getElementById( 'first' ), second = document.getElementById( 'second' ); function toggle() { if ( first.style.display === "block" ) { first.style.display = "none"; second.style.display = "block"; } else { // switch back
  9. <?php $result = mysqli_query($conn, "SELECT * FROM user_pers_juridica WHERE categorie='marci'"); echo "<form action='compara-marci.php' method='get'>"; echo "<div class='form-group'>"; echo "<select name='id' id='id' class='form-control'>"; echo "<option value='' disabled selected>Alegeti un judet...</option>"; while($row = mysqli_fetch_array($result)) { echo "<option value='" . $row['id_companie'] . "'>" . $row['nume_companie'] . "</option>"; } echo "</select>"; echo "</div>"; echo "<p><button type='submit' class='btn btn-pr
  10. I've done something similar but with only one select dropdown list. The code is below <form action="oras.php" method="get"> <div class="form-group"> <?php $result = mysqli_query($conn, "SELECT * FROM orase_disponibile ORDER BY titlu_oras ASC"); echo "<select name='id' id='id' class='form-control' required>"; echo "<option value='' disabled selected>Alegeti un oras...</option>"; while($row = mysqli_fetch_array($result)) { echo "<option value='" . $row['id_oras'] . "'>" . $row['titlu_oras'] . "</option>"; }
  11. Hello guys, I have a page named compare.php with two dropdown lists wich are populated with same values from a specific table. Now what i want to do is when a user is selecting one value from the first dropdown and another value from the secound dropdown to be redirected to a page lets say compare-items.php?id=1&id=2 and here in two different cols to get the values for the items, in the first col the values for the first item, and in the secound col the values from the sec item. How can i achive that? Thank you very much!
  12. Hi, I have the following code for playing a video on my page. The problem is that the video works good on desktop browsers, but on desktop safari and mobile browsers it displays me only the cover image not playing the video. I've tried a couple of solutions but none of them seems to be working for me. <video autoplay class="embed-responsive-item" poster="videos/cover.jpg"> <source src="videos/landing_page_video_vimeo5_converted.mp4" type="video/mp4"> <source src="videos/landing page video vimeo5.ogg" type="video/ogg"> <source src="videos
  13. Hi guys, I have a video into a bootstrap modal form that is opened on click. Now when i close the modal i want that video to stop playing. I've manage to do some javascript to do that but instead of stopping the the video i want it stops all the video from that page. How can i target in the script below only the ID of the modal that i want to be stoped from playing? <script> $('body').on('hidden.bs.modal', '.modal', function () { $('video').trigger('pause'); }); </script>
×
×
  • 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.