Hola como están todos, necesito si alguien por favor me puede ayudar con una duda que tengo sobre como enlazar o crear un formulario flash a un script en php. De php tengo un buen conocimiento de hecho cree este script pero quiero hacer el formulario en flash, que tendría que declarar o como lo tendría que hacer, este es el script que hice en php:
Register.php
<?php
require_once('db.php');
include('functions.php');
if(isset($_POST['register']))
{
if($_POST['username']!='' && $_POST['password']!=''
&& $_POST['password']==$_POST['password_confirmed']
&& $_POST['email']!=''
&& valid_email($_POST['email'])==TRUE
&& checkUnique('Username', $_POST['username'])==TRUE
&& checkUnique('Email', $_POST['email'])==TRUE)
&& checkUnique= "&checkUnique";
{
$query = mysql_query("INSERT INTO users (`Username` , `Password`, `Email`, `Random_key`) VALUES ('".mysql_real_escape_string($_POST['username'])."', '".mysql_real_escape_string(md5($_POST['password']))."', '".mysql_real_escape_string($_POST['email'])."', '".random_string('alnum', 32)."')") or die(mysql_error());
$getUser = mysql_query("SELECT ID, Username, Email, Random_key FROM users WHERE Username = '".mysql_real_escape_string($_POST['username'])."'") or die(mysql_error());
if(mysql_num_rows($getUser)==1)
{//there's only one MATRIX :PP
$row = mysql_fetch_assoc($getUser);
$headers = 'From:
[email protected]' . "\r\n" .
'Reply-To:
[email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$subject = "Activation email from ourdomainhere.com";
$message = "Dear ".$row['Username'].", this is your activation link to join our website. In order to confirm your membership please click on the following link: http://www.ourdomainhere.com/confirm.php?ID=".$row['ID']."&key=".$row['Random_key']." Thank you for joining";
if(mail($row['Email'], $subject, $message, $headers))
{//we show the good guy only in one case and the bad one for the rest.
$msg = 'Account created. Please login to the email you provided during registration and confirm your membership.';
}
else {
$error = 'I created the account but failed sending the validation email out. Please inform my boss about this cancer of mine';
}
}
else {
$error = 'You just made possible the old guy (the impossible). Please inform my boss in order to give you the price for this.';
}
}
else {
$error = 'There was an error in your data. Please make sure you filled in all the required data, you provided a valid email address and that the password fields match';
}
}
?>
<?php if(isset($error)){ echo $error;}?>
<?php if(isset($msg)){ echo $msg;} else {//if we have a mesage we don't need this form again.?>
<?=$_SERVER['PHP_SELF']?>
<?php if(isset($_POST['username'])){echo $_POST['username'];}?>
<?php if(isset($_POST['email'])){echo $_POST['email'];}?>
<? } ?>
Por favor alguien me podria ayudar??