Jump to content

M.O.S. Studios

Members
  • Posts

    300
  • Joined

  • Last visited

Everything posted by M.O.S. Studios

  1. I have to put data into multiple tables in a MYSql database. I would like to know if there is a php function (or class) that does a batch query; and only adds the data only if every query is successful. the only thing i can think of is adding a custom function that does each query one at a time, and undoes them if a problem is found. thanks in advance
  2. I want to be able to convert numbers to their letter equivalent. However I need it to go past 26 values. here is the code function letters($value){ if(!is_integer($value) && $value > 0){return false;} if($value < 26){return base_convert($value+10, 10, 36);}else{ $tester = $value / 25; $tester = explode('.', $tester); return base_convert($tester[0]+9, 10, 36).letters($value*($tester[0]) - 26); } } echo $welcome."\n".$questions; for($i=0; $i<= 200; $i++){ echo letters($i).$i."<br>"; } the problem happens after value 49. any ideas?
  3. thanks
  4. I made this function, now it appears when ever i do a "for ... in". How do I attach it to the array object with out attaching it to all the instances Array.prototype.leap = function(){ var y = this; y.shift(); return y; }
  5. You dont sound snoody, i actually knew it wasn't ajax. and i feel like a total noob now!! oh well.. I'll make the suggested change and report back
  6. made a cool effect for menu items. your menu item background color rises and lowers when your cursor goes over the menu item. This code works well but messes up with over use. any ideas? Here is my code ajax $(document).ready(function(){ $('.menu_item').bind('mouseenter', function(){ var ele = $(this).children('.bg'); var eleHeight = ele.css('minHeight'); ele.animate({"height": "100%"}, "slow"); ele.bind('mouseleave', function(){ ele.animate({"height": eleHeight}, "slow"); }); }); }); html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" > <html> <head> <link rel="stylesheet" href="main.css" type="text/css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript" src="jquery.js"></script> </head> <body> <div class='body'> <div class='header'> <div class='menu_item'><div class='bg'> </div><div class='text'>Home</div></div> <div class='menu_item'><div class='bg'> </div><div class='text'>Jewelery</div></div> <div class='menu_item'><div class='bg'> </div><div class='text'>Decore</div></div> <div class='menu_item'><div class='bg'> </div><div class='text'>Find us</div></div> </div> <div class='content'> </div> <div class='footer'> <div class='foot_item'><div class='bg'> </div><div class='text'>Contact</div></div> <div class='foot_item'><div class='bg'> </div><div class='text'>Twiter</div></div> <div class='foot_item'><div class='bg'> </div><div class='text'>Etsy</div></div> </div> </div> </body> </html>
  7. At the moment I have been uploading files to my server using <input type='files'> and binary encrytion. I would like to have more controll over the files tmp_name. is there a way to assing it befor hand?
  8. I know how to do document.write() I have html files that i want to scan, so for example <html lang="en"> <head>* <title><!-- Insert your title here --></title> </head> <body> <?php echo md5($_POST['str'], $_POST['sixteenbit']); ?> <br> <?= strlen(md5($_POST['str'], $_POST['sixteenbit'])); ?> <form method='post'> <input type='text' name='str' value='<?= $_POST['str']; ?>'> <input value='true' name='sixteenbit' type='checkbox'> <input type='submit'> </form> <!-- Insert your content here --> </body> </html> the result I want is 23 (located with a star)
  9. I have loaded an external html file into a var using fopen() and fread(). I'm trying to get a value that relates the the character after the <head> tag. I'm trying to compensate for any white space or attributes that might be added to it. I'm also trying to avoid a false result from any JavaScript that might be in the file. as of right now im using $template = fopen($template_dir, 'r'); $template = fread($template, filesize($template_dir)); $head_pos = stripos($template, '>', stripos($template, 'head', stripos($template, 'html', stripos($template, '<'))))+1 I'm sure there is a more effective way to do this possibly with regex. any ideas. thanks in advance
  10. is there any way to preload quicktime media before the user decides to view it. i know for images i can do this: var images = new Image; images.src = 'location.gif'; can you do that for other media as well??
×
×
  • 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.