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

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/
Unfort

search query in mysql in php problem
my search query wont work, i know, that my codes are correct.please help

Code: [Select]&l

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

[RESOLVED] Socket/Port remains open after app crashes
I'm having this problem with a networked app in vb.net.

If the program exits normally the por

array empty
Hiya peeps,

Ok here is the codes.

order.php

Code:

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0m

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