A newbie would like to ask, how to pass the value of a tag to other pages?
aspirant
aspirant 2019-04-26 13:16:59
0
3
1575

<?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这些,值也没有传成功,具体写法是啥呢



aspirant
aspirant

reply all(2)
aspirant

Already done

Alone88

Can be passed ajax

  • reply It's too much trouble like this
    aspirant author 2019-04-26 14:31:48
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template