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

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

Insert data in Mysql and move to another page
I'm stuck with this simple problem. I need to insert data in Mysql and then hit submit and move to a

PHP time (deadline within one week)
I have a column ['projdue'], which stores the deadline for a project.
I have PHP code and <

Prevention Help
How can I use PHP or any other language (feel free to move this thread) to prevent users doing scree

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

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