我如何转移$ _GET ['id']? [英] How do i transfer $_GET['id'] ?

查看:71
本文介绍了我如何转移$ _GET ['id']?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从名为image.php的1页获取id的值从另一页面将数据插入到数据库中submitComment.php


这是我的代码.. ..


image.php ....

i need to get the value of the id from 1 page called image.php a insert it in to the database from another page submitComment.php

this is my code....

image.php....

展开 | 选择 | 换行 | 行号

推荐答案

用户如何从image.php提交submitComment.php?


链接,表单按钮?


然后更改它以将photoID添加为URL参数。在链接或论坛操作中。


您也可以使用会话,但不建议您使用会话。




Dan
how are users getting to submitComment.php from image.php?

link, form button?

Then change it to add the photoID as a URL parameter. Either in the link or the forum action.

You can also use session, but not recommended for your problem here.




Dan


抱歉很难解释但基本上我需要得到的页面来自一个页面的id值并将其存储到我可以做的varable中。但后来我需要以某种方式将可变信息发送到另一个页面并从该页面发送到我的数据库。


在submitComment.php上有一个评论表单发布评论和同时将信息存储到数据库中,问题是它没有插入photoId(image.php
sorry Its quite hard to explain but basically i need to get the page id value from one page and store it in to a varable which i can do. but then i need to somehow send that varible information to another page and from that page send it to my database.

on the submitComment.php there is a comment form that posts the comment and at the same time stores the information into the database, the problem is that it doesnt insert the photoId (the image.php


_GET [''id'']),因为它不能识别它。所以我想或发送id的方式(image.php'的
_GET[''id'']) because it dosent recognise it. so i was think or some how sending the id (image.php''s


这篇关于我如何转移$ _GET ['id']?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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