Jump to content

mvosoughi

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mvosoughi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=388674:date=Jun 28 2006, 12:37 AM:name=Travis Estill)--][div class=\'quotetop\']QUOTE(Travis Estill @ Jun 28 2006, 12:37 AM) [snapback]388674[/snapback][/div][div class=\'quotemain\'][!--quotec--] Oh, I see. Use strtotime() like this: [code]// Example date $date = "2006-06-04"; $time = strtotime($date); $old = time() - 15778463; /* 6 months ago */ if ($time <= $old)   {   // Date is at least 6 months old   } else if ($time > $old)   {   // Date is less than 6 months old   }[/code] [/quote] Thanks guys.. worked alright ... cheers
  2. [!--quoteo(post=388683:date=Jun 28 2006, 01:16 AM:name=dptr1988)--][div class=\'quotetop\']QUOTE(dptr1988 @ Jun 28 2006, 01:16 AM) [snapback]388683[/snapback][/div][div class=\'quotemain\'][!--quotec--] The word "Urgent" in your subject line probably won't help you get help faster. Read [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=6264\" target=\"_blank\"]PHP Freaks Posting Guidelines[/a] for details. [/quote] dptr1988: you are right, I should have read the guidline. Thank for mentioning that. BTW: Problem is solved.
  3. I need to compare dates. But this way: I get a date from database. (yyyy-mm-dd format) I need to understand if this date is newer then "6 months" or not. What I need is get the current date, calculate the date 6 months ago, compare "the date from DB" & "the date 6 months ago from now" show the result. How will I do that please?
  4. I have a database and I need to retrive date for last 6 months from today's date. Basically it is a 6 months rollover. I tried to subtract old date from today's date but I was unsuccessful. Any ideas? thanks..
  5. Thank you, problem is solved. I wasn't retrieving the data currectly.
  6. AndyB, thank you for the reply. You were right, I wasn't retrieving the data ($_POST) currectly. It is working now. Thank you.
  7. Hello all, I'm using the following code within the <form></form> tags to pass the variables to the next page: <?php foreach($_POST as $key=>$value){ if ($key!="submit"){ $value=htmlentities(stripslashes(strip_tags($value))); echo "\t<input type=\"hidden\" name=\"$key\" value=\"$value\">\n"; } } ?> It does work on my localhost but when I load the script to the webserver, which already supports php and I have many php codes running with no problem, it will not pass the variables to the next page. Is there anything that I'm missing? Thank you.
  8. Hello all, I'm using the following code within the <form></form> tags to pass the variables to the next page: <?php foreach($_POST as $key=>$value){ if ($key!="submit"){ $value=htmlentities(stripslashes(strip_tags($value))); echo "\t<input type=\"hidden\" name=\"$key\" value=\"$value\">\n"; } } ?> It does work on my localhost but when I load the script to the webserver, which already supports php and I have many php codes running with no problem, it will not pass the variables to the next page. Is there anything that I'm missing? Thank you.
  9. Dear all, I was told to connect to .NET web service and I would like to use PHP for that purpose. The information given to me is as folllow: www.xxxxxxx/Service1.asmx and a password of : 123456 Can anyone please help me with this problem?
  10. Than you Toni_montana and ToonMariner, You both were right. That acutally solved the problem. Mel
  11. [!--quoteo(post=352457:date=Mar 7 2006, 11:29 AM:name=Toni_montana)--][div class=\'quotetop\']QUOTE(Toni_montana @ Mar 7 2006, 11:29 AM) [snapback]352457[/snapback][/div][div class=\'quotemain\'][!--quotec--] I'm not sure wheter this is gonna solve your problem, But i think it's better to use $page =$_GET['page']; over just asuming that $page will contain the variable passed by GET. I don't think that the way you do it is supported by all OS. good luck rogier [/quote] Thank you Toni_montana But that was not the problem I was explaining.
  12. Hi, is there any difference between calling pages contents between PHP on Apcahe versus PHP on IIS? My problem is under PHP/Apache I used include command to call in pages contents (index.php?page=2) but under PHP/Windows platform, it cannot pass the page contents or page title and it only calls the page=0 contents. As I said, my codes works under PHP/Apache and I have no problem calling in the contents of each page using switch statement ... Any ideas how to solve this problem? Here is a sample of my codes: ---------------- index.php --- <? include "contents.php"; ?> <? include "pages/$content"; ?> ----------------- contents.php --- <? switch ($page) { case 0: $content = "main.php"; $title = "Main"; break; case 1: $content = "page2.php"; $title = "Page two"; break; ?> MOD EDIT : Topic double-posted. Closing
  13. Hi, is there any difference between calling pages contents between PHP on Apcahe versus PHP on IIS? My problem is under PHP/Apache I used include command to call in pages contents (index.php?page=2) but under PHP/Windows platform, it cannot pass the page contents or page title and it only calls the page=0 contents. As I said, my codes works under PHP/Apache and I have no problem calling in the contents of each page using switch statement ... Any ideas how to solve this problem? Here is a sample of my codes: ---------------- index.php --- <? include "contents.php"; ?> <? include "pages/$content"; ?> ----------------- contents.php --- <? switch ($page) { case 0: $content = "main.php"; $title = "Main"; break; case 1: $content = "page2.php"; $title = "Page two"; break; ?>
  14. Hi, is there any difference between calling pages contents between PHP on Apcahe versus PHP on IIS? My problem is under PHP/Apache I used include command to call in pages contents (index.php?page=2) but under PHP/Windows platform, it cannot pass the page contents or page title and it only calls the page=0 contents. As I said, my codes works under PHP/Apache and I have no problem calling in the contents of each page using switch statement ... Any ideas how to solve this problem? Here is a sample of my codes: ---------------- index.php --- <? include "contents.php"; ?> <? include "pages/$content"; ?> ----------------- contents.php --- <? switch ($page) { case 0: $content = "main.php"; $title = "Main"; break; case 1: $content = "page2.php"; $title = "Page two"; break; ?>
  15. ToonMariner It's coming from a URL (index.pages?page=1) I'm not sure why my codes works just fine on apache/php server, but it doesn't work on windows/php...
×
×
  • 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.