sandin 4u
unread,Nov 13, 2007, 1:06:22 AM11/13/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to flex_...@googlegroups.com
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.....