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

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

CURL XML Request [From C to PHP]
Hi,

I need some help converting this into something that will work with PHP.

Code: #

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

what does this mean? +=
is anyone able to explain what this code is saying?

i had it written for me awhile back and n

please help
HTML Code:

Code: <span id="ctl00"><span>

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

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