Hello guys
*Note: this is a php question not MySQL question, please do not move it to mysql section! Thank you.
anyway, I have a record from the database as 2009-12-31 23:59:59
I needed to when ever I pull that record, I need to change it to mktime() format, so I can do so many things with it.
I tried to change it through preg_replace!
$str = "2009-10-13 11:30:15"; // an example only of the format data pulled from the DB!
$pat = '/(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})/';
$replace = 'mktime(4 ,5 ,6 ,2 ,3 ,1)';
echo preg_replace($pat, $replace, $str); // which give me the exact string of mktime(#,#,#,#,#,#)!
Please help me out!
Thank
problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections and have an admin side view for the enquiry ?
Legal Issues for SAP ERP o ERP in general
Hi experts,
Developing Ajax-enabled ASP.Net applications for the iPhone
I would like to develop Ajax web applications using Visual Studio that are optimized for the iPhone. There are a few resources on the web showing how this can be done. However, these tend to be
True way to see if action was successful?
If this is a good way to see if action was successful to continue:Code: function changeGameState($GameId) { mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'");
cookie problem
I hv a website url In this site main menu functionality based on cookie when user click on particular menu the visited menu change its color and cookie is created for that menu and when user click on
form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the form i get this..test.php?search=example&submit=searchhow do i get all of this together in the
What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is going wrong. It's a set of filters for events. The filter marked "type" (category) works
Stopping page post back
I have few literal contriols in my page and a repeater too. But inspite of using update panel, postback is occuring in my page. Can you please suggest something that prevents my page from being
Reditecting pages based on logic
Newbie here, apologies in advance!I am trying to use the header function to forward one of any number of locations (taken from a db) based on the value of a response param:Quote<?php include
Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not have any trouble logging into forums such at these, so not sure why this is not working.first the