Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 关于PHP100视频教程中的edit.php

关于PHP100视频教程中的edit.php

Jun 23, 2016 pm 01:51 PM
Video tutorial

视频教程的代码如下 ,作用为点击编辑选取数据库中  id="当前选取评论的id然后编辑其内容",数据库中ID设定的是auto_increment,视频教程上可以轻松获取出当前评论的数组,我却获取不到。在$sql="select * from `feedback` where `id`='".$_GET['id']."'";前加上echo 显示为select * from `feedback` where `id`=‘’ 为什么获取不到当前项的ID还是哪边代码错了,跪求各位大大帮忙!


回复讨论(解决方案)

你的url 上有?id=  这个查询字符串吗?

 

1

$sql="select * from `feedback` where `id`=".$_GET['id'];

Copy after login

ID查询不需要单引号。

if ( !empty($_GET['id'])){
//
}
当$_GET['id']不等于空时,才会继续执行,
除非你的$_GET['id']是空值,var_dump($_GET['id'])看看。

感谢一楼三楼 原因却是为ID为空 在URL中添加了href="edit.php?id="后终于成功获取到了数组。再次感谢!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Recommended latest layui video tutorials in 2023 (recommended collection) Recommended latest layui video tutorials in 2023 (recommended collection) Jul 19, 2021 pm 05:22 PM

The following is a video tutorial of the front-end UI framework - layui. There is no need to download it from third-party network disk platforms such as Xunlei and Baidu Cloud. All videos can be watched online for free. The tutorials start from the shallower to the deeper, and those with front-end basics can learn it. From installation to case explanations, they are comprehensive and detailed to help you master the layui framework faster and better!

Vue tutorial recommendation: 5 latest vue.js video tutorial selections in 2023 Vue tutorial recommendation: 5 latest vue.js video tutorial selections in 2023 Sep 20, 2018 pm 02:20 PM

Is vue.js easy to learn? The answer is that it is very easy to learn and integrate with other libraries or existing projects. So, how to use vue? Today, the PHP Chinese website recommends to you the latest 5 vue.js free video tutorials in 2023 for everyone to learn.

2023 latest swoole video tutorial recommendations (from entry to advanced) 2023 latest swoole video tutorial recommendations (from entry to advanced) Oct 25, 2019 pm 02:09 PM

The following is a video tutorial of the PHP asynchronous communication framework Swoole. There is no need to download it from third-party platforms such as Thunder and Baidu Cloud. All are free to watch online. The tutorials are from easy to deep, and people with a basic knowledge of PHP can learn it. From installation to case explanations, they are comprehensive and detailed to help you master the Swoole framework faster and better!

Summary of FAQs for DeepSeek usage Summary of FAQs for DeepSeek usage Feb 19, 2025 pm 03:45 PM

DeepSeekAI Tool User Guide and FAQ DeepSeek is a powerful AI intelligent tool. This article will answer some common usage questions to help you get started quickly. FAQ: The difference between different access methods: There is no difference in function between web version, App version and API calls, and App is just a wrapper for web version. The local deployment uses a distillation model, which is slightly inferior to the full version of DeepSeek-R1, but the 32-bit model theoretically has 90% full version capability. What is a tavern? SillyTavern is a front-end interface that requires calling the AI ​​model through API or Ollama. What is breaking limit

The latest WordPress video tutorial recommendations in 2023 The latest WordPress video tutorial recommendations in 2023 Oct 25, 2019 pm 01:12 PM

This PHP Chinese website has integrated relevant video tutorials, Chinese manuals, and related selected articles for everyone, all for free! ! ! Through the videos we share, you can watch the tutorial videos for free anytime and anywhere, and there is no need to download from Thunder or Baidu Netdisk.

The latest phpcms video tutorial recommendations in 2023 (must learn for secondary development) The latest phpcms video tutorial recommendations in 2023 (must learn for secondary development) Oct 25, 2019 pm 03:45 PM

Many webmasters use PHPCMS for secondary development and website building. PHP Chinese website has specially launched a phpcms video tutorial. You can watch the video tutorial for free anytime and anywhere without downloading from Baidu Netdisk, which is very convenient.

Recommended video tutorials of dedeCMS in 2023 Recommended video tutorials of dedeCMS in 2023 Oct 25, 2019 pm 01:56 PM

DedeCMS is famous for its simplicity, practicality and open source. It is the most well-known PHP open source website management system in China and the PHP CMS system with the most users. After years of development, the current version has become the most popular one in terms of functions. , or in terms of ease of use, there has been considerable development and progress.

The latest empire cms video tutorial recommendation in 2023 (collection) The latest empire cms video tutorial recommendation in 2023 (collection) Oct 25, 2019 pm 02:30 PM

PHP Chinese website has compiled content related to the Empire CMS video tutorial for everyone. Contains Imperial CMS installation video tutorials, Imperial CMS development manuals, Imperial CMS template resources and some Imperial CMS technical articles.

See all articles