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

Using Curl_multi for processing multiple URLs
Hi,

I am at a loss as to how to implement this. I would like to be able to automatically assi

add text and number image
hi guys ..

ok see i want the user to add their name and pick a number then click get it and i

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

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