Current location: Hot Scripts Forums » Programming Languages » PHP » Html to Flash, PHP Translation Problem?


Html to Flash, PHP Translation Problem?

Reply
  #1 (permalink)  
Old 11-19-03, 11:48 AM
Pvasoldier Pvasoldier is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Html to Flash, PHP Translation Problem?

Ive been trying to get this to work for some time and noone seems to be able to sort it. If you fancy a challenge here:

I have a movie flash subscription form: http://www.lawsofshotgun.com/test.htm

I keep getting an error from the form. The html code looks like this:

form action="listmessenger.php" method="post">
<table cellspacing="1" cellpadding="1" border="0">
<tr>
<td><font face="Comic Sans MS" size="2">E-mail Address: </font></td>
<td> <font face="Comic Sans MS" size="2">
<input type="text" name="email_address" value="" />
</font></td>
</tr>
<tr>
<td><font face="Comic Sans MS" size="2">Full Name: </font></td>
<td> <font face="Comic Sans MS" size="2">
<input type="text" name="full_name" value="" />
</font></td>
</tr>
<tr bordercolor="1">
<td> <div align="center"><font face="Comic Sans MS" size="2">Subscribe:

<input type="radio" name="action" value="subscribe" CHECKED/>
</font></div></td>
<td> <div align="center"><font face="Comic Sans MS" size="2">UnSubscribe:

<input type="radio" name="action" value="unsubscribe" />
</font></div></td>
</tr>
<tr>
<td colspan="2" align="right"> <font face="Comic Sans MS" size="2">
<input type="hidden" name="group_ids[]" value="1" />
<input type="submit" name="submit" value="Proceed" />
</font></td>
</tr>
</table>
</form

The flash form fla i made looks can be found here: www.lawsofshotgun.com/flash
and its called "mailing_list_module.fla"

Can someone please have a look and finally put this problem to rest.
Thanks
Reply With Quote
  #2 (permalink)  
Old 11-19-03, 11:53 AM
YourPHPPro's Avatar
YourPHPPro YourPHPPro is offline
Community VIP
 
Join Date: Aug 2003
Posts: 430
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Pvasoldier
Ive been trying to get this to work for some time and noone seems to be able to sort it. If you fancy a challenge here
I received the following error:

Warning: Invalid argument supplied for foreach() in /home/lawsofsh/public_html/listmessenger.php on line 332

What is line 325-345 of listmessenger.php or what is the version of listmessenger that you run ?

Is this problem only when you use Flash or also when you use HTML on your site ?
Reply With Quote
  #3 (permalink)  
Old 11-19-03, 11:57 AM
YourPHPPro's Avatar
YourPHPPro YourPHPPro is offline
Community VIP
 
Join Date: Aug 2003
Posts: 430
Thanks: 0
Thanked 0 Times in 0 Posts
I think the error is in the html/flash code as I was able to add/delete an email address by visiting the following URL:

http://www.lawsofshotgun.com/listmes....com&group_ids[]=1&action=subscribe

http://www.lawsofshotgun.com/listmes....com&group_ids[]=1&action=unsubscribe
Reply With Quote
  #4 (permalink)  
Old 11-19-03, 12:05 PM
Pvasoldier Pvasoldier is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
cool.. it definetly the flash!

IM using listmessenger 0.9.4 im waiting for the lite version to come out!

The php line says:

if ($_REQUEST["action"] == "subscribe") {
$error = 0;
$errorstring = "";
$output = "";
if ((!isset($_REQUEST["group_ids"])) || (count($_REQUEST["group_ids"])) < 1) {
$error++;
$errorstring .= "<li>You failed to specify at least one group to subscribe to.</li>";
}
if (!$_REQUEST["email_address"]) {
$error++;
$errorstring .= "<li>You did not enter an e-mail address.</li>";
} else {
if (!valid_address($_REQUEST["email_address"])) {
$error++;
$errorstring .= "<li>Please enter a valid e-mail address.</li>";
} else {
if($mxlookup == true) {
$email = explode("@",$_REQUEST["email_address"]);
$mailhost = $email[1].".";
if((getmxrr($mailhost, $mxhosts) == false) && (gethostbyname($mailhost) == $mailhost)) {
$error++;
$errorstring .= "<li>".$mailhost." is not a valid mail host.</li>";
}
}
}
}

// No Errors Occured, okay to proceed.
if ($error == 0) {
unset($group_array);
foreach($_REQUEST["group_ids"] as $value) {
$result = mysql_query("SELECT * FROM `user_list` WHERE `user_address`='".$_REQUEST["email_address"]."' AND `group_id`='".$value."';");
if((!$result) || (!$row=mysql_fetch_array($result))) {
$group_array[] = $value;
}
}
if(count($group_array) > 0) {
if(($result = queue_user($group_array, $_REQUEST["email_address"], $_REQUEST["full_name"], "subscribe")) != false) {

>>>>Warning: Invalid argument supplied for foreach() in /home/lawsofsh/public_html/listmessenger.php on line 332<<<<

>>>>Is this problem only when you use Flash or also when you use HTML on your site ?<<<<

The Html is fine, works perfectly its just the flash that has some array problem.
Reply With Quote
  #5 (permalink)  
Old 11-22-03, 04:45 AM
Pvasoldier Pvasoldier is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
ok

Well i think this is an array problem as ive spoked ot the designer of listmessenger and he says it should be simple.

I jsut cant figure out the arrays and make them work. Does anyone ahve a clue? as its really annoying me now as ive been doing it for about 6 months and i have little knowledge of actionscript!

PLease can someone help!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP in HTML Pages? ZeoFateX PHP 19 01-04-06 06:42 PM
Fast growing RPG site seeks PHP or Flash programmars lanzer Job Offers & Assistance 7 03-06-04 05:00 PM
Free PHP / Flash photo gallery Niklas Script Requests 1 01-06-04 10:45 PM
help plz: format retrieved Mysql data in HTML with PHP paulj000 PHP 2 10-19-03 08:03 PM
Javascript vs PHP, problem with arrays Chuff JavaScript 0 10-03-03 04:01 AM


All times are GMT -5. The time now is 05:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.