PHP - Php Flash Or No Flash
is there anyway with php to run a script to see weather the browser supported flash or not, and if it does/does not support flash to redirect it to to different urls ?
thanks for any advice in advance Similar TutorialsHi to all gurus, Here is a small program in flash which calls values from PHP and displays them correctly. path = "http://localhost/xampp/nwjv/php/"; //declare path to php files lvOut = new LoadVars(); //create lv object sending variables OUT to php lvIn = new LoadVars(); //create lv object receiving variables IN from php lvIn.onLoad = function (success) { if(success) { //PHP variable value to textbox InVal = lvIn.returnVal; InTxt = lvIn.retVal; output.text = InVal; output1.text = InTxt; /* output1.text = "No Value"; if(InTxt == 'lo' ) { output1.text = "Low Value"; } if(InTxt == 'hi') { output1.text = "High Value"; } */ }else{ //...or notify of failure output.text = "fail"; } } myBtn.onRelease = function(){ //assign user-input value to lv property called years lvOut.years = years.text; //send to a blank window // lvOut.send(path + "dogyears_new1.php",lvIn,"GET"); lvOut.sendAndLoad(path + "dogyears_new1.php",lvIn,"GET"); }; Hey guys, once again I have a question. For the game I'm working on in PHP for practice with MySQL, I want to see if I can use data from a flash document (you play a little game and get x points, you are then given x worth of resources...) I'm not very good with ActionScript, and I dont think ActionScript can connect to mySQL... I'm thinking I could just make a page that the flash program links to, then that gives the points (and I could just have a set amount of points for completing the task...) But then people could just keep going to that page and getting infinite resources... Is there a way I could hide the adress of the page so nobody knows what it is? Thanks! Hey guys I'm trying to make browser game and I was wondering if this is possible. 99% of the game is html/php/mysql but I wanted one little mini game to be in flash. after playing the flash game if you win you get +1 of whatever to your account. So my question is can someone program that cross over of flash back into php? Thanks Is there any way to link these together? For example if I create a video player in Flash, can I use it in PHP etc? This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=320884.0 Hi:
I have a wordpress, and I want to publish a flash animation.
I´ve modified the wordpress file sidebar.php with a include to this code in another .php file, but I don´t see nothing, but I don´t have any error... just "white space" instead the animation...
Can you help me with the code??
<? $wmode = "opaque"; $refererId = 258; $bannerId = 210; $width = 250; $height = 250; $link = "http://www.bellross.com/index.php?bannerId=".$bannerId."&refererId=".$refererId; $flashLink = "http://www.bellross.com/index.php?bannerId=".$bannerId."%26refererId=".$refererId; ?> <style type="text/css"> body, object { padding:0; margin:0; } #timekeeper, .link { width: <?= $width?>px; height:<?= $height?>px; } .hand { bottom: 0px; left: 107px; } </style> <link href="wp-content/themes/sahifa/template/style.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> window.onload = function() { if(document.getElementsByTagName('body')[0].style.MozTransform == '' || document.getElementsByTagName('body')[0].style.WebkitTransform == '' || document.getElementsByTagName('body')[0].style.OTransform == '' || document.getElementsByTagName('body')[0].style.transform == '') { function hand() { handS.style.MozTransform = handS.style.WebkitTransform = handS.style.OTransform = handS.style.transform = 'rotate(' + (time * 6) + 'deg)'; handM.style.MozTransform = handM.style.WebkitTransform = handM.style.OTransform = handM.style.transform = 'rotate(' + (time / 10) + 'deg)'; handH.style.MozTransform = handH.style.WebkitTransform = handH.style.OTransform = handH.style.transform = 'rotate(' + (time / 120) + 'deg)'; } var handH = document.getElementById('handH'); var handM = document.getElementById('handM'); var handS = document.getElementById('handS'); var timekeeper = document.getElementById('timekeeper'); var d = new Date(); var time = d.getSeconds() + 60 * d.getMinutes() + 3600 * d.getHours(); hand(); setInterval(function() {time = time+0.20; hand();}, 200); setInterval(function() {r = new Date(); time = r.getSeconds() + 60 * r.getMinutes() + 3600 * r.getHours(); hand()}, 10000); } }; </script> <script src="wp-content/themes/sahifa/swf/Scripts/swfobject_modified.js" type="text/javascript"></script> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $width?>" height="<?= $height?>"> <param name="movie" value="wp-content/themes/sahifa/swf/timekeeper.swf"> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Cette balise <param> invite les utilisateurs de Flash Player en version 6.0 r65 et ultérieure à télécharger la version la plus récente de Flash Player. Supprimez-la si vous ne voulez pas que cette invite soit visible. --> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <!-- La balise <object> suivante est destinée aux navigateurs autres qu'IE. Supprimez-la d'IE à l'aide d'IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="wp-content/themes/sahifa/swf/timekeeper.swf" width="<?= $width?>" height="<?= $height?>"> <!--<![endif]--> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Le navigateur affichera le contenu alternatif suivant pour les utilisateurs d'un lecteur Flash de version 6.0 ou de versions plus anciennes. --> <div id="timekeeper"> <a href="<?= $link; ?>" target="_blank" class="link"></a> <img src="template/images/handH.png" class="hand" id="handH" alt="heure"/> <img src="template/images/handM.png" class="hand" id="handM" alt="minute"/> <img src="template/images/handS.png" class="hand" id="handS" alt="seconde"/> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object>Do you see anything wrong? How can I make this work in my page? I hope you can help me. Thanks. Regards Is there anyway to have users play flash games on my forum and if they win/etc, send them Forum Gold? Wouldn't it be easy to hack it though by just changing the data being sent from the flash app with tamper data? I want to put a poker flash game on my site, and if users play poker/etc and if they win, I want to run a mysql query to update there account with more "Forum gold" If you will, and I want the poker flash game to have correspond and work with the amount of Forum Gold that they have? Would this have to be custom coded by me If I learn actionscript? OR is there anything out like this that I can use? So the site is using a flash section to control navigation. when I click the button pages are not loaded only the flash here is url: Script to control flash generated url Code: [Select] <?php function fudgePage(){ $url = trim(strtolower(preg_replace('([^[:alnum:]\|\/\:\.\_\-])', '', "http://".$_SERVER['SERVER_NAME'].'/'.$_SERVER['REQUEST_URI']))); $parts = parse_url($url,PHP_URL_PATH); $sections = explode('/',trim($parts,'/')); $section = @ trim(substr(ereg_replace('([^[:alnum:]\-])','',$sections[0]),0,50)); $subsection = @ trim(substr(ereg_replace('([^[:alnum:]\-])','',$sections[1]),0,50)); $pages = array(); $pages[''] = "sections/homeContent.php"; $pages['residential'] = "sections/residentialContent.php"; $pages['residential-virtual-tours'] = "sections/virtualTours.php"; $pages['residential-features'] = "sections/featuresContent.php"; $pages['residential-floorplans'] = "sections/floorPlansContent.php"; $pages['residential-site-key-plan'] = "sections/siteKeyContent.php"; $pages['retail'] = "sections/retailContent.php"; $pages['interest'] = "sections/emailContent.php"; $pages['location'] = "sections/locationContent.php"; $pages['contact'] = "sections/contactContent.php"; $pages['news'] = "sections/newsContent.php"; $pages['icon-gallery'] = "sections/galleryContent.php"; $key = @ (!empty($subsection) && $section != 'interest') ? $section.'-'.$subsection : $section ; $page = @ $pages[$key]; return array('subsection' => $subsection, 'section' => $section, 'page' => $page); } ?> INDEX PAGE Code: [Select] <?php $baseurl = 'http://SomDomain.com/'; $baseinc = dirname(realpath(__FILE__)); include('dirty-hack.php'); $params = fudgePage(); $swf = (!empty($params['section'])) ? $params['section'].'.swf' : 'home.swf' ; $include = (!empty($params['page'])) ? $params['page'] : "sections/homeContent.php" ; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="<?php echo $baseurl ?>css/styles.css" type="text/css" media="all" charset="utf-8" /> <!--[if IE]> <link rel="stylesheet" href="<?php echo $baseurl ?>css/ie-styles.css" type="text/css" media="all" charset="utf-8" /> <![endif]--> <script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/prototype.js" charset="utf-8"></script> <script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/scriptaculous.js" charset="utf-8"></script> <script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/effects.js" charset="utf-8"></script> <script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/scripts.js" charset="utf-8"></script> <script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/fo.js" charset="utf-8"></script> <style type="text/css"> #slideshow { position: relative; width: 310px; height: 422px; } #slideshow div { position: absolute; left: 0; top: 0; } </style> <base href="<?php echo $baseinc ?>" /> </head> <body> <?php /*<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/slideshow.js" charset="utf-8"></script> <script type="text/javascript">new Slideshow('slideshow', 5000);</script> */ ?> <div id="top"> <div id="click-hack" style="float:left; position:absolute; top:250px; z-index:5; width:150px; height:75px; cursor:pointer;" onclick="window.location='<?php echo $baseurl ?>';"><img src="<?php echo $baseurl ?>images/blank.gif" height="75" width="150"></div> <div id="flash"> <div id="flashObject"> </div> <script type="text/javascript" language="javascript" charset="utf-8"> // <![CDATA[ var fo = new FlashObject("<?php echo $baseurl . $swf ?>", "ICONsite", "782", "325", "7", "#0f0f0f",wmode="transparent"); fo.addParam("menu", "false"); fo.addParam("scale", "exactfit"); fo.addParam("wmode", "transparent"); fo.addParam("quality", "high"); fo.addParam("allowScriptAccess", "sameDomain"); fo.write("flashObject"); // ]]> </script> </div> <iframe src="ticker/index.html" width="100%" height="34" frameborder="0" scrolling="no"></iframe> <div id="container"> <?php include($baseinc. $include); ?> </div> <div id="footer" class="clear"> <div id="footerAddress"> <a href="http://www.somedomain.com/" target="_blank"> <img src="images/footer.jpg" alt="" style="overflow: hidden;" /> </a> </div> </div> <div id="footer-nav" class="clear"> <!--img src="images/icon-sm.gif" alt="" /--> <br /> <ul> <li class="none"><a href="<?php echo $baseurl ?>">Home</a></li> <li class="none"><a href="<?php echo $baseurl ?>residential">Residential</a></li> <li class="none"><a href="<?php echo $baseurl ?>residential/virtual-tours">Virtual Tours</a></li> <li class="none"><a href="<?php echo $baseurl ?>residential/features">Features</a></li> <li class="none"><a href="<?php echo $baseurl ?>residential/floorplans">Floorplans</a></li> <li class="none"><a href="<?php echo $baseurl ?>residential/site-key-plan">Site Key Plan</a></li> <li class="none"><a href="<?php echo $baseurl ?>retail">Retail</a></li> <li class="none"><a href="<?php echo $baseurl ?>interest">Available Units</a></li> <li class="none"><a href="<?php echo $baseurl ?>location">Location</a></li> <li class="none"><a href="<?php echo $baseurl ?>contact">Contact</a></li> <li class="none"><a href="<?php echo $baseurl ?>news">News</a></li> <li class="none"><a href="<?php echo $baseurl ?>icon-gallery">Gallery</a></li> <li class="none"><a href="<?php echo $baseurl ?>privacypolicy.php" onclick="oWin('privacypolicy.php', '', '512', '380'); return false;">Privacy Policy</a></li> </ul> <br /> <br /> </div> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-1188345-10"); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> </html> Sorry if this isn't the right forum, I wasn't sure where to post this. Alright, so I have a high score submit script, and it goes as follows... This is the actionscript: Code: [Select] on (release) { var usco LoadVars = new LoadVars(); uscore.name = _root.suname; uscore.score = _root.suscore.stime; uscore.game = "alien"; uscore.mode = "survival"; uscore.sendAndLoad("linkhere", uscore, "POST"); play(); } Note: We have also tried: Code: [Select] on (release) { var usco LoadVars = new LoadVars(); uscore.name = _root.suname; uscore.score = _root.suscore.stime; uscore.game = "alien"; uscore.mode = "survival"; var uscoresubmit:LoadVars = new LoadVars(); uscore.sendAndLoad("linkhere", uscoresubmit, "POST"); play(); } The PHP is: <?PHP include('Connect.php'); $name=$_POST['name']; $name=mysql_real_escape_string($name); $score=$_POST['score']; $score=mysql_real_escape_string($score); $game=$_POST['game']; $game=mysql_real_escape_string($game); $mode=$_POST['mode']; $mode=mysql_real_escape_string($mode); if(!empty($game)) { mysql_query("INSERT INTO scores(game, name, score, mode) VALUES ('$game', '$name', '$score', '$mode')"); } ?> I have also tried running a number of things on the "else" of that if(!empty($game)) and nothing has pulled through, so I'm under the notion that it isn't loading the page in sendAndLoad()? It was working before, but it appears to have just stopped, we're not sure what we changed. Any help would be greatly appreciated! Thanks, Xyphon 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] Hi, I'm very new to PHP and i'm trying to delevop an app using flash as the front end via PHP and a mySQL database on my server/host. I currently have two php scripts that I am referencing. The first is used as a login and the second is used to retrieve table data. Both scripts work fine when tested in flash but when I upload the flash file to my server and test online the first (login) refuses to work. The php files are already uploaded to the server and the mySql database is created on my server. I was wondering if there was anything in the script that might be causing this. I can't see why and my brain is starting to degrade rapidly. Can someone have a quick look and tell me if there's something in this script that's preventing this from working online please? my flash variables a user and pass This is the login script that won't work online: <? //this pulls the variables from the flash movie when the user //hits submit. Use this when your global variables are off. //I don't know how to toggle global variables, so I just put //it in all the time ;) $user=$_POST['user']; $pass=$_POST['pass']; //connect to database mysql_pconnect("*****","********","******") or die ("didn't connect to mysql"); mysql_select_db("******") or die ("no database"); //make query $query = "SELECT * FROM jingle WHERE recipient = '$user' AND password = '$pass' "; $result = mysql_query( $query ) or die ("didn't query"); //see if there's an EXACT match $num = mysql_num_rows( $result ); if ($num >=1){ print "status=You're in&checklog=1"; } else { print "status=Sorry, but your user name and password did not match a user name/password combination in our database. Usernames and passwords are entered in from a different file. Thank you for visiting test login script!!&checklog=2"; } ?> and this is the script the does work online: <? /* Retrieves score data from highscores table and returns data and status to Flash errorcode: 0: successful select 1: can't connect to server 2: can't connect to database 3: can't run query */ // fill this in with the right data for your server/database config $server = "*****"; $username = "******"; $password = "******"; $database = "*******"; // get current user $user=$_GET['user']; $pass=$_GET['pass']; // mysql_connect: Open a connection to a MySQL Server // Returns a MySQL link identifier on success, or FALSE on failure. if (!mysql_connect($server, $username, $password)) { $r_string = '&errorcode=1&'; // mysql_select_db: Sets the current active database on the server that's associated // with the specified link identifier. Every subsequent call to mysql_query() // will be made on the active database. // Returns TRUE on success or FALSE on failure. } elseif (!mysql_select_db($database)) { $r_string = '&errorcode=2&'; // mysql_query: Sends a query (to the currently active database // For SELECT, SHOW, DESCRIBE or EXPLAIN statements, mysql_query() returns a // resource on success, or FALSE on error. // For other type of SQL statements, UPDATE, DELETE, DROP, etc, mysql_query() // returns TRUE on success or FALSE on error. } else { $qr = mysql_query("SELECT * from jingle WHERE recipient = '$user' AND password = '$pass'"); if (!qr || mysql_num_rows($qr)==0) { $r_string = '&errorcode=3&msg='.mysql_error().'&'; } else { $r_string = '&errorcode=0&n='.mysql_num_rows ($qr); $i = 0; while ($row = mysql_fetch_assoc ($qr)) { while (list ($key, $val) = each ($row)) { $r_string .= '&' . $key . $i . '=' . stripslashes($val); } $i++; } // add extra & to prevent returning extra chars at the end $r_string .='&'; } } echo $r_string; ?> Thanks in advance For some reason, I can get this file to play in the web browser, but I can not get it to play in my flash player. File: http://envne.com/music/play.php?id=23156 The file is a file that uses cURL, to load the song from the saved url. I am thinking that it is a cURL thing, because when displayed in my google browser, the load bar doesn't load on my page, but on the link below it does display I use other songs in the same flash player by just linking to a different id number and those songs play fine in the player. Why does this song do this, and others don't? File on the web: http://kickkicksnare.com/wp-content/uploads/2010/05/Like-a-G6-Ft.-The-Cataracs-Dev.mp3 The PHP: $ch = curl_init(); header('Content-Type: audio/mpeg'); curl_setopt($ch, CURLOPT_URL, $row['url']); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FRESH_CONNECT, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_exec($ch); header("Content-Transfer-Encoding: binary"); header("Content-Type: ".curl_getinfo($ch, CURLINFO_CONTENT_TYPE).""); header("Content-Length: ".curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD).""); curl_close($ch); Hey Guys! I have a website in flash where some users can upload a jpg, jpeg image to my server and then approved or denied... The image is resized to 1000 x 1000 max (if its higher than those numbers) I am afraid that my script doesnt have any kind of protection to hacks like "virus.php.jpg" or any other type of attacks due to the lack of knowledge I have on this subject. I am a little bit lost as to what I could do to prevent some of these attacks... I would really appreciate some feedback and or basic lines of prevention code to prevent at least some basic attacks Heres my php code for the image upload: Code: [Select] // Set local PHP vars from the POST vars sent from flash $Name = $_POST['Name']; $itemNumber = $_POST['imageType']; $filename = $_FILES['Filedata']['name']; $filetmpname = $_FILES['Filedata']['tmp_name']; $fileType = $_FILES["Filedata"]["type"]; $fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000); list($filename, $extension) = explode('.', basename($_FILES['Filedata']['name'])); $filename = $Name; $target = $filename . $itemNumber . "." . $extension; // Place file on server, into the images folder move_uploaded_file($_FILES['Filedata']['tmp_name'], "../Winner_Images/".$target); ini_set("memory_limit","30M"); $source_pic = "../Winner_Images/".$target; $destination_pic = "../Winner_Images/".$target; $max_width = 1000; $max_height = 1000; $src = imagecreatefromjpeg($source_pic); list($width,$height)=getimagesize($source_pic); $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ){ $tn_width = $width; $tn_height = $height; }elseif (($x_ratio * $height) < $max_height){ $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; }else{ $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $tmp=imagecreatetruecolor($tn_width,$tn_height); imagecopyresampled($tmp,$src,0,0,0,0,$tn_width, $tn_height,$width,$height); imagejpeg($tmp,$destination_pic,100); imagedestroy($src); imagedestroy($tmp); Thanks a lot in advance!! Cheers! I have got a flash file that is stored in the database. So I fetch it and put it in a variable then put the variable in the flash embed code where the src is but the flash comes up blank. $file = "SELECT * FROM table WHERE column='$name'"; $file2 = mysql_query($sqlfile); $file3 = @mysql_fetch_assoc($file2); $file4 = $file3['gamefile']; //skip some code to html embed section <object width='550' height='400'> <param name='movie' value='valuename'> <embed src='$file4' width='550' height='400'> </embed> </object> then the page comes up with a white box which when you hover over it says 'file not loaded'. In attachment is the code I generated from Flex Builder: My issue is that the UTF8 (coding of the MySQL database) isn't correctly interpreted, the solution is to use : $stmt = mysqli_prepare($this->connection, "SET NAMES UTF8;"); But I don't know how to enter it in this syntax? It is I think the: $stmt = mysqli_prepare($this->connection, "SELECT * from $this->tablename"); that has to be modified, but how? Really searching a long time on the correct syntax, but without any result... Please help, thanks a lot Wimmerke This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=326310.0 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 Other. http://www.phpfreaks.com/forums/index.php?topic=307175.0 Could someone help me crack this issue. I am trying to insert a variable into an flash object echo string's src. I've try many variations but can't figure it out. Below is the code. cheers ray <?php $var = 'map.swf'; echo ' <OBJECT ID="map" CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash2/cabs/swflash.cab#version=2,0,0,0" WIDTH="50%" HEIGHT="50%"> <PARAM NAME="Movie" VALUE="map.swf"> <PARAM NAME="Play" VALUE="false"> <PARAM NAME="Quality" VALUE="best"> <PARAM NAME="swLiveConnect" VALUE="true"> <PARAM NAME="loop" VALUE="false"> <EMBED NAME="slav" SRC=" map.swf " swLiveConnect="true" WIDTH="50%" HEIGHT="50%" mayscript="mayscript" quality="best" play="false" LOOP="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash2"> </EMBED> </OBJECT>'; echo "<br/>"; echo $var; echo "<br/>"; ?> Goal <?php $var = 'map.swf'; echo ' <OBJECT ID="map" CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash2/cabs/swflash.cab#version=2,0,0,0" WIDTH="50%" HEIGHT="50%"> <PARAM NAME="Movie" VALUE=" $var "> <PARAM NAME="Play" VALUE="false"> <PARAM NAME="Quality" VALUE="best"> <PARAM NAME="swLiveConnect" VALUE="true"> <PARAM NAME="loop" VALUE="false"> <EMBED NAME="slav" SRC=" $var " swLiveConnect="true" WIDTH="50%" HEIGHT="50%" mayscript="mayscript" quality="best" play="false" LOOP="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash2"> </EMBED> </OBJECT>'; ?> |