please fix the error


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

What is the error in the below code ???
Did you know?Explore Trending and Topic pages for more stories like this.
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

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Converting RGB values to HEX
Code: <?PHP

$file_handle = fopen("colors/rgb.csv", "r");

wh

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

update sql when refresh - php
hi
I have made a table (attachement)

the users can update the sql database using + or x bu

Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to

The type or namespace name 'ServiceModel' does not exist in the namespace 'System'
When I locally run the website, it works just fine, but when I uploaded it to the hosting environmen

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

Floating Point Precision Loss
I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

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