# Flash Not sending variables data to php D:

**URL:** <https://forum.kirupa.com/t/flash-not-sending-variables-data-to-php-d/264635>\
**Category:** programming\
**Created:** [June 27, 2008, 10:54pm UTC](https://forum.kirupa.com/t/flash-not-sending-variables-data-to-php-d/264635 "2008-06-27T22:54:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arosemena](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@arosemena](https://forum.kirupa.com/u/arosemena)\
**Post date:** [June 27, 2008, 10:54pm UTC](https://forum.kirupa.com/t/flash-not-sending-variables-data-to-php-d/264635/1 "2008-06-27T22:54:34Z")

</div>

ok, i started making a website, and i didnt liked the common html forms so i decided to make a flash one that do the same thing, the problem is that i cant get to send the variables if someone could help i would be gratefull

## Heres the php code

\<?php  
$regusername = $\_POST[rusername];  
$regpassword = $\_POST[rpassword];  
$regname = $\_POST[rname];  
$reglastname = $\_POST[rlastname];  
$regemail = $\_POST[remail];

$con = mysql\_connect(“localhost”,“root”,“2xyynco8”);

mysql\_select\_db(“twdusers”, $con);

mysql\_query(“INSERT INTO testusers(username, password, name, lastname, email, level, power) VALUES(’$regusername’, ‘$regpassword]’, ‘$regname’, ‘$reglastname’, ‘$regemail’, 1, 1)”);

## mysql\_close($con); ?\>

## the php code is working because if i run it directly it creates empty data in the DB, but the problem is in flash because it dont send the variables data to insert, i made 5 forms in flash and named them: name1, lastname1, email1, username1, password1 and then i made a send button with this code=

on (release) {

## var resultVars:LoadVars = new LoadVars(); var DataToSend:LoadVars = new LoadVars(); DataToSend.rname = name1; DataToSend.rlastname = lastname1; DataToSend.remail = email1; DataToSend.rusername = username1; DataToSend.rpassword = password1; DataToSend.sendAndLoad(“[http://localhost/files/flash/forms/register.php](http://localhost/files/flash/forms/register.php)”, resultVars, “POST”); \_root.nextFrame(); }

i hope someone could help me to solve this i have been trying for hours without luck, im using flash 8…

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [June 29, 2008, 11:17pm UTC](https://forum.kirupa.com/t/flash-not-sending-variables-data-to-php-d/264635/2 "2008-06-29T23:17:01Z")

</div>

DataToSend.rname = name1\*\*.text\*\*;  
etc
