Jump to content

kevin7

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kevin7's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi all, I have been messing up with timezone lately. I solved most of the problems in PHP side, but I have a small issue with mySQL. I store created date in timestamp format using this php function: $date = explode('-', '11-01-2010'); $start_date = gmmktime(0, 0, 0, $date[1], $date[0], $date[2]); //then i store it into a column called start_time, varchar 255 and then, I retrieve it using this mySQL command: select * from event where active=1 and date_format(from_unixtime(start_time), "%d-%m-%Y")='11-01-2010'; but apparently, mySQL convert the date to 12-01-2010, not 11-01-2010.. it's the timezone problem. Normally, I would use for-loop, loop through the array and convert the timestamp stored in database using gmdate() function with php. But in this case, I have to do it with mySQL command. Does mySQL have gmdate() equivalent function? Many Thanks!
  2. I'm suck at foreach with multidimension array, I have this array structure: $item = array( 'chicken' => array('description' => 'a chick', 'quantity' => '5kg'), 'tomatoes' => array('description' => 'a tomato', 'quantity' => '0.5kg') ); and I will the output looks like this, it list out the item name only in a ul list - chicken - tomatoes this is the code i was using, it display "array" foreach ($item as $value => $key) { echo '<li><a href="#">' . $item[$value] . '</a></li>'; } } hmm, what went wrong? Thanks heaps
  3. I want to list all my files in a directory that has this pattern: profile-create, profile-post, navigation-list, or access-list-create all of them will have a hyphen in between two words this is the one im developing, but it isnt working. $files = scandir($basePath); foreach($files as $key => $value){ if (preg_match("/^[a-z]*[\-][a-z]*$/", $value)) echo $value . '<br/>'; } can anyone provide me a correct expression? thanks.
  4. substr function? http://au.php.net/strings
  5. hello all, i know there is a way to do this, something like pop up a message "Bye, see you around" after the user close the window or click to navigate other pages... what is the javascript event we use for that one? thanks.
  6. opening socket to get the mail is my alternative... really couldnt find any solution.. sigh... well... search hard...
  7. hmmm... another concern... any quick and dirty way?
  8. Hi, I have done some research on looking for a solution to detect bounced email. first of all, safe_mode for php must be OFF in order to use returnPath in mail() function. And this would be the first obstacle since most of the web servers have it ON. Anyway, my concept of detecting a bounce email is, set returnPath, and then write a php script to receive mail from the returnPath, and search for email title that matches "Undelivered Mail Returned to Sender", after that, process the content of the email, and should able to find the invalid email address and reason of undelivered. my concept... in my own opinion, feasible but impractical, is that anyway to detect bounced email? correct me if i am wrong. thanks!
  9. Hi! I have a question, I saw from a tutorial, but i couldnt understand this, what's the difference with the following: mysql_query(some_query_string) @mysql_query(some_query_string) what does the alias mean? and, i saw some of the functions in a class have something like this function getPageNav($queryvars = '') why do they assign $queryvars to nothing? in what situation we need to do this? thanks!
  10. hi saint959... yes it did, you need to get inside the cart... if two same products were added, it will show only 1... but if two different products were added, it will show 2... haha, but yea, it can be configured to ur way...
  11. Hi GuiltyGear... yea, i know... I dont have IE 7 installed... my computer is too lousy... I know I can do a lot of things to enhance it... this is just my own experiment, if I really published it online for business purpose, I will make sure it looks good in all the browsers not only IE... so don't worry, and thx dude..
  12. good critiques, I will work on it for my future project! I'm mastering CSS tableless coding now. Regarding to that Power Button... hehe, not good in graphic design hey? If you observe it deeply, it's actually a G rotated 90 degree anti-clockwise! So, I suppose to make a G in that sphere, and then.. yea why not make it look like a powerbutton instead.. haha... sorry if it made you puke... thank for all the critiques and compliments!
  13. I have just finished this, for my own research... It's a PHP Object-Oriented Shopping Cart + AJAX (partially) I used LyteBox (Good Stuff!), MySQL, PHP and CSS Tableless Coding! You can click on pictures, and the cart will update itself. It has a great potential to expand into bigger and complicated system. I did this with Mozilla, it doesnt look good in IE and I don't even bother to fix it. So, check it with Mozilla. http://www.roxes.net/oocart/ Please comment. Thanks
  14. I want to ask, what kind of solution I have for the payment part of a shopping cart system? How customer make the payment? I do some search online, some of the people using Paypal, can anyone of you tell me the most common used method? thanks!
×
×
  • 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.