search

Home  >  Q&A  >  body text

A newbie would like to ask, how to pass the value of a tag to other pages?

<?php

     

echo '<div class="content_banner3">';

echo '<ul>';

  foreach($user as $key=>$value){

 


echo '<li>';

echo '<div class="content_banner4_img">';

echo "<img src='".$value['img']."' />";

echo '</div>';

echo '<div class="content_banner4_con">';

echo '<span class="tit">'.$value['name'].'</span>';

    echo '<span class="pic">'.$value['pice'].'</span>';

$user = array(0=>"out of stock", 1=>"in stock");

    $uu = $value["stock"];

echo '<span class="con">'.$user[$uu].'</span>';    

echo '<span class="introduce_2">'.$value['content'].'</span>';

$a = $value['id']; 

echo "<a class='introduce_3' href='shop_list.php?id=$value[$a]' >buy</a>";

echo '</div>';

echo '</li>';

 

}

echo '</ul>';

echo '<div>';

 

 

 

 

?>

我是想echo "<a class='introduce_3' href='shop_list.php?id=$value[$a]' >buy</a>";   获取出id传到shop_list.php这个页面收到他的id,但是现在报错,Notice: Undefined offset: 1 ,Notice: Undefined offset: 2这些,值也没有传成功,具体写法是啥呢



aspirantaspirant2028 days ago1567

reply all(3)I'll reply

  • aspirant

    aspirant2019-04-26 14:31:31

    Already done

    reply
    1
  • Alone88

    Alone882019-04-26 14:23:31

    Can be passed ajax

    reply
    0
  • aspirant

    It's too much trouble like this

    aspirant · 2019-04-26 14:31:48
  • Cancelreply