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

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

How to add functionality to a simple php calender?
Hello everyone,

I have just finished creating a simple php calander. Can someone point

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/

In a nutshe

Program with calculate Meteorologic measurements
Hello I'm a beginner and I want to make a program with calculate Meteorologic measurements:
ba

Points for Wiki contribution
Hi everyone,

I want to know how long does it take for the moderator to award points for a

help, header() is not working!
Hello, I have this code:


<?php

/**
* @author samoi
* @copyright 200

getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w

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