Jump to content

voip03

Members
  • Posts

    693
  • Joined

  • Last visited

Everything posted by voip03

  1. add this code when you send the mail 1st time $_SESSION['sent_time'] =date('h:i:s'); For checking $currentTime = date('h:i:s'); if( $currentTime > $_SESSION['sent_time'] ) { echo "'Send New mail'"; } else{echo "Wait for 10 minutes"; }
  2. <?php echo 'Current time: '.date('h:i:s').'<br>'; //current time echo 'In 10 Minutes:'.date('h:i:s',strtotime('+10 minutes')); //future time ?>
  3. EXAMPLE <?php // The file $filename = 'test.jpg'; $percent = 0.5; // Content type header('Content-Type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p, null, 100); ?> http://php.net/manual/en/function.imagecopyresampled.php
  4. Target IE versions without hacks using HTML and CSS If you don't want hacks in your CSS. Add a browser-unique class to the <html> element so you can select based on browser later. In CSS .ie6 body { border:1px solid red; } .ie7 body { border:1px solid blue; }
  5. Target IE versions with CSS "Hacks" More to your point, here are the hacks that let you target IE versions. Use “\9" to target IE8 and below Use “*" to target IE7 and below Use “_" to target IE6. body { border:1px solid red; /* standard */ border:1px solid blue\9; /* IE8 and below */ *border:1px solid orange; /* IE7 and below */ _border:1px solid blue; /* IE6 */ }
  6. str_replace OR preg_replace http://php.net/manual/en/function.str-replace.php
  7. Make sure you exit after a PHP Header Location Without the exit; after the Header Location call, execution will continue down the page. Make sure you call exit after a PHP Header call to Location if you want execution to branch immediately!
  8. You can try this way also $query = "INSERT INTO table (Id, Name, Number) VALUES ('" . 1 ."','" . $name ."','" . $number ."')";
  9. Conditional Statements Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this. In PHP we have the following conditional statements: •if statement - use this statement to execute some code only if a specified condition is true •if...else statement - use this statement to execute some code if a condition is true and another code if the condition is false •if...elseif....else statement - use this statement to select one of several blocks of code to be executed •switch statement - use this statement to select one of many blocks of code to be executed
  10. http://www.tanzilo.com/2008/11/09/php-pass-all-post-and-get-variables-in-array-in-function-parameter/
  11. onclick change value OR you can use jquery
  12. For security purposes, check all variables when they come in, any user can change the GET string and give out of range or erroneous data
  13. Remove Extra " mail("$_SESSION['SESS_EMAIL']", "Teste - Enviar Emails", "Olá, ".$_SESSION['SESS_NAME']."\n\nTeste - Enviar Emails, "From Teste"); after removing mail("$_SESSION['SESS_EMAIL']", "Teste - Enviar Emails", "Olá, ".$_SESSION['SESS_NAME']."\n\nTeste - Enviar Emails,From Teste");
  14. sprintf http://php.net/manual/en/function.sprintf.php echo "£".sprintf('%.2f',$results['ounce_price']);
  15. check this link http://stackoverflow.com/questions/5021557/mysql-php-insert-into-multiple-tables-in-database
  16. I am sorry nilansanjaya. And your code is working fine.
  17. Variable $link is empty please update the code $link = "INSERT INTO newsletters(mens) VALUES('$email')";
  18. preg_replace http://www.php.net/manual/en/function.preg-replace.php
  19. Remove the single quotation mark $banned=1; ` $message="You have banished ";
  20. SELECT * FROM `DB_table` WHERE date BETWEEN '2011-09-01' AND '2011-09-10' There are tons of examples if you search Google.
×
×
  • 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.