<?php
session_start(); // First thing... every time
require_once("connect.php"); if(!isset($_SESSION['username'])){
header('Location: login.php'); the top
exit; // Always include after redirect.
}
if(isset($_POST['submit'])){
$sql = "UPDATE user SET atten
我想使用jquery和ajax填充一个下拉列表。
我的jquery调用是
<script>
$(document).ready(function(){
$.ajax({
type: "GET",
url: "<?=base_url()?>user/getstate/", //the script to call to get data
我正在收集Facebook用户的信息,然后注册。如何在ajax中包含多个值?
$.signuser = function () {
FB.api('/me', function (response) {
var str = "";
alert(response.name);
var fbfname = response.first_name;
var fblname = response.last_name;
var fblname = response.id;
session_start();
include 'assets/config.php';
if(isset($_POST['username'])){
$queryIsUsername = ("SELECT count(user) FROM users WHERE user = '$_POST['username']'"); //Error
$actionQueryIsUsername = mysql_query($queryIsUsername);
while($rowIsUsern
我正在从我的firebase DB中检索数据,它一直工作得很好,但是当我手动更改我的数据库中的条目时,我收到了以下错误:
Invariant Violation: Tried to get frame for out of range index NaN
方法提取数据
listenForItems(itemsRef) {
itemsRef.on('value', snapshot => {
this.setState({ data: snapshot.val() });
console.log(this.state.data);
});
}
控制台正