I am new on flex, and i would like to create a simple login + password using amfphp
Hi all,
I try to make a simple login password using mysql and amfphp, i have a little quesiton, i dont' know how to get back my response from php. Thanks in advance if anyone could help me.
Best regards
i would like to tell to the label <mx:Label x="380" y="10" id="lResponse"/> the response from php
I juste want to take back response from php.
Here is my mxml :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
<fx:Script>
<![CDATA[
import mx.controls.dataGridClasses.DataGridColumn;
import flash.net.Responder;
import mx.events.DataGridEvent;
import org.corlan.VOAuthor;
private function checkpassword():void {
var newauthor:VOAuthor=new VOAuthor();
newauthor.lname_aut = nom.text;
newauthor.fname_aut = prenom.text;
myRemote.validate(newauthor);
private function checkInput():void
if(nom.text == "" || prenom.text == "")
lResponse.text = "Veuillez completer tout les champs";
else
lResponse.text = "connecter";
checkpassword();
// checkLogin("login.Verify.validate",[nom.text,prenom.text]);
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<mx:RemoteObject id="myRemote" destination="MyService" source="MyService"
endpoint="http://localhost/amfphp/gateway.php" showBusyCursor="true"/>
</fx:Declarations>
<s:Panel x="334" y="168" width="245" height="135" title="Identifiez vous" textAlign="center">
<s:TextInput x="102" y="10" textAlign="left" id="nom" />
<s:TextInput x="102" y="40" textAlign="left" id="prenom" />
<s:RichText x="50" y="6" text="Login :" height="22" width="56" textAlign="left" verticalAlign="bottom"/>
<s:RichText x="27" y="46" text="Password :" height="20"/>
<s:Button x="125" y="70" label="Connecter" width="105" click="checkInput()"/>
<mx:Label x="380" y="10" id="lResponse"/>
</s:Panel>
</s:Application>
Here is my php code :
<?php
session_start();
require_once ('./vo/org/corlan/VOAuthor.php');
//conection info
define( "DATABASE_SERVER", "127.0.0.1");
define( "DATABASE_USERNAME", "root");
define( "DATABASE_PASSWORD", "xxxx");
define( "DATABASE_NAME", "flex360");
class MyService {
function validate($author){
$mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);
mysql_select_db(DATABASE_NAME);
$user = $author[0];
$pass = $author[1];
$query = "SELECT DISTINCT * FROM authors_aut WHERE fname_aut = '$user' AND lname_aut = '$pass'";
$rs = mysql_query($query);
$var = mysql_fetch_assoc($rs);
$u = $var["fname_aut"];
$p = $var["lname_aut"];
if ($pass != $p){
$response[0] = "INVALID";
$response[1] = "Invalid username and/or password";
} else {
$response[0] = "VALID";
$response[1] = "Welcome $u";
return $response;
?>
I usually have a resultHandler function, to handle stuff from the server.
resultHandler(event:ResultEvent):void
Similar Messages
-
how can I use microsoft word, power point and those apps in my new iMac ? i bought this iMac yesterday so am new on tho and i would like to know
If you absolutely must have the Microsoft applications, you can purchase and download them from http://microsoft.com/mac.
Free software suites LibreOffice and OpenOffice offer similar functionality (word processing and spreadsheets).
Or you could do worse than look at Apple's Pages, Numbers and Keynote, which should already be installed in your Mac and can export to Microsoft formats if need be.
Matt -
I would like to create a simple vote form that members can hit the reply button and record their preference in a check box. Is this possible on iPad?
Go to the App Store and search on "Forms Management".
There are a lot of candidates. -
In the past few weeks I have been experiencing popup audios. They are annoying and I would like to block them. I am using Firefox as my browser. Any ideas?
Hi Lowell,
I don't know if you have the popup blocker turned on (nor if it works for audio), but if not, try it: Firefox menu > Preferences > Content > Block Popups. -
New to Mac and IPhoto, would like to organise events
Hello, i have just bought the new macbook pro and I'm trying to sort all of the photos I have uploaded... I think i understand correctly that all photos are stored as an event...you can then edit these and store them as an album (similar to itunes where you would create a playlist) I would like to sort the photos within events as at the minute they all appear within the same album and I would like them sorted rather than creating new albums that would essentially keep everything as is but duplicate the photo. I'm unsure whether to delete the photos are upload again? Hope someone can help!!
iPhoto works similarly to iTunes. Every photo is in the Library and everything else is a subset of the Library.
There are two ways of viewing the Library: One is Events - this is the Library broken into chunks, based on the date and time of the photos. The other view is called Photos, and that's just your whole Library.
Albums are groupings of photos from the Library. They are different from Events in one major way: Photos in Albums simply reference the photos in the Library. A photo can be in 50 albums and use no extra disk space, as it's the same photo that' been referenced. Events use the actual photos. To have a photo in two Events requires a duplicate file, and hence twice the disk space.
I'm afraid I don't understand your query:
I would like to sort the photos within events as at the minute they all appear within the same album...
Photos within Events cannot all appear with the same Album, the two terms are not interchangeable.
...nd I would like them sorted rather than creating new albums that would essentially keep everything as is but duplicate the photo
As I said above, photos in Albums do not duplicate anything.
Events cannot be manually sorted. They are simple, basic level organisation. The day you want to sort manually is the day you outgrow Events
FWIW: Here's a canned post I use to describe an organising set up in iPhoto. Perhaps it will spark something for you:
I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums exensively. I title the pics broadly.
I keyword on a
Who
What
Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
Using this system I can find pretty much find any pic in my 30k library in a couple of seconds.
So, for example, I have a batch of pics titled 'Seattle 08' and a typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
File -> New Smart Album
set it to 'All"
title contains Seattle
keyword is mountain
keyword is snow
rating is 5 stars
Or, want a chronological album of John from birth to today?
New Smart Album
Keyword is John
Set the View options to Sort By Date Ascending
Want only the best pics?
add Rating is greater than 4 stars
The best thing about this system is that it's dynamic. If I add 50 more pics of John to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
Keywording takes time to set up, there's no doubt about it. I use Keyword Manager as it's much more powerful than the inbuilt system, and adds the possibility of nested keywords. So, for instance, if I add John to a photo it also adds 'Family'. Now I can add many keywords to a pic quickly.
In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.
By all means post again if I haven't answered your query.
Regards
TD -
set x=Folder
xcopy /y /v /e .\%x%\* \\10.0.0.200\d\
for %%y in ( 202 203 204 205) do (
net use \\10.0.0.%%y\e Password1 /user:User1
echo Copying files to \\10.0.0.%%y\e\
xcopy /y /v /e .\%p%\* \\10.0.0.%%y\e\
)Hi
csharplearner1,
Please refer to this reply from "herenvardo". Here it is a good response.
I am referring from Convert batch file to C#.
<copied>
The answer to your question would be both yes and no. If your goal is to build a C# program that performs the same task as your batch, sure, it can be done and it shouldn't take too much work. If what you're looking for is some kind of "magical"
translator that would do this work for you, I don't know any tool able to do that, and don't even hope such a tool exists.
The main points you need to care about are:
Since batches are by definition console-based, you'll be doing a console application. When you create a new Console Application project, the Visual Studio IDE will take care of some things four you, leading you to a .cs file with some code already on
it. Once you're there, you'll have to add your code inside the Main function (unless you need to create more functions, but in the case of a simple script like yours, I don't think that would be needed).
Instead of invoking DOS commands, such as xcopy, you'll be calling different .NET methods.
Unfortunately, there is no direct equivalent to xcopy: you'll need to iterate the entire directory tree manually. You should take a look at
https://msdn.microsoft.com/en-us/library/cc148994.aspx
to get a glimpse on simple file operations, and at http://msdn.microsoft.com/en-us/library/bb513869.aspx for two different ways to iterate directory trees (I suggest the recursive approach of the first example, unless the volume of files on your dir is
huge enough to make it crash).
For the case of echo, you'll be using Console.WriteLine.
You are using a different language, so the syntax will also be diferent. If you're just starting with C#, don't worry too much if you get a lot of "; expected" error messages (or any other) on your first try: just read the error messages and
correct the mistakes. If the message doesn't help you enough, right-click it on the error list and select "Show Error Help". If still you don't know how to solve it, ask about the specific error on these forums.
If you have some experience in C#, then this conversion shouldn't be much of a challenge. And if you don't, it's a great chance for you to learn a lot without too much effort.
</copied>
In addition, about net use command, I would suggest you could use WMI and the classes from the System.Management namespace.
ConnectionOptions connection = new ConnectionOptions();
connection.Username = "username";
connection.Password = "password";
connection.Authority = "ntlmdomain:DOMAIN";
ManagementScope scope = new ManagementScope(
"\\\\"+IPAddress1+"\\root\\CIMV2", connection);
scope.Connect();
For more detailed information, please refer to
How To: Connect to a Remote Computer
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
I just recieved a new Ipod classic. I am currently trying to sync it with my Itunes (on my Mac computer), but my computer and itunes isn't even showing that it is hooked up to my computer. Can you help me set it up?
Figured out the problem!
-
For some strange reason my contacts are not populating on my macbook from my iPhone. I have iCloud turned on on both devices and I have selected the contacts folder to be in the cloud but my macbook isn't populating the data.
To copy your exchange account contacts to iCloud, do the following:
Go to Settings>iCloud, turn Contacts to Off, choose Delete from My iDevice when prompted (any iCloud contacts will still be in iCloud).
Download the app My Contacts Backup. (If you have more than 500 contacts to transfer from our exchange account you will need the “Pro” version. If you aren't sure, start with the free version. When you use it, it will tell you if you need the paid version.) Use the app to back up the remaining contacts on your phone (from your exchange account) as a vCard attachment to an email that and send the email to yourself. Confirm that you have received the email.
Go to Settings>iCloud and turn Contacts back to On.
Go to Settings>Mail,Contacts,Calendars>Default Account (in the Contacts section) and set this to iCloud.
Go to Settings>Mail,Contacts,Calendars…tap your exchange account and turn off contacts syncing.*
Open the My Contacts Backup email and tap the attachment to import the exchange contacts back to your device, and to iCloud. Go to icloud.com to confirm that the contacts are there. If you ever want to "refresh" this with your current exchange contacts, you can reply to this conversation in the future and I can give you the steps to do so.
* You could leave it turned on if you want to reference it occasionally. If you do, just open contacts and tap Groups, then tap the exchange account so it is unchecked and tap Done. That will hide them from view so you don't see duplicates. -
I would like to create a multipurpose graph display - how?
Hi all, I would like to create a simple VI, it has multiple sets of information and signal inputs (Signal generators or DAQmx cards), and whilst all the information is important, i don't need to see them all at the same time. instead I would like to create an oscilloscope-like display (one large graphical display), and boolean buttons that allow me to select which signals I want to display on the screen (graph).
So there two options, 1 boolean button to show only that waveform, and other boolean button to toggle on/off the waveform on the screen (means I can either show one dedicated waveform or show all the waveforms at the same time) this will allow me to compare the waveforms or just to focus on one particular waveform.
I was thinking of a case-structure to turn on/off the waveform for display on the graph, but how do i do that?
Help will be really appreciated!Hi MKFX,
two notes:
1) How to change the visibility of plots is a more common question one may think - so do a little search on the forum...
2) LV2011 allows to set visibility of plots right from the plot legend, you don't need additional boolean buttons for that purpose...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
I have 3 apple devices and I use the same apple ID for all 3. I would like to create a new I'd for one of my devices, but do not want to loose the apps on that device. Anyone know how I can do this?
Create a new ID:
On the iPod go to
- Settings>Messages>Send and receive and sign out your ID and sign into the other one. Make sure that only her ID email address is listed.
- Settings>FaceTime sign out of your ID and sign into the other one. Make sure that under You can be reached at only the newID email address is listed
- Settings>iCloud and sign out and sign in with the new one
- Settings>iTunes and App Store and sign out your ID and sign in with the new one.
- Apps are locked to the account that purchased them.
- To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account. -
Hello! I lost my iphone like a month ago, well I reported that phone as lost with my icloud account, now I got a new iphone and I would like to know if I can use that same icloud account with this new phone? The old one will stay reported?
Thank you. The old one will stay reported?
-
I just replaced my old Iphone4 with a Iphone4s and I would like my old apps that I bought on my new phone. What do I need to do?
Sync the apps from itunes on your computer to your iphone
-
I lost my photoshop elements 7.0 serial number and i had not had it registered so i can't get it back. My old desktop broke and i would like to install photo shop on my new laptop. How can i get it back?
I would first go to your Adobe Account and make sure that all info in it was correct and then match up all S/N's with your records. If you find any problems, then make corrections.
If all matches, but does not work, contact Adobe and see if they still sell replacement DVD's for CS2. Adobe usually does, for a small price. Still, you will need your correct S/N, so you will probably be back on the phone to Adobe. When I once used them for a S/N problem, they were quick and did a perfect job.
Good luck,
Hunt -
I have messed my MacBook Pro attempting to customize it. I am far from savvy with technology and I would like to erase and reset it to out of the box brand new and start over
Polly,
usually there are multiple models of MacBook Pro per model number, but in the case of your model number (A1502), there’s currently only one model for that model number: 13-inch Late 2013.
To reset your MacBook Pro, you’ll need to boot into Recovery mode by holding down a Command key and the R key as you start it up. When the Mac OS X Utilities menu appears, select Disk Utility. On the left-hand side of the Disk Utility window, select your internal disk (most likely the top item of the list). On the right-hand side, select the Erase tab. For the Format dropdown, select “Mac OS Extended (Journaled)”. For the Name input box, “Macintosh HD” has traditionally been the default name — I don’t know if that’s still the case for the Late 2013 models. After that, press the Erase… button, and erase its entire internal disk. When it’s finished with the erasure, exit Disk Utility, and select Shut Down from the Apple menu. When you start it up again, OS X Internet Recovery will redownload Mavericks from Apple’s servers and reïnstall it on your internal disk. Once it has reïnstalled, run Software Update to get it up to date, and adjust the System Preferences to your taste. -
I just purchased a new macbookpro and I would like to put the music from my iphone to my macbook. I have downloaded from iTunes, however it want to add ALL music to my macbook.
When you plug in the iPhone, go to the menu bar and select "Transfer all purchases" to move them to your MacBook Pro.
If that doesn't work. Go here for a whole list of Apps that can help you.
I personally like Music Rescue the most. You can get it here and use the License Key that they give out for FREE now.
Maybe you are looking for
-
What earlier version of FCP will work with the intel-3processor?
what earlier version of FCP will work with the intel-3 processor?
-
Itunes says can not connect. Store may be busy.. What does that mean?
iTunes will not connect. It is version 7. It will not let me update to latest version. Operating system is OS X 10.4.11. What do I do?
-
Configuring my new Mac Pro with a RAID solution... Help appreciated!
Hi, I am about to purchase a new Mac Pro to have in my studio. One of my unresolved features is what to do with storage. Currently I am considering either: (a) the Apple internal RAID card with 4x500GB 7200 RPM drives; or an external G-Technology G-S
-
DB Version non compatible with BI Beans
I have Oracle Database 10g 10.1.0.2 and I'm traying to work with: JDeveloper 10g (10.1.2.1, Build 1913) and BI Beans 10.1.2.1 or JDeveloper 10g (10.1.2, build 1811) and BI Beans 10.1.2 but the BI Beans give an error BIB-16633, did this version compat
-
How to show differences between vi files?
Is there some way to show the differences in the block diagram between two vi's, say for example between the current and older version? In other languages, I compare the source files using WinDiff.