mvosoughi
-
Posts
18 -
Joined
-
Last visited
Never
Posts posted by mvosoughi
-
-
[!--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. -
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?
-
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..
-
Thank you, problem is solved. I wasn't retrieving the data currectly.
-
AndyB, thank you for the reply. You were right, I wasn't retrieving the data ($_POST) currectly. It is working now.
Thank you. -
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. -
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. -
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?
-
Than you Toni_montana and ToonMariner,
You both were right. That acutally solved the problem.
Mel
-
[!--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. -
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 -
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;
?> -
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;
?>
-
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...
-
[!--quoteo(post=351333:date=Mar 3 2006, 02:14 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Mar 3 2006, 02:14 PM) [snapback]351333[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This looks like a register_globals enable vs. disabled problem.
Where is the variable [b]$page[/b] coming from?
Ken
[/quote]
kenrbnsn
It comes from switch statement that is saved on a seperated forlder. First I call that in as
<? include "file.php"; ?> which includes the swtich statement
then the contents of each page will be inserted by
<? include "$contents" ?> that is part of the file.php
-
Thanks foe the input. My problem is that my codes won't work under the microsoft platform with PHP enabled. My swtich works just fine in apache server platform.
-
Hi guys,
I already have apache server installed and all my php scripts work just fine. I just registered a domain on a windows paltform server that acutally supports PHP. In my codes I'm using dynamic contents which uses switch fucntion:
if ($page == ""){
$page = 0;
}
$next = $page+1;
$previous = $page-1;
switch ($page)
{
case 0:
$content = "home.htm";
break;
case 1:
$content = "company.htm";
break;
default:
$content = "home.htm";
break;
}
?>
on my index page I use include:
<? include "$content"; ?>
problem: On the windows platform that supports PHP, page can be displayed, but it will but show the content of the different pages, it only shows the contents of page=0.
I change the tag from <? ?> to <?php ?> but nothing happened.
Any idea?
Date1 Minus Date1
in PHP Coding Help
Posted
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