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

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

Search with relational database
Hey,

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

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.

The method delivers er_changed_data.

PHP & Java
Hello,

can PHP code be used inside java code?

Code: [Select]<SCRIPT LANGUAGE=&q

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

How to have a log of all the status a VIM document had been ?
Hi guys,

I’m using SAP Invoice Management plugin and the /OPT/VIM_ANALYTICS transa

PDO returns erroneous columns from within pdt
Hi All,

This is a truly weird behavior:
When using a simple pdo fetch, erroneous columns a

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

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