jitesh
Members-
Posts
807 -
Joined
-
Last visited
Everything posted by jitesh
-
How do i use php code to do $date - $singup_date
jitesh replied to lkh11lkh's topic in PHP Coding Help
$var = 90; // mins $str = floor($var/60)." hours ".($var%60)." mins"; -
check DATE_ADD and INTERVAL in Mysql
-
profiltekst, alder, `by` , mandag, tirsdag, use back tick (`) for database name, table name and field name
-
Onsubmit event disable textboxes which you do not want to submit using JS. Disabled fields never posted. Like function onevent(){ document.getElementById('textbox1').disabled = true; }
-
Yes session_start() creates a session or resumes the current one based on the current session id that's being passed via a request, such as GET, POST, or a cookie.
-
function print($print) { print $print . "<br>"; }
-
[SOLVED] multiple SELECTs put into one database field
jitesh replied to dolcezza's topic in PHP Coding Help
SELECT * FROM `authors` WHERE `authorlast`IN ('{$_POST['authorlast1']}','{$_POST['authorlast2']}','{$_POST['authorlast3']}'); -
Something like this <?php $associative_array = array(); $associative_array['a0'] = array( 4, 2, 3, 4 ); $associative_array['a1'] = array( 1, 2, 3, 1 ); $associative_array['a2'] = array( 4, 3, 4, 4 ); $associative_array['a3'] = array( 2, 3, 1, 1 ); $new_array = array(); for($i=0;$i<count($associative_array);$i++){ $new_array = array_merge($new_array,$associative_array['a'.$i]); } sort($new_array); for($i=0;$i<count($new_array);$i++){ echo $new_array[$i]." "; } ?>
-
Can't you take a associative array ? Then its a way to make it easy.
-
Check mime content type for a file. string mime_content_type ( string filename )
-
Throught AJAX you can post data. Just review the example http://www.phpbuilder.com/columns/jon_campbell20070730.php3
-
Are you connecting to DB properly ? May may be you are getting die with and printed string "my sql error". This is just assumption.
-
page posted automatically when back button is clicked
jitesh replied to shane07's topic in PHP Coding Help
Follow this flow of coding. (1) Login.php file // Fill up login information (2) intermediate_action.php // Here keep an intermediate action file which contains database operations , Login check , Set of session variables etc... (3) After step 2 redirect to other page like as user_account.php etc. Check the above way. -
strtotime does not understand your "date type" given as input.
-
<?php $sql = "INSERT INTO outcomes( outcomeID, jobID, theOutCome, outcomeDate, outcomeTime, userID ) VALUES ( '','".$jobCallID."','".nl2br($outcomeString)."','".$callDate."','".$callTime."','.".$UsID."')"; ?>
-
In php.ini change maximum_execution_time (0 for unlimited). Restart webserver and check.
-
When you are saving data into db you need to use this function. INSERT INTO `table` (`id`,`info`) VALUES (1, nl2br(' ...... ')); nl2br is a PHP function.
-
Temporary mention "set_time_limit(0);" in first line of the code and check.
-
http://www.phpfreaks.com/forums/index.php/topic,174937.msg774153.html
-
nl2br();
-
$minimum_count = 0; $maximum_count = 0; $spread = 0; if (count($tags)) { $minimum_count = min(array_values($tags)); $maximum_count = max(array_values($tags)); $spread = $maximum_count - $minimum_count; }
-
Rename the myTruncate with something else Like : function myTruncate_($string, $limit, $break=".", $pad="..."){ ......... ......... } $short_omschrijving = myTruncate_($omschrijving, 300, " ");
-
Before using array its a good habit to define a variable as an ARRAY Example : function tag_info() { $result = mysql_query("SELECT * FROM tags GROUP BY tag ORDER BY count DESC"); $arr = array(); while($row = mysql_fetch_array($result)) { $arr[$row['tag']] = $row['count']; } ksort($arr); return $arr; }
-
<?php echo "<TABLE BORDER=\"1"\ WIDTH=\"988"\ > <TD> <TABLE BORDER=\"1"\ RULES=\"rows"\ WIDTH=\"190px"\ ALIGN=\"center"\ > <TR> <TD CLASS=\"theadings"\ ><CENTER><B>General</B></CENTER></TD> </TR> ............................................... ........................................................ ........................................................ ?>