开发者

Sending Variables in Post without the input tag

开发者 https://www.devze.com 2023-01-02 04:44 出处:网络
I want to send only one variable via the post me开发者_如何转开发thod. I have queried the database and have to post $row[id] variable to the page along with the form. To send the user\'s input we simp

I want to send only one variable via the post me开发者_如何转开发thod. I have queried the database and have to post $row[id] variable to the page along with the form. To send the user's input we simply write like <input type="text" name="xyz"></input> and then we access it as $_POST[xyz]. This way we can send a variable that a user write. But, I want to send something that user has not written but there in my sending file as $row['id']. So, I want to send this variable as well. How can I do that? And also how will I be able to access that?


use <input type="hidden">


define that variable after post. :)

set $row['id'] = 'valueXYZ'; at post script. more effective to prevent cheating $_POST value

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号