Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9
原文:Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9
(初用数据库(mysql)做用户登录注册这一块,遇到很多问题,通过搜索找到解决方案,把问题分享出来,希望可以帮助到和我一样问题的博友们,有问题还望多多指教。)
解决方法:在add.php文件最上边加上 error_reporting(E_ALL ^ E_NOTICE);
<?php
error_reporting(E_ALL ^ E_NOTICE);
require 'config.php'; //加载config.php
//新增用户
$query = "INSERT INTO lsmc_user(user,pass,yzm) VALUES ('{$_POST['user']}',sha1('{$_POST['pass']}'))";
mysql_query($query) or die('新增失败:'.mysql_error());
echo mysql_affected_rows(); //返回当前影响几行
mysql_close(); //关闭数据库
?>
Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9的更多相关文章
- Testlink安装:Notice:Undefined index: type in C:\inetpub\wwwroot\testlink-1.9.3\install\installCheck.php on line 41
问题现象:
- wordpress5.0+中 Notice: Undefined index: HTTP_REFERER 问题解决
都说现在搭网站很简单了,但真遇到问题了还真不一定能解决. 这次搭建的网站是用的wordpress版本5.0.4,以为操作和以前的低版本一样,结果做出来还是遇到问题了. 网站搭好后,首页总在顶端出现一行 ...
- Notice: Undefined index: wjs_cookie
w执行顺序. ok <!doctype html> <html> <head> <meta charset="UTF-8"> < ...
- PHP中出现Notice: Undefined index的三种解决办法
前一段做的一个PHP程序在服务器运行正常,被别人拿到本机测试的时候总是出现“Notice: Undefined index:”这样的警告,这只是一个因为PHP版本不同而产生的警告(NOTICE或者WA ...
- PHP Notice: Undefined index:解决方法
PHP Notice: Undefined index:解决方法 PHP Notice: Undefined index: 解决方法 <pre> if (empty(swoole_get ...
- php提示Notice: Undefined index解决方法
php提示Notice: Undefined index问题,Undefined index:是指你的代码里存在:“变量还未定义.赋值就使用”的错误,这个不是致命错误,不会让你的php代码运行强行中止 ...
- 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19
事例如下": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ ...
- ***PHP Notice: Undefined index: ..问题的解决方法
首先,这个不是错误,是warning.所以如果服务器不能改,每个变量使用前应当先定义. 方法1:服务器配置修改 修改php.ini配置文件,error_reporting = E_ALL &a ...
- 屏蔽Drupal中的“Notice: Undefined index”警告
原因:drupal默认使用E_ALL,即输出所有错误和警告.我们只需要修改错误显示级别即可. 方法: 1. 打开\sites\default\settings.php 追加一行 ini_set('er ...
随机推荐
- 【AtCoder ABC 075 C】Bridge
[链接] 我是链接,点我呀:) [题意] 让你求出桥的个数 [题解] 删掉这条边,然后看看1能不能到达其他所有的点就可以了 [代码] #include <bits/stdc++.h> us ...
- 取消UITableViewCell的背景色
//无色 cell.selectionStyle = UITableViewCellSelectionStyleNone; //蓝色,也就是系统默认的颜色 cell.selectionStyle = ...
- [Angular2 Router] Preload lzay loading modules
From router v3.1.0, we have preloading system with router. PreloadAllModules After the init module l ...
- 点滴记录——学习Redis笔记
转载请说明出处:http://blog.csdn.net/cywosp/article/details/39701409 Redis 默认port6379 Redis适用场景 1. 取最新N个数据的操 ...
- ocx中用自定义消息去调用自定义事件
硬件发送消息---->接收到消息后调用回调函数DWORD __stdcall CxxxCtrl::FVI_NotifyCallBack(void *FVINOTIFYCallbackCtx,UI ...
- 如何在移动web模仿客户端给input输入框添加自定义清除按钮
项目有个需求就是在input输入框添加清除按钮,网上查找资料加上自己琢磨终于弄出来了. 灵感来自于 http://www.zhangxinxu.com/wordpress/?p=4077 由于项目已经 ...
- Linux上安装JDK 分类: B1_JAVA B3_LINUX 2014-08-29 15:12 449人阅读 评论(0) 收藏
1.下载rpm文件并安装 rpm -ivh jdk-7u51-linux-x64.rpm 2.修改/etc/profile文件,增加以下配置 export JAVA_HOME=/usr/java/jd ...
- WD-保修验证(WCC7K4ARTDF1)
https://support.wdc.com/warranty/warrantystatus.aspx?lang=cn WCC7K4ARTDF1 有限保修期限内 WD40EFRX WD Red 09 ...
- 洛谷 P2197 nim游戏
洛谷 P2197 nim游戏 题目描述 甲,乙两个人玩Nim取石子游戏. nim游戏的规则是这样的:地上有n堆石子(每堆石子数量小于10000),每人每次可从任意一堆石子里取出任意多枚石子扔掉,可以取 ...
- [Vue] Use basic event handling in Vue
Let's use a range of events and their modifiers to look at the cool ways we can deal with event hand ...