PHP - Moved: How To I Get Rid Of The Html Tag Crap With My Flash>php Email Forms?
This topic has been moved to Other.
http://www.phpfreaks.com/forums/index.php?topic=347753.0 Similar TutorialsThis topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=311671.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=349365.0 What am I doing wrong? All I want is a flash and php email form working. At best i get the elements emailed surrounded by all the html formatiing tags makign it impossible to head or only a few (ie messahe and phone) show up in email sent or more often nothign gets sent at all. In the flash filn I have a send button with Code: [Select] onClipEvent(data){ _root.nextFrame(); } actioned on the form movie in flash And Code: [Select] on(release){ form.loadVariables("email_send.php", "POST"); } script on the send button. The movie where the form is places has 5 fields made with input text with Instant names: Inp_Name Inp_Department Inp_Email Inp_Phone Inp_Message their variables are; name dept phone message Also in the properties theya re all set to HTML rednering is set to off and the webssite is www.chriscreativity.com Why does it not work at all and if it does how do I loose the htmal formings crap and get it to work please Code: [Select] <strong><?php /* --------------------------- php and flash contact form. by www.MacromediaHelp.com --------------------------- Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, so make sure your email (on last line of this file) is one hosted on same server. --------------------------- */ $sendTo = "chris.bruneluni@yahoo.co.uk"; $subject = "Message from chriscreativity.com"; // read the variables form the string, (this is not needed with some servers). $headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; $message = $_POST["message"]; mail($sendTo, $subject, $message, $headers); ?></strong> [attachment deleted by admin] Can anyone explain... (note this is first time using PHP , dont have a clue, only using it as FLash CS5 wont send emails forms directly) so add all the details and explain it all please.) why my yahoo email is not detecting this at all. Also I managed some success earlier with earlier attempts but eveythign was surrounded with html tags even though I set them to off in Flash on the property tabs on the input text. In the Flash file . swf the send button has this code Code: [Select] on(release){ form.loadVariables("email_send.php", "POST"); } and the movie containing the input text fields has this code Code: [Select] onClipEvent(data){ _root.nextFrame(); } the next page is a thank you screen The variables in the input text boxes in the Flash file are name, dept, phone, email and message Code: [Select] <?php $sendTo = "chris.bruneluni@yahoo.co.uk"; $subject = "Message from chriscreativity.com"; $headers = "From: ". $_POST("name"); $headers = "Postion: ". $_POST["dept"]; $headers = "<". $_POST["email"] .">". "\r\n"; $headers = "Reply-To: " . $_POST["email"] . "\r\n"; $headers = "Return-Path: ". $_POST["email"] ; $headers = $_POST["phone"]; $message = $_POST["message"]; $message = wordwrap($message, 70); mail($sendTo, $subject, $headers, $message); ?><\Strong> Please can you help to A) get it to email my yahoo email B) make an email that looks like Name: Micky Dept : Disney Emial : Mick @mouse.com etc not <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000" LETTERSPACING="0" KERNING="0">Micky</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000" LETTERSPACING="0" KERNING="0"> please [attachment deleted by admin] This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=320884.0 I have to make a code that takes X amount of teams and and pairs them each up a given amount of time. No match ups can repeat themselves and they have to be matched up Y amount of times. I've been working on this code since 8:00 last not and I still haven't been able to get it completely working. Now, its stuck in an endless loop in which the match up is being endlessly inserted into the database. Why is this resulting in an endless loop? $started = "false"; $id=$_GET['id']; $gid = $id; //Identify game $sql = "select * from `games` where `id`='$id'"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result)){ $game = $row['title']; } //$games = $_POST['games']; //START Grab Game //Find Team $a=0; $sql5 = "select * from `leagues` where `game`='$game'"; $result5 = mysql_query($sql5) or die(mysql_error()); while ($row5 = mysql_fetch_array($result5)){ $division = $row5['name']; $sql6 = "select * from `conferences` where `game`='$game' and `division`='$division'"; $result6 = mysql_query($sql6) or die(mysql_error()); while ($row6 = mysql_fetch_array($result6)){ $conference = $row6['title']; $sql = "select * from `teams` where `game`='$game' and `league`='$division' and `conference`='$conference'"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result)){ $a += 1; $teamId = $row['id']; $team = $row['name']; $teamsIndex["$a"] = $team; $division = $row['league']; $conference = $row['conference']; } //Each Team is stored in an index $b = 0; while ($b<$a){ $b+=1; $teams["$b"]=$b; } $cWeek = 1; $weeks = $_POST['weeks']; //So we have 15 teams. Cycle each team and make matchups while($cWeek<=$weeks){ echo "<br><br><b>Week $cWeek</b><hr>"; $b = 1; $rows = -1; echo "<br>Rows redeclared"; while ($b<=$a){ $bold = $b; echo "<br>DEBUG: $b/$a"; $end = "false"; $stopper = 0; while ($end!="true"){ echo "<br><i>End: $end</i>"; $team1 = $b; $redo="false"; $reverse = "false"; ///lets match up a random $against = $team1; while ($against==$team1){ $against = rand(1,$a); } echo "<br>Row: $rows"; //We have rows set, so lets check each row. $rowcheck = 0; $cancont = 0; echo "<br><i>$team1 vs $against</i>"; $stop = "false"; if ($rows==-1){ $stop = "true"; echo "<br><u>FIRST ROW</u>"; } while ($rowcheck<=$rows){ $reverse = "false"; $redo = "false"; $cancont = 1; echo "<br><i>RC: $rowcheck/$rows</i>"; $t1 = $games[$rowcheck]["Team1"]; $t2 = $games[$rowcheck]["Team2"]; echo "<br><i>t1 = $t1; t2 = $t2</i>"; if($t2==$against){ $cancont = 0; $redo="true"; echo "<br> Team 2 already has a match"; } if($team1==$t2){ if($against==$t1){ //The match is already set, just in the reverse order $stop="true"; echo "<br> Team 1 already has a match against team 2"; } } if ($cancont==0){ $rowcheck=$rows+10; $redo="true"; }else{ $rowcheck +=1; } //Check if already matched up in a previous week. $teamA = $teamsIndex["$b"]; $teamB = $teamsIndex["$against"]; //WAIT how many weeks are listed? $prev = "false"; $sql9 = "select * from `matches` where `game`='$game' and `division`='$division' and `team1`='$teamA' and `team2`='$teamB'"; $result9 = mysql_query($sql9) or die(mysql_error()); while ($row9 = mysql_fetch_array($result9)){ $stop = "false"; $rowcheck = $rows+1; $prev = "true"; echo "<br>Match Already Made"; } $sql9 = "select * from `matches` where `game`='$game' and `division`='$division' and `team1`='$teamB' and `team2`='$teamA'"; $result9 = mysql_query($sql9) or die(mysql_error()); while ($row9 = mysql_fetch_array($result9)){ $stop = "false"; $rowcheck = $rows+1; $prev = "true"; echo "<br>Match Already Made"; } if($prev=="false"){ if ($team1!=$t1){ if ($against!=$t2){ if ($team1!=$t2){ if ($against!=$t1){ $stop="true"; echo "<br>AVALIBLIE"; }else{ $stop="false"; echo "<br>Team Two = t1"; $rowcheck = $rows+1; } }else{ echo "<br>Team1 = t2"; //HOLD ON. If this happens, it should not record, but still print it! $stop = "true"; $reverse = "true"; $against = $t1; $rowcheck = $rows+1; } }else{ $stop="false"; echo "<br>Team2 = t2"; $rowcheck = $rows+1; } }else{ $stop="false"; echo"<br>Team1 =t1"; $rowcheck = $rows+1; } } } //Can we record the match? if ($redo=="true"){ $end = "false"; }else{ //No issues where found $end = "true"; } //Record match //if it wasn't stopped! if($stop=="true"){ if ($rows==-1){ $end = "true"; $games = array( array( "Team1" => "$team1", "Team2" => "$against" ) ); echo "<br><i>First</i>"; $rows +=1; echo "<Center><br><b>$team1 vs $against</b> ($rows)<br><br></center>"; //Convert Indexes $team1 = $teamsIndex["$b"]; $against = $teamsIndex["$against"]; $sql = "insert into `matches` (`team1`,`team2`,`game`,`division`,`week`) values ('$team1','$against','$game','$division','$cWeek')"; mysql_query($sql) or die(mysql_error()); $sql3 = "select * from `bb_forums`"; $mcids=1; $result3 = mysql_query($sql3) or die(mysql_error()); while($row3 = mysql_fetch_array($result3)){ $mcids+=1; } $sql3 = "insert into `bb_forums` (`cid`,`name`,`islocked`) values ('7','Match Chat #$mcids','false')"; mysql_query($sql3) or die(mysql_error()); $sql3 = "select * from `bb_forums` where `name`='Match Chat #$mcids'"; $result3 = mysql_query($sql3) or die(mysql_error()); while($row3 = mysql_fetch_array($result3)){ $id = $row3['id']; } $url = "<a href='forum.php?page=tlist&id=$id'>Match Forum</a>"; $url = mysql_real_escape_string($url); $sql3 = "insert into `matchcom` (`team`,`url`,`team2`,`week`) values ('$against','$url','$team1','$cWeek')"; mysql_query($sql3) or die(mysql_error()); $sql3 = "select * from `matchcom` where `url`='$url'"; $result3 = mysql_query($sql3) or die(mysql_error()); while ($row3 = mysql_fetch_array($result3)){ $mcid = $row3['id']; } $sql3 = "insert into `matchcom_data` (`mcid`,`game`,`division`) values ('$mcid','$game','$division')"; mysql_query($sql3) or die(mysql_error()); $end = "true"; }else{ if($reverse!="true"){ $rows +=1; echo "<br>$rows"; $games[$rows]["Team1"]="$team1"; $games[$rows]["Team2"]="$against"; //array_push($games,Team1 => "$team1", Team2 => "$against"); /*$games .= array( array( Team1 => "$team1", Team2 => "$team2" ) ); */ echo "<centeR><br><b>$team1 vs $against</b> ($rows) <br><br></center>"; //Convert Indexes //$team1 = $b; echo "<br>$b"; $team1 = $teamsIndex["$b"]; $against = $teamsIndex["$against"]; //Insert into Matches $sql = "insert into `matches` (`team1`,`team2`,`game`,`division`,`week`) values ('$team1','$against','$game','$division','$cWeek')"; mysql_query($sql) or die(mysql_error()); //Insert into Match Com $sql3 = "select * from `bb_forums`"; $mcids=1; $result3 = mysql_query($sql3) or die(mysql_error()); while($row3 = mysql_fetch_array($result3)){ $mcids+=1; } $sql3 = "insert into `bb_forums` (`cid`,`name`,`islocked`) values ('7','Match Chat #$mcids','false')"; mysql_query($sql3) or die(mysql_error()); $sql3 = "select * from `bb_forums` where `name`='Match Chat #$mcids'"; $result3 = mysql_query($sql3) or die(mysql_error()); while($row3 = mysql_fetch_array($result3)){ $id = $row3['id']; } $url = "<a href='forum.php?page=tlist&id=$id'>Match Forum</a>"; $url = mysql_real_escape_string($url); $sql3 = "insert into `matchcom` (`team`,`url`,`team2`,`week`) values ('$against','$url','$team1','$cWeek')"; mysql_query($sql3) or die(mysql_error()); $sql3 = "select * from `matchcom` where `url`='$url'"; $result3 = mysql_query($sql3) or die(mysql_error()); while ($row3 = mysql_fetch_array($result3)){ $mcid = $row3['id']; } $sql3 = "insert into `matchcom_data` (`mcid`,`game`,`division`) values ('$mcid','$game','$division')"; mysql_query($sql3) or die(mysql_error()); }else{ echo "<centeR><br><b>$team1 vs $against</b> ($rows) <br><br></center>"; } $end = "true"; } $end="true";
This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=307175.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=326310.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=343204.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=356776.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=358012.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=348555.0 Hi, I am very new to PHP and am having trouble understanding how HTML, PHP and JavaScript work together. What I have to do is, I have a 'Choose File' option, where I select the file. Then I transfer this file to server and read the contents in an array. This is done in one form. In the other form I send the contents read from the to a different *.php for some database querying. Following is what I have. I don't know how to transfer data between different files. Code: [Select] <form name ="INPUT" method="POST" enctype="multipart/form-data" action="readInput.php"> <p id="upload_text"><br/> <textarea name="queryList" id="queryList" cols="35" rows="10" wrap="physical" value='' onclick ="document.INPUT.queryList.value='';"> Enter input here... </textarea><br/> </p> <p> <!-- <input name=INPUTS type=hidden value=$entries[]/>--> </p> <p id="upload_button"><br/> File: <input name="uploadedfile" type="file" size="30" onchange='fillTextArea(<?php echo $entries; ?>)'/><br/> </p> <iframe id="upload_target" name="upload_target" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe> <a href="javascript: submitReadForm()"></a> </form> <script type="text/javascript"> function submitReadForm() { document.INPUT.submit(); } </script> <script language="javascript" type="text/javascript"> //var inData = new Array(); function fillTextArea(inData){ if (inData == "") { document.getElementById('queryList').textContent = "No Input" alert("No Input Data Returned"); } else { document.getElementById('queryList').textContent = inData; } } </script> <form name ="GETPDB" action ="viewPDBs.php" method="POST" enctype="multipart/form-data" > <p id="submit_upload"> <input type="submit" name="submit" value="Submit" /><br/> </p> <p> <!-- #<#?php echo $entries; ?> #<#php foreach ($entries as $k => $e) : ?> <input type="hidden" name="entries[<#?php echo $k ?>]" value="<#?php echo addslashes($e) ?>"> #<#?php endforeach; ?> --> <input name=IDS type=hidden value="<?php echo $input; ?>"/> </p> <a href="javascript: submitPDBForm()"></a> </form> Please help me with this. Thanks. Is it worthwhile to create an object to generate my HTML forms? Starting out it would appear to be worthwhile but I'm not sure how things might change later down the line when I'm doing more with my forms and introducing javascript to it. It's a bunch of coding to change all my forms now so I wanted to hear some input before I started. Would this be just a complete waste of server side processing? TIA! Hi, I have found myself in a bit of a cul-de-sac. Hope you can help as it is driving me crazy. The scenario: I have an html form (_post) which I would like to write the contents of to a one XML file using php. The problem is: The html page has three/four forms in it. Form a = (submit a writes/updates only to section a) Form b = (submit b writes/updates only to section b) Form c = (submit c writes/updates only to section c) Form d= (submit a, b, c writes/updates all sections) The XML page has three sections a, b & c To conclude, I want to be able to update the XML file in sections or update them all as a whole. How can I go about achieving this? Thanks This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=343012.0 Hi I am having a major problem with trying to get the HTML value attribute to display the a value stored in a array from SQL Query. So i have done an SQL query then outputted it all to the screen, but i cant set the value attribute on my HTML form to the variable $Name. Can anyone please tell me where i am going wrong? Thanks Nick while($nt=mysql_fetch_array($result)){ echo "$nt[photo_url] $nt[Name] $nt[Education] $nt[Skills] $nt[Aboutme] <br>"; // name class and mark will be printed with one line break at the end } $Photo_url = $_POST["photo_url"]; $Name = $_POST["Name"]; $Education = $_POST["Education"]; $Skills= $_POST["Skills"]; $Aboutme = $_POST["Aboutme"]; ?> <form method="post" action="updateaboutme.php"> Photo Url:<input type="text" size="12" maxlength="12" name="Photo_url" value="<?php echo $nt['Name'] ?>" <br /> <input type="submit" value="submit" name="submit"> </form> This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=318389.0 This topic has been moved to Linux. http://www.phpfreaks.com/forums/index.php?topic=315763.0 |