我想将产品的ID从上一页传递到下一页? [英] I want to pass id of product from previous page to next page?

查看:201
本文介绍了我想将产品的ID从上一页传递到下一页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

产品deatils有两个表格,产品图片有两个表格。



产品详细信息插入到表格中并重定向到另一个页面以插入产品图片..



i希望将产品ID从一个页面传递到另一个页面以插入该产品图片



如何传递产品编号?



两个表的产品详细信息和产品图片都不同



我尝试了什么:



i不知道如何传递产品的id

There is two table one for product deatils and second for product images..

product detail is inserted in table and it redirect to another page for insertion of that product image..

i want to pass product id from one page to another page for insertion of that product image

How to pass product id?

Both table are different for product detail and product image

What I have tried:

i don't know how to pass id of product

推荐答案

你正在使用php - 所以请看
You're using php - so look into


_SESSION。



一个有用的提示:创建一个会话必须是 绝对 页面上的第一件事,
_SESSION.

One helpful hint: creating a session must be the ABSOLUTELY first thing on a page,
<?php session_start() ?>





PHP 5个会话 [ ^ ]



还有其他方法可以做到这一点(表单,AJAX,URL目标的一部分),但这是一个纯粹的回答你的问题。




PHP 5 Sessions[^]

There are other ways to do this (forms, AJAX, part of a URL target), but this is a "pure" answer to your question.


这篇关于我想将产品的ID从上一页传递到下一页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆