Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Interface W/ PHP Script Question..

Status
Not open for further replies.

killbuzz

Technical User
Mar 21, 2001
103
US
Hey all! I have a flash interface form, with a PHP script. The form works! But, I can’t seem to figure out how to make some parts of the form “required to fill out” Here’s the PHP file.. Any idea’s?

Thanks !!!THE PHP SCRIPT IS BELOW!!!

<?php


$TextVariable = '&results=';
$response = 'Data Sent. Thank You..';


echo $TextVariable;
echo $response;

mail (&quot;contact@yourwebsite.com&quot;, &quot;Feed Back Entry&quot;, &quot;

Flash Form Response:

yourname: $yourname
song: $song
comments: $comments


Sent From : $REMOTE_ADDR


&quot;);


?>
 
make the form impossible to send if there's nothing in those fields.

in the flash interface you probably assigned names to the input text fields, right? (i assume it's Flash MX) or at least names to the variables. Check to see if that string is empty, and if it is, don't send, give back an error message like &quot;you didn't write the name of the song!&quot;.

let's say you have the text field named &quot;song&quot; then on the submit button you put this action:
on(release){
if(_root.song.toString()==&quot;&quot;){
_root.errortext=&quot;you need to write the song&quot;;
}else{
send the variables to the PHP script;
}
} Diana.
icq: 111872918
 
Okay on my submit button in flash this is what i have..

on (press) {
results = &quot;Sending Data...&quot;;
loadVariablesNum(&quot; 0, &quot;POST&quot;);
}
on (release) {
gotoAndStop(2);
}

The gotoAndStop is to a thank you for the feedback statement..

The one you have

on(release){
if(_root.song.toString()==&quot;&quot;){
_root.errortext=&quot;you need to write the song&quot;;
}else{
send the variables to the PHP script;
}
}
where would i put the direct to the PHP script? Could i?

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top