我有一个生成和显示产品的php页面,在点击此p标签更新我的数据库表后,我需要附带onclick功能的p标签 我使用用javascript编写的函数
点击X并确认删除后我需要用ajax发送帖子请求来更新我的订单数据库表
<?php $exhibtion_selected = $define_class->return_exhibtions_ids($employee_id,$id);
if($exhibtion_selected){
echo "<div class='row clearfix'>";
foreach($exhibtion_selected as $single){
$one = $define_node->front_node_data($single->product_id,'post', null, null,$lang_info->id, null, null, null, null, null, "one");
//echo $single->product_id ;
$summary = strip_tags($one->summary);
echo "
<div class='col-md-4 product-outer product-reserved'>
<p class='fa fa-times product-remove' onclick='removeThis(this.parentNode)'></p>
<div class='col-md-12 product-image'>
<img src='media-library/$one->cover_image' alt=''>
</div>";
echo "<div class='col-md-12 product-text give-graydarker-bg'>
<ul class='product-text-inner'>
<li class='clearfix'>
<p class='col-md-12 product-area-lg product-company'>$one->prod_company</p>
<p class='col-md-12 product-area-sm product-quan'>($single->sold_quantity)</p>
</li>
<li class='clearfix'>
<p class='col-md-12 product-area-55 product-name'>$one->prod_title</p>
<p class='col-md-12 product-area-45 product-code'>$one->prod_code</p>
</li>
<li class='clearfix'>
<p class='col-md-12 product-size'>$one->prod_size</p>
<div class='col-md-12 product-price'>
<p class='col-md-12 product-price-before'>$one->prod_before_discount <span class='currency'>EGP</span></p>
<p class='col-md-12 product-price-after'>$one->prod_price<span class='currency'>EGP</span></p>
</div>
</li>
<li class='clearfix'>
<p class='col-md-12 product-description'>$summary</p>
</li>
</ul>
</div>";
echo "</div>";
}
echo "</div>";
}
&GT;