# Please Help with Button AS

**URL:** https://forum.kirupa.com/t/please-help-with-button-as/186509
**Category:** flash
**Created:** [April 21, 2006, 8:36pm UTC](https://forum.kirupa.com/t/please-help-with-button-as/186509 "2006-04-21T20:36:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bmalex](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@bmalex](https://forum.kirupa.com/u/bmalex)
#### Post date: [April 21, 2006, 8:36pm UTC](https://forum.kirupa.com/t/please-help-with-button-as/186509/1 "2006-04-21T20:36:41Z")

</div>

Greetings Forum,  
I actually posted this thread in Flash 2004 mx. I thought maybe I can get some help over here.

I have a simple button in a swf file that I am trying to get to load a php page into the browser. Simple right?? Well my button wants to open a new window and go to the actual .com website. I know I am suppose to load variables somewhere but I don’t know where. I have looked at a lot of tutorials but I can’t seem to make any sense out of them. Here is my code…

The as for my button is…

on (release) {  
loadVariables("&email=$s\_email","\_parent",“POST”);  
getURL(“jobseekeroptions.php”,0,“POST”);  
}

Here is the php code that I am trying to communicate with…

\<?php  
include ("…/config/config.inc");  
// start session and bring in session variables  
session\_start();  
// forward to login page if the session is not valid  
if(!isset($s\_email))  
{  
header(“Location:jobseeker\_menu.php”);  
exit();  
}  
@$link = mysql\_connect(SYSTEM,USERNAME,PASSWORD);  
mysql\_select\_db(DATABASE) or die( “Unable to select database”);  
$query = “Select \* from booth where email=’$s\_n\_email’”;  
$result = mysql\_query($query);  
if(!$result)  
{  
echo “Error - Could not get Job information from database.”;  
mysql\_close();  
exit;  
}  
$resoption = $row[‘resoption’];  
header(‘location:$resoption’);  
?\>

Someone please help me!!! I really need to get this thing to work.

---

<div class="post-metadata">

### Author: ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)
#### Post date: [April 21, 2006, 8:46pm UTC](https://forum.kirupa.com/t/please-help-with-button-as/186509/2 "2006-04-21T20:46:21Z")

</div>

```auto
on (release) {
   var whatever:LoadVars = new LoadVars();
   whatever.sendAndLoad("jobseekeroptions.php, whatever, "POST");
   whatever.onLoad = function() {
      trace ("you just sent to the php and got back a response through LoadVars without leaving the flash:)")
   }
}

```

---

<div class="post-metadata">

### Author: ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)
#### Post date: [April 21, 2006, 8:47pm UTC](https://forum.kirupa.com/t/please-help-with-button-as/186509/3 "2006-04-21T20:47:55Z")

</div>

```auto
on (release) {
   var whatever:LoadVars = new LoadVars();
   whatever.sendAndLoad("jobseekeroptions.php", whatever, "POST");
   whatever.onLoad = function() {
      trace ("you just sent to the php and got back a response through LoadVars without leaving the flash:)")
   }
} 

```

---

<div class="post-metadata">

### Author: ![bmalex](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@bmalex](https://forum.kirupa.com/u/bmalex)
#### Post date: [April 21, 2006, 9:25pm UTC](https://forum.kirupa.com/t/please-help-with-button-as/186509/4 "2006-04-21T21:25:44Z")

</div>

Hey Defective,  
When I use this code the button doesn’t work. Anything else???
