please fix the error


Posted on 16th Feb 2014 07:03 pm by admin

What is the error in the below code ???
Line number On/Off | Expand/Contract <?php if(array_key_exists_r('email|password', $_POST)) { include_once('database.php'); $sql = "SELECT user_id FROM login WHERE user_name = '" . trim($_POST['email']) . "' AND password='" . trim($_POST['password']) . "')"; $result = mysql_query($sql); print_r($result); if (mysql_num_rows($result)>0){ $row = mysql_fetch_row($result); session_start(); $_SESSION['user_id']=$row[0]; $_SESSION['user_name']=trim($_POST['email']); } }?>

No comments posted yet

Your Answer:

Login to answer
164 Like 42 Dislike
Previous forums Next forums
Other forums

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

PHP Array quick help
I need

$_SESSION{'username'} to be like this:


if $_SESSION['username'] = "gay

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header error

I'm do not know php &

Login logout link help
Hi all,

Im new to php and Im having trouble creating a login/logout link for my page that dis

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash