code is not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bluestar
Forum Newbie
Posts: 13
Joined: Thu Mar 17, 2011 7:19 am

code is not working

Post by bluestar »

i want to make a program to retrieve the password for a given email....
i had made a table named 'table1'with column name userid, EMAIL and password but the code is not working can anybody tell me what am i doing wrong??


Code: Select all

<?php
$localhost="host";
$username="admin";
$password="1234567891011";
$db="table1";
$email:xyz@yahoo.com;
$link=mysql_connect($localhost,$username,$password) or die("some prob1");
$database=mysql_select_db($db,$link)or die("some prob2");
$query = "select PASSWORD from member_login where EMAIL='$email'";
$result=mysql_query($query,$link) or die('some problem with your email');
     
   $row = mysql_fetch_array($result);

	echo $row['PASSWORD'];
?>
Last edited by Benjamin on Tue Apr 05, 2011 5:32 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: code is not working

Post by Weirdan »

Simple code problem => moved to PHP Code
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: code is not working

Post by fugix »

what is the error(s) that you are getting from this?
Apocalypz
Forum Newbie
Posts: 6
Joined: Fri Nov 02, 2007 2:54 pm

Re: code is not working

Post by Apocalypz »

Line 6 should be:

Code: Select all

$email="xyz@yahoo.com";
Post Reply