8 – How to show selected image in custom form Enitty Brower?

This is my custom form for showing media image.

   $form['attributes']['image'] = [
        '#type'          => 'entity_browser',
        '#entity_browser' =>  'image_entity_browser',
        '#cardinality' => 1, 
       '#selection_mode' => 'selection_append',

How can O

How can I show my image like this after I selected? When I submit my image not show too.

asp.net – Insert selected Image into databse

I want to insert selected image into database

 public void BindImages()
            string query = "select * from Images where Prod_id=@Id";
            SqlCommand cmd = new SqlCommand(query, EcomConString);
            cmd.Parameters.AddWithValue("@Id", SqlDbType.VarChar).Value = id;
            cmd.CommandType = CommandType.Text;
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            if (dt.Rows.Count > 0)
                foreach (DataRow dr in dt.Rows)
                    strImages += @"<li>
                        <img src="https://webmasters.stackexchange.com/" + dr("Img") + @"'  class='img-thumbnail' alt=''  />
                    strThumbImage += dr("Img").ToString() + ",";
        catch (Exception ex)


[OVHcloud] Up to 30% OFF on selected High Performance Dedicated Servers – Lifetime offer | From 64/m

Enjoy 30% OFF on Dedicated Servers (Recurring offer)

“Limited time only” Until 9th of June : https://bit.ly/2TIhe7B
Best offer on Limited edition Dedicated Servers, hosted in Europe (5 locations) or North America


  • Special edition server (recurring pricing)
  • No setup fees
  • Billing in USD


  • Intel Xeon E5-1660v3 – 8 c/16 t
  • 3 GHz/3.5 GHz
  • 64 GB DDR4 ECC 2133 MHz
  • 2 x 4 TB HDD SATA Soft RAID
  • 500 Mbps bandwidth unmetered
  • From $63.41 ex.GST/month


  • Intel Xeon W-2145 – 8 c/16 t
  • 3.7 GHz/4.5 GHz
  • 128 GB DDR4 ECC 2133 MHz
  • 2 x 960 GB SSD NVMe Soft RAID
  • 1 Gbps bandwidth unmetered
  • From $124.10 ex.GST/month

Click here to explore all offers: https://bit.ly/2TIhe7B

Looking for an even more affordable,yet powerful, dedicated server?

Try OVHcloud’s subsidiary: SoYouStart servers:

  • Hosted in Europe or North America datacenters
  • Recurring offers
  • No setup fee with 6 or 12 months Commitment
  • Billing in USD


  • Intel Xeon E5-1620v2 – 4 c/8 t
  • 3.7 GHz/3.9 GHz
  • 32 GB DDR3 ECC 1600 MHz
  • 2 x 2 TB HDD SATA Soft RAID
  • 250 Mbps bandwidth unmetered
  • US$39.59 ex.GST/month


  • Intel Xeon D-1520 – 4 c/8 t
  • 2.2 GHz/2.6 GHz
  • 32 GB DDR4 ECC 2133 MHz
  • 4 x 2 TB HDD SATA Soft RAID
  • 250 Mbps bandwidth unmetered
  • US$39.59 ex.GST/month


  • Intel Xeon D-1520 – 4 c/8 t
  • 2.2 GHz/2.6 GHz
  • 32 GB DDR4 ECC 2133 MHz
  • 2 x 800 GB SDD Soft RAID
  • 250 Mbps bandwidth unmetered
  • US$47.99 ex.GST/month


  • Intel Xeon E5-1620v2 – 4 c/8 t
  • 3.7 GHz/3.9 GHz
  • 32 GB DDR3 ECC 1600 MHz
  • 2 x 800 GB SSD Soft RAID
  • 250 Mbps bandwidth unmetered
  • US$50.99 ex.GST/month

Click here to explore all offers: https://bit.ly/2TIhe7B

Test the OVH network performance:
OVHcloud Speedtest: http://ovh.net/

About OVH

OVHcloud is a global provider of hyperscale cloud, which offers businesses a benchmark for value and performance in the sector. Founded in 1999, the group manages and maintains 30 datacentres in 12 sites across four continents, deploys its own global fibre optic network, and manages the entire supply chain for web hosting. Running on its own infrastructures, OVH provides simple, powerful tools for businesses, revolutionising the way that more than 1 million customers work across the globe. Respect for individuals’ right to privacy and equal access to new technologies is central to the company’s values.
Learn more: https://bit.ly/3c4kYXr

php – How do I get the selected value of the second dropdown from the first dropdown via MY-SQL?

I am building an editor for a blog. Each post will be categorised.

I am trying to get all the posts, with the category that they have been assigned to be displayed as dropdown menu.
So, when the user clicks on a post title from the first dropdown menu, then the second category dropbox will have the selected category associated with it, and display all the other categories in the same dropbox.

So. user can change the category of article. I am struggling with it and don’t know what I am doing wrong. Can anyone help?

  if (isset($_POST('Ga'))) {
    $db = new mysqli("dbhost", "username", "password", "dbname"); //set your database handler
    $query = "SELECT c.catid , a.titel , c.cat FROM artikelen a JOIN Categorie c ON c.catid = a.catid  where  c.catid = a.catid";
    $result = $db->query($query);

    while ($row = $result->fetch_assoc()) {

      if ($row ('a.catid') = ('c.catid')) {
        $selected = ($row('catid') == $result);
        echo "<option value="".$row("catid")."" ".($selected ? " selected="selected"":"").">".$row("cat")."</option>";      

  $link = mysqli_connect("dbhost", "username", "password", "dbname");
  $db = new mysqli("dbhost", "username", "password", "dbname");//set your database handler
  $query = "SELECT c.catid , a.titel , c.cat FROM artikelen a JOIN Categorie c ON c.catid = a.catid";
  $result = $db->query($query);

  echo "<form action='test.php' method='post' enctype='multipart/form-data'>";

<select id='subcatsSelect'>

  // $query = "SELECT catid, cat FROM Categorie";
  $result = $db->query($query);

  while ($row = $result->fetch_assoc()) {
    // $subcats($row('catid'))() = array("catid" => $row('catid'), "val" => $row('cat'));  
    echo "<option value='catid'> {$row('titel')}</option>";



<select id='categoriesSelect'>

    $result = $db->query($query);
    while ($row = $result->fetch_assoc()) {
      $resultofcar = ("<option value='{$row ('catid')}'> {$row('cat')}</option>");
      echo $resultofcar;


<input id='Ga' type='submit'  value='Ga'name='Ga' />        

select – Magento2: Place order only selected Items from cart

Proceed to place order with single / selected item.

As an end user I have multiple items in my cart, but I would like to proceed with a single item or selected items to checkout and place / create the order.

Once order is placed, coming back to cart rest all item should be available in cart.

Any Extension OR customization for this ?

sharepoint online – Change color of selected element in react and set first one as default

I am trying below code which i picked from stack only i am using this code to change color of selected item its working fine but i also want to set color of first element always selected once page load

                        var List = React.createClass({
                          getInitialState: function(){
                            return { active: null}

                          toggle: function(position){
                            if (this.state.active === position) {
                              this.setState({active : null})
                            } else {
                              this.setState({active : position})

                          myColor: function(position) {
                            if (this.state.active === position) {
                              return "blue";
                            return "";

                          render: function () {
                            return (
                                <li style={{background: this.myColor(0)}} onClick={() => {this.toggle(0)}}>one</li>
                                <li style={{background: this.myColor(1)}} onClick={() => {this.toggle(1)}}>two</li>
                                <li style={{background: this.myColor(2)}} onClick={() => {this.toggle(2)}}>three</li>

google analytics – GTM event in database is selected by debug console but does not fire tags

I work on the maisonfribourg.ch website which was developed using grav.

I am trying to track form submissions using GTM.
In the attached image, you will see a blue button, clicking on it, a popup window will appear: Screen capture showing the .

The developer indicates that the site uses dataLayer.push to include the following in the data layer:
requestFile: open
requestFile: sent

These elements respectively follow the opening and sending of a contact form.
I'll start by describing how I try to follow the OPENING of the form.
I want to follow these two actions using GTM, I created a variable named & # 39; requestFile & # 39; so that GTM knows that this is something that interests me.
The variables and triggers that I have created

I created a trigger, based on a custom event
Finally, I created a tag for that
Here is a picture of the final result
The debug console shows that the custom event is pushed into the data layer

So I think the debug console shows that a data layer element exists, but somehow no tag is triggered, not even that of Universal Analytics.

What am I missing? Did I misconfigure something?

Thanks in advance for your help

php – Input select multiple only shows me the values ​​of the first value selected

good afternoon i have a problem with two select that i have linked


I have two selectors, one from the companies and the other where it will only show me the employees of the companies that I select, but the detail is that when I select more than two companies, it does shows me that the employees of the first company selected and not of the second company selected.

It is my function of selectors

    $.get( "selectores.php?oper=empresas", { idp : idp}, function(result){ 
    $("#idempresasf").select2({placeholder: ""});

        var idempresasf = $("#idempresasf").val();
        $.get( "selectores.php?oper=empleados", { id: idempresasf }, function(result){ 
            $("#idempleadosf").select2({placeholder: ""});

php – unable to call controller method when i have selected my checkbox with javascript

this is my javascript function, i mean if i select one of the checkboxes it will get the data from the database and display it in the text box


        var id = $(this).children("option:selected").val();

            url : "",
            method : "POST",
            data : {id: id},
            async : true,
            dataType : 'json',
            success: function(data){




and this is my controller

 function getdata(){
        $category_id = $this->input->post('id',TRUE);
        $data = $this->parameter_m->getdata($category_id)->result();
        echo json_encode($data);

and this is my model

public function getdata($id = null)
        if ($id != null) {
            $this->db->where('parameter', $id);
        $query = $this->db->get();

        return $query;

Display the corresponding adjacent cell value selected in another cell

if my cursor selection on cell c2 will display data from cell b2 in cell j2, similarly if the cursor selection moves to c3, it will display data b3 to j2. Any form and help in this regard will be grateful.