Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Application Form + Scroll Bar
Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tsunade




PostPosted: Sat Jul 02, 2005 3:55 pm   Post subject: Application Form + Scroll Bar

K two questions:

First thing:
Our site at SUPER ALPHA PHASE: http://www.atgig.com/shootingelitextremes/ <--- takes a while to load

K I was working on an application form (see the site)... but realized there is no way to work the submit button since nothing is linked... so I went to this site and build up a email form: http://www.thegoldenmean.com/technique/flashMX_mailform1.html

I followed the instructions on that site.... but I'm getting lots of action script errors... can anyone look at it plz?
the fla file --> http://www.geocities.com/super_saiyan_girl_2000/blah.fla
the php file ---> http://www.geocities.com/super_saiyan_girl_2000/phpscript1.php

I know there's problems with the .fla file... and I dun know if the scripting is right with the php file... btw I have no clue how the php file will work with the fla file together? Do they have to have the same file name???


Second Thing:
If you look under members section (in the URL of the site mentioned above) there is a scroll bar... however, I dun think it's gonna work... the names are placed as buttons, they are not attached to each other in anyway..... But I want to use a scoll bar to scroll down the buttons as I add more names..... so how to do this... an example would be appreciated.... and hmmm I'm a complete noob lol

Thanks
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: Sun Jul 03, 2005 9:35 pm   Post subject: (No subject)

I cannot help you with the flash aspects of your questions, but I can help you with the PHP. It looks like the flash file sends variables via the post method to the script which then takes them and uses them to send an e-mail to whoever you specify.

Also, variables cannot have spaces in them, and the first letter of them is usually lowercase.

This should fix it up:
code:
<?php

// Assign variables
$name = $_POST['name'];
$alias = $_POST['alias'];
$xFire = $_POST['xFire'];
$age = $_POST['age'];
$email = $_POST['email'];
$additionalInformation = $_POST['additionalInformation'];

// Trim the input
$name = trim($name);
$alias = trim($alias);
$xFire=trim($alias); // This one doesn't seem needed
$age = trim($age);
$email = trim($email);
$additionalInformation = StripSlashes($additionalInformation);

$toaddress='Sex_Maester@yahoo.com';

// These were forgotten in the original script
$subject = "Xfire Application";
$message = "
  Name:  $name\n
  Alias:  $alias\n
  Age:  $age\n
  E-mail:  $email\n
  Comments:  $additionalInformation";

mail($toaddress, $subject, $message, "From: $name <$email>");

// Clear the variables
$name = '';
$email = '';
$subject = '';
$message = '';

echo "Mail sent successfully!";
?>

You'll need to change your flash file accordingly with the new variable names.

$Name/Nickname is now $name
$Ingame Name is now $alias
$XFire is now $xFire
$Age is now $age
$Email is now $email
$Additional Information is now $additionalInformation
Tsunade




PostPosted: Fri Jul 08, 2005 4:34 pm   Post subject: (No subject)

so then we can't have any spaces then? BTW thanks for your help
rdrake




PostPosted: Fri Jul 08, 2005 5:09 pm   Post subject: (No subject)

You can have spaces in the values of the variables, but not in the variable name. For example, you can have "John Doe" as the value of a variable such as $name. It's just the variable that can't have the space in it, but the value assigned to the variable can have as many spaces as you want in it.
Tsunade




PostPosted: Tue Jul 26, 2005 3:39 pm   Post subject: (No subject)

K thanks for your help ^^ After I get the rest of the "flash" help... I'll be posting about a guestbook help lol.. will need your help there again

Editing: Still awaiting help in the .fla file according to the php script Razz
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: