I only took a quick glance, but I don't see a click event handler being set for 
your "Login to Mixbook" button. So far as I can tell, nothing is set to happen 
when the button is clicked.



----- Original Message ----
From: nitishdhar <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, July 14, 2008 11:38:24 PM
Subject: [flexcoders] flex php login



I m creating my login page in loginpage.mxml but the values are not getting
sent to the php page login.php... .plz help

loginpage.mxml
------------ --------- ------
<?xml version="1.0" encoding="utf- 8"?>
<mx:Application xmlns:mx="http://www.adobe. com/2006/ mxml" xmlns="*"
layout="absolute" >
<mx:HTTPService id="Login" url="http://localhost/ mixbook/login. php"
useProxy="false" method="POST" >
<mx:request xmlns="">
<emailaddress> {emailaddress. text}</emailaddr ess>
<password>{password .text}</password >
</mx:request>
</mx:HTTPService>

<mx:Panel width="100%" height="100% " layout="absolute" y="5" x="19">

<mx:Canvas label="View 1" width="100%" height="100% ">
<mx:Canvas label="or" width="100%" height="649" x="9" y="0" color="#0A3F4A"
alpha="1.0">
<mx:Button x="339.5" y="37" label="Home" width="72" click="navigateToUR L(new
URLRequest(' home.swf' ),'_top') "/>
<mx:Button x="419.5" y="37" label="Create" click="navigateToUR L(new
URLRequest(' create.swf' ),'_top') "/>
<mx:Button x="491.5" y="37" label="Explore" click="navigateToUR L(new
URLRequest(' explore.swf' ),'_top') "/>
<mx:Panel x="10" y="67" width="863" height="40" layout="absolute"
borderColor= "#18237B" ></mx:Panel>
<mx:Label x="634" y="10" text="inbox" />
<mx:Label x="678" y="10" text="accounts" />
<mx:Label x="739" y="10" text="help"/ >
<mx:Label x="780" y="10" text="logout" />
<mx:ProgressBar id="progressBar" indeterminate= "true" visible="false" />
<mx:Text x="54" y="124" text="Login to Mixbook.com" fontSize="23"
fontStyle="normal" textDecoration= "underline" />
<mx:Text x="491.5" y="140" text="or" width="15.5" color="black"
fontSize="11" />
<mx:Text x="530" y="137" text="sign up for an accounts" color="#0C7086"
textDecoration= "underline" fontSize="14" click="navigateToUR L(new
URLRequest(' signup.swf' ))"/>
<mx:Panel x="22" y="166" width="758" height="351" layout="absolute"
borderColor= "#0B0000" >
<mx:Text x="78" y="10" text="Email Address:" fontSize="15"
fontWeight=" bold"/>
<mx:Text x="78" y="71" text="Password: " fontSize="15" fontWeight=" bold"/>
<mx:TextInput x="301" y="13" borderStyle= "solid" width="326" height="30"
id="emailaddress" />
<mx:TextInput x="301" y="75" width="326" height="32" borderStyle= "solid"
id="password" />
<mx:CheckBox x="226" y="144" label="remember me on this computer"
width="379" fontSize="12" fontWeight=" bold"/>
<mx:Button x="273" y="195" label="Login to Mixbook" cornerRadius= "9"
width="219" fontWeight=" bold" fontSize="13" fillAlphas=" [1.0, 1.0]"
fillColors=" [#A05F60, #0B4867]" color="#C49483" />
<mx:Text x="243" y="247" text="forgor your password"/>
<mx:Text x="430" y="247" text="reset it" fontWeight=" bold" fontSize="11"
textDecoration= "underline" click="Login. send()"/>
</mx:Panel>
<mx:TextArea x="79" y="10" text="reserved for logo" fontSize="19"
width="209"/ >

</mx:Canvas>
</mx:Canvas>

</mx:Panel>
</mx:Application>

login.php
------------ -----
<?php
$con = mysql_connect( localhost, "root", "");
if (!$con)
{
die('Could not connect: ' . mysql_error( ));
}
mysql_select_ db("mixbook" ,$con);
$fp = fopen("test. txt","a+" );
fwrite($fp,$ _POST[emailaddre ss]."\r\n" );

$email = $_POST[emailaddress ];
$pass = $_POST[password] ;

$query = "select * from `usertable` where `emailaddress` =
'".$_POST[emailaddr ess]."' and `password` = '".$_POST[password] ."' ";
//$query = "Select * from usertable where emailaddress =
'".$_POST['emailadd ress']."' and password = '".$_POST['password ']."' ";
$result = mysql_query( $query);
echo $query;
$rowcount = mysql_num_rows( $result);
if($rowcount == 1)
echo"login successfull" ;
else
echo"no";

?>
-- 
View this message in context: http://www.nabble. com/flex- php-login- 
tp18458605p18458 605.html
Sent from the FlexCoders mailing list archive at Nabble.com.

    


      

Reply via email to