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

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Trouble verifying database password
Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried). <

cPanel API
Hi Guys,

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

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

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