PravinS
-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Posts posted by PravinS
-
-
Use combination of STR_TO_DATE(), DAY(), MONTH() and YEAR() functions in MYSQL.
-
Try
SELECT * FROM tblname WHERE STR_TO_DATE(expiry, '%d/%m/%Y') <= DATE(NOW());
-
You can use MYSQL STR_TO_DATE() function to convert your date in DATE format and then you can compare it will current date.
-
Use below given tag for textarea
<textarea name="area" cols="50" rows="3"><?=$value?></textarea>
-
Give array name to checkbox like name="topic[]" and assign some value to it. When form is posted you will get checked values in array format.
-
Use session_unregister() instead of session_destroy(). As session_destroy() will destroy all your sessions, while session_unregister() will only destroy the mentioned variable from session.
-
Just remove "echo' from your code
-
You want to insert new record or want to update existing record. If you want to enter new record then you need to write INSERT query instead of UPDATE query.
-
Try like this for loop
$column2 = $_POST['column2_id']; for ($i=0;$i<count($column2);$i++) { echo $column2[$i]; }
-
Try PHP nl2br() function
-
Try this
UNIX_TIMESTAMP(NOW());
-
-
Ex.
SELECT * FROM test_table WHERE field1_index = '1' OR field2_index = '1' OR field3_index = '1'
-
It depends on your requirement. Also there is aurthorize.net, cybersource, 2checkout etc payment getway.
-
Try this
<?php $str .= '<?php'; $str .= ' $con = mysql_connect("localhost","forum","password");'; $str .= ' mysql_close($con);'; $str .= '?>' ; echo $str; ?>
-
User strtoupper() function in PHP
-
You have not called any of the defined functions and your functions does not return any value.
-
Try htmlspecialchars_decode() function
-
As while retrieving categories you will have a loop which will display categories. Now in that loop fetch the articles related to the category id and display below it.
-
-
You can use simple for loops for it.
For Day
for($d=1;$d<=31;$d++) { // option tag with value and text as $d }
For Month
for($m=1;$m<=12;$m++) { // option tag with value and text as $m }
Form Year
for($y=date("Y")-90;$y<=date("Y");$y++) { // option tag with value and text as $y }
-
According to your coding there is only way to pass PAGE_TITLE variable in page_header() function.
-
There is space between $min and $timetype
try this
<?php echo $hr.':'.$min." ".$timetype; ?>
-
Use like this
<select size="1" name="cat_show" id="cat_show"> <option value="1" <?php if($e['cat_show'] == 1) echo " selected ";?>>Yes</option> <option value="2" <?php if($e['cat_show'] == 0) echo " selected ";?>>No</option> </select>
Dynamically adding dimensions to an array using for loop
in PHP Coding Help
Posted
You have used explode() function, it will require delimiter character, as first parameter in function.