voip03
Members-
Posts
693 -
Joined
-
Last visited
Everything posted by voip03
-
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"; }
-
Do you want the code or guidance
-
<?php echo 'Current time: '.date('h:i:s').'<br>'; //current time echo 'In 10 Minutes:'.date('h:i:s',strtotime('+10 minutes')); //future time ?>
-
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
-
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; }
-
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 */ }
-
Removing specific characters from array elements
voip03 replied to mattspriggs28's topic in PHP Coding Help
str_replace OR preg_replace http://php.net/manual/en/function.str-replace.php -
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!
-
You can try this way also $query = "INSERT INTO table (Id, Name, Number) VALUES ('" . 1 ."','" . $name ."','" . $number ."')";
-
Changing duration in seconds to hours and minutes
voip03 replied to etrader's topic in PHP Coding Help
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 -
http://www.tanzilo.com/2008/11/09/php-pass-all-post-and-get-variables-in-array-in-function-parameter/
-
onclick change value OR you can use jquery
-
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
-
sprintf http://php.net/manual/en/function.sprintf.php echo "£".sprintf('%.2f',$results['ounce_price']);
-
check this link http://stackoverflow.com/questions/5021557/mysql-php-insert-into-multiple-tables-in-database
-
Having a problem with my first PHP script
voip03 replied to Freedom-n-Democrazy's topic in PHP Coding Help
Mark it solved -
Having a problem with my first PHP script
voip03 replied to Freedom-n-Democrazy's topic in PHP Coding Help
I am sorry nilansanjaya. And your code is working fine. -
Having a problem with my first PHP script
voip03 replied to Freedom-n-Democrazy's topic in PHP Coding Help
Variable $link is empty please update the code $link = "INSERT INTO newsletters(mens) VALUES('$email')"; -
Having a problem with my first PHP script
voip03 replied to Freedom-n-Democrazy's topic in PHP Coding Help
Try to learn Switch() -
Having a problem with my first PHP script
voip03 replied to Freedom-n-Democrazy's topic in PHP Coding Help
Remove ; ;} -
preg_replace http://www.php.net/manual/en/function.preg-replace.php
-
Remove the single quotation mark $banned=1; ` $message="You have banished ";
-
SELECT * FROM `DB_table` WHERE date BETWEEN '2011-09-01' AND '2011-09-10' There are tons of examples if you search Google.