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']); } }?>

164 Like 42 Dislike
Previous php-forum Next php-forum
Other php-forum

Multiple Do / While Statements?
I'm still very new to PHP, and running in to a problem when trying to execute a do/while loop inside

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

Select Lists into MYSQL
Hello All, I am new to PHP @ 1 week. So borrowing code anywhere I can. I am making progress, but h

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or no

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, ec

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

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