Need Help With Button Actionscript

Greetings Forum,
Can someone tell my how to configure the actionscript for my flash button to load a php page into the browser??
The way I have it now, when the button is clicked, it opens a new window and goes to my home page ???

Here is what I have…

on (release) {
getURL(“jobseekeroptions.php”,“post”);
}

I know I am supposed to load some variables somewhere, but where??

Oh and yes, I am a flash 2004 mx beginner.

Can anyone tell me what I am doing wrong here??

Thanks in advance

[AS]on (release) {
getURL(“jobseekeroptions.php”,"_blank",“post”);
}
[/AS]:cowboy:

To BlueNar,
Thanks for your response. I put that script in, saved and published the swf file and it is still opening the .com website instead of loading the php page.
Any other suggestions ???

Is there another actionscript that would perform this task???

you can try:

var blah:LoadVars = new LoadVars();
blah.sendAndLoad("jobseekeroptions.php",0,"POST");

That would work but is not really for that purpose:) Comes in handy if you want to send some post variables to the php.

Detective
Is this how the actionscript should be written???

on (release) {
var $s_email:LoadVars = new LoadVars();
$s_email.sendAndLoad(“jobseekeroptions.php”,0,“POST”);;
}

nope… you can add a variable like this:


emailaddress = "jimbob@whatever.com";
var blah:LoadVars = new LoadVars();
blah.email = emailaddress;
blah.sendAndLoad("jobseekeroptions.php",0,"POST");

Then in your PHP you could refer to that variable as “$_POST[‘email’]”. The value of $_POST[‘email’] would be jimbob@whatever.com:slight_smile:

To Defective
Again thanks for your response. I am just not getting it!!!
I tried your suggestion and the button doesn’t even respond. I really can’t understand why when I use…

on (release) {
getURL(“jobseekeroptions.php”,“0”,“POST”);
}

The result is a new window with the actual .com website. What is going on??
I am in dire need of getting this button and code to work right. There is compensation available for anyone who will give me a hand. Just email me

Again thanks

the 0 isn’t supposed to in quotations. I think you need to post your jobseekeroptions.php code, as that seems to be the issue for you.

OK BlueNar,
Here is my php code. Where do I load the varibles for my button actionscript??

<?php
include ("…/config/config.inc");
//include (“booth_visit.php”);
// validate data
// 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: logon.htm”);
exit();
}
// get booths from database

@$link = mysql_connect(SYSTEM,USERNAME,PASSWORD);

if(!$link)
{
echo “Database seems to be down”;
exit;
}
mysql_select_db(DATABASE) or die( “Unable to select database”);

$query = “SELECT * FROM booth where email = ‘$email’”;
$result = mysql_query($query);

if(!$result)
{
echo “Error - Could not get booth information from database.”;
mysql_close();
exit;
}
$row = mysql_fetch_array($result);
$resoption = $row[‘resoption’];
header(“location:$resoption”);
?>