Hi I was unable to understand this code , can you give me full code for
connecting the database in flex
On Tuesday, November 13, 2007 11:36:22 AM UTC+5:30, sandin 4u wrote:
>
>
> hii..i was really trying to find answer to this myself for a long time and
> finally got it....hope this will help..below i give the code for a simple
> register page that i had did in my website..
>
>
> <?php
>
> $mysql = mysql_connect('localhost','sandin_sandin','sandhiya');
>
> mysql_select_db( "sandin_quote" ); // here sandin_quote is
> the database name.
>
> $name = $_POST['name'];
> $username = $_POST['username'];
> $password = $_POST['password'];
> $email = $_POST['email'];
> $gender = $_POST['gender'];
> $bday = $_POST['bday'];
> $country = $_POST['country'];
> $secemail = $_POST['secemail'];
> $per = $_POST['per'];
> $know = $_POST['know'];
> $dolike = $_POST['dolike'];
> $sugg = $_POST['sugg'];
>
> $query = "Insert into users
> values('$name','$username','$password','$email','$gender','$bday','$country','$secemail','$per','$know','$dolike','$sugg',1,'xyz','abc')";
>
>
> $result = mysql_query($query);
>
> print($result);
>
> ?>
>
> save this as a php file.
>
>
> see this is a simple php script that i use to insert into sql table...my
> table name is users...in the connect command in 2nd line has three
> arguments na, in that 1st argument is hostname,2nd is sql username and 3rd
> is sql password.
>
> here is the mxml script..
>
>
>
>
>
>
> <mx:HTTPService id="reg" useProxy="false" method="POST"
> url="register.php" result="fncall(event)" />
>
>
> in this in url u give the path to tat php file.
>
> public function regg():void
> {
> var n:String =namee.text;
> var un:String = username.text;
> var p:String = password.text;
> var cp:String = cpassword.text;
> var e:String = email.text;
> var g:String = gender.selectedLabel;
> var bd:String = bday.text;
> var c:String = country.text;
> var se:String = secemail.text;
> var pers:String = per.text;
> var k:String = know.text;
> var d:String = dolike.text;
> var s:String = sugg.text;
>
> var params:Object =
> {name:n,username:un,password:p,email:e,gender:g,bday:bd,country:c,secemail:se,per:pers,know:k,dolike:d,sugg:s};
>
>
> reg.send(params);
>
> }
>
>
> this is the function that activates the php script...
>
> hope u understand with this... if u cant understand tel me, i ll send u
> the full code.....
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/flex_india/-/VLSVV0UtCoIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.