Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. where does it send you? (PS HATE to see single quotes for attribute values in markup us " instead please )
  2. you should NOT use embed tags - they are deprecated.... in order to get this working cross browser you need to use the feature where a browser will display what is in side an abject if that plugin cannot be loaded... in the case of flash use this... <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"> <param name="movie" value="/path/to/flash/file.swf" /> <param name="bgcolor" value="#ffffff" /> <param name="flashvars" value="xmlPath=/path/to/xml/file.xml" /> <param name="allowscriptaccess" value="always" /> <param name="wmode" value="opaque" /> <!-- use if you want to overlay elements on top of flash --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="/path/to/flash/fle.swf" width="100%" height="100%"> <param name="bgcolor" value="#ffffff" /> <param name="flashvars" value="xmlPath=/path/to/xml/file.xml" /> <param name="allowscriptaccess" value="always" /> <param name="wmode" value="opaque" /> <!--<![endif]--> <p>You need to flash installed to view this content.</p> <p><a href="http://get.adobe.com/flashplayer/">Download Flash Plugin</a></p> <!-- you could put a whole load of markup in here which would be rendered if flash is not available --> <!--[if !IE]>--> </object> <!--<![endif]--> </object>
  3. http://www.drunkenfist.com/304/2007/07/09/cross-browser-opacity-using-css-and-internet-explorer-custom-filters/
  4. <?php switch(true) { case $temp < 10: $temperature_color = 'green'; $opacity = $temp*10; break; case $temp < 20: $temperature_color = 'yellow'; $opacity = $temp*5; break; case $temp < 30: $temperature_color = 'orange'; $opacity = $temp*3.3; break; default: $temperature_color = 'red'; $opacity = $temp*2.5; } ?>
  5. sessions default to timeout after 20 mins normally. You should NOT use them for storing data that you require to have longevity - its the client side cookie you need to use for that purpose.
  6. you don't. Database engine errors are that - you have to capture that error and output your own message.
  7. err not that clear a description... why not stick the whole thing into an array so you can use it later on. return will break out of a function or stop the current script working - which makes me believe the code you are using is a bit gash.
  8. http://www.zend.com/code/codex.php?ozid=449&single=1 bit more complex for the noob but that code goes an interrogates the server the email box is held and asks it if it would accept an email to that address. Many have catch alls so it could be that the actual email doesn't exist but it will be sent somewhere. what It WILL give you is if the response from that server says the address soesn't exists then it definitely doesn't exist. come back with any questions if you need to. enjoy
  9. $_SERVER['DOCUMENT_ROOT'] does have the trainling slash on some installations and not on others - which is why you have to check. just run this and see what you get $path = "../../static/gallery/products/" . $_GET['id'] . DIRECTORY_SEPARATOR; echo $path; $this->uploadLocation = $path;
  10. $pageid = stripslashes($_SERVER['PHP_SELF']); $pattern = '/\//'; $newpageid = preg_replace($pattern,'', $pageid);
  11. $this->uploadLocation = "../../static/gallery/products/" . $_GET['id']; personally I prefer to fully qualify the paths when dealing with files in php. $this->uploadLocation = $_SERVER['DOCUMENT_ROOT'] . "static/gallery/products/" . $_GET['id']; May well help you make this more flexible - depends on requirements of course (need to check if that super global has the trailing slash btw!)
  12. whats the field type in teh database? try removing the content-disposition header - just to see what happens... prop drop the exit too!!!
  13. the script to show your image should echo nothing more than that field from the database and set the headers... this should give you the pointers http://www.phpriot.com/articles/images-in-mysql/8 - note that the script uses id's to grab the data rather than the filename itself.
  14. can't see any missing parenthesis but this line for ($i = $lenght ; $i > -1; $i-- ) { // this is the line that parse error refers to should be for ($i = $lenght-1 ; $i = 0 ; $i-- ) { // this is the line that parse error refers to initialize the array before using - that may help... $valueArray=array(); for ($i = $lenght-1 ; $i = 0 ; $i-- ) { // this is the line that parse error refers to
  15. $valueArray = array( '$IdetificatorArray[$i]' => '(int)$NumberInStringFormat($i)' ); should be $valueArray = array( $IdetificatorArray[$i] => $NumberInStringFormat{$i} );
  16. <?php $m = isset($_GET['m']) ? $_GET['m'] : NULL; switch($m) { case 'Free CSS Templates': $link = "http://www.templateworld.com/3091.html"; break; case 'Premium Flash Templates': $link = "http://store.templatemonster.com/?aff=simco"; break; // as many other cases as you need default: $link = "http://www.templateresources.com"; } header('Location: ' . $link); exit; ?>
  17. I've not heard that either - normally you'd nned to use something like geoip
  18. if you are reaching the size limit perhaps you should ask yourself where the hell is this app going all recursive on me
  19. if you are going to insert a specific term that is going to be replaced the we can just use the str_replace function - more effiecient as it doesn't have to do all the funky regex work. It will still need you to define the company name for each site and that would best be done as I suggested earlier - by defining a constant for each site (in this example I'll stick to the COMP_NAME). <?php echo "<span class='itemdetails2'><br /><br />".str_replace('COMPANYNAMEHERE',COMP_NAME,stripslashes($row[story]))."</span><br /><br /></td></tr>"; ?> That should accomplish all you need...
  20. personally I would define the company name in each project.. define('COMP_NAME', 'XYZ Company'); so you will have one in each site. Afte that its a case of deciding which ones you wish to replace using something like: <?php ... $str = preg_replace('/we/i',COMP_NAME,$str); ... ?> Your problem is decerning which occurences are to be replaced...
  21. yeah - the answer has already been touched on in the thread. you need to make sure that you are passing values to the script are in array format; this means those fields must have [] in the name attribute name="inputname[]". Do that for each row - check that you are getting suitable results by using print_r($_POST). Once the all the data (not just the last row in your table) is present in the post array you can then start looking at processing the results.
  22. this can be intensive especially on large arrays... the functions to compare strings you will be interested are: http://uk3.php.net/manual/en/function.levenshtein.php and http://uk3.php.net/manual/en/function.similar-text.php if you needed to compare each string against every other string in your array then you would need to build the appropriate loop; something like <?php $strings = array("i am a string", "i am a zebra","i am not a string","i am a wildebeast","i am a thread","i am a matrix"); $string_no = count($strings); $compare = array(); for($i=0; $i<$string_no; $i++) { if ($i == ($string_no-1)) break; for($k=$i+1; $k<$string_no;$k++) { $compare['strings'][] = $i . ' - ' . $k; $compare['likeness'][] = levenshtein($strings[$i],$strings[$k]); } } print_r($compare); ?>
  23. what if javascript is turned off? should always validate server-side - use javascript validation to improve the user experience by not having them submit a whol erequest just to get some errors back.
  24. Wie geht's? the query in toonberichten.php... SELECT naam, bericht, datum FROM gastenboek ORDER BY datum DESC run that query in your db admin (phpmyadmin???) and see what results are delivered... if you don't need the enumerated array of results just use mysql_fetch_assoc() let us know how you get on. viel gluck
  25. mkdir(), fopen file_put_contents() are your friends...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.