Jump to content

How to implement Ajax in php


rahul_jjj

Recommended Posts

use such this

$q = "SELECT * FROM `users` WHERE `username` = '".$_POST['name']."' and `password` = '".$_POST['password']."';";
$s = mysql_query($q) or die("error selecting");
$a = mysql_fetch_array($s);

if($a['username']){
$name = $a['username'];
$grant = $a['grant'];

session_register('name');
session_register('grant');
header("Location:main.php");
}else{
header("Location:index.php");
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.