Page 1 of 1

Problems with a PHP/mySQL site on Windows Mobile 2003

Posted: Wed Apr 27, 2005 7:05 am
by Atr3ides
Hello,

We have a data driven app in PHP for internal use of our company and encountered a weird behavior when accesing the sections from a PocketPC running Windows Mobile 2003.

Here is a test sample:

Code: Select all

<?php session_start(); ?>
<HTML>
<HEAD>
</HEAD>
<BODY  bgcolor='#f0f7ff'>
<?php
  global $otherdate, $currentdate;
  $currentdate = date('Y-m-d');
  if (isset($in)) {$otherdate=$in;}
  echo "<form>Current date:   $currentdate <br>";
  echo "Other date:   $otherdate <br>";
  echo "<input type=text size=10 name=in value=$in>";
  echo "<input type=submit name=sbmit value='OK'>";
  echo "</form>";
?>
</BODY>
</HTML>
When user writes text in the second text box and presses OK, it goes well, and the URL returned is "http://localhost/test.php?in=2005-01-01&sbmit=OK", but at a second attempt, you'll see the variables don't change anymore and the URL is "http://localhost/test.php?in=2005-01-01 ... 1&sbmit=OK"

I don't have much PHP knowledge, but a heavy background on database development using MS products (i know... :roll:), so if someone bumped into this and found an explanation, please reply.
Thanks all

d11wtq | Please read the sticky about posting code in the forums :-D

Posted: Thu Apr 28, 2005 12:37 am
by ol4pr0
?
echo "<form>Current date: $currentdate <br>";
?

Might be smart to give a bit more..

Posted: Thu Apr 28, 2005 2:45 am
by n00b Saibot
ol4pr0 wrote:?
echo "<form>Current date: $currentdate <br>";
?

Might be smart to give a bit more..
:? what does that supposed to mean...

Posted: Thu Apr 28, 2005 3:38 am
by phpScott
can you give us a little more code as what you have shown doesn't make much sense by itself.

Posted: Thu Apr 28, 2005 3:51 am
by n00b Saibot
phpScott wrote:can you give us a little more code as what you have shown doesn't make much sense by itself.
It sure does...

By the way, he assumes register_globals to be on in his code and i think that is the root of his problem.

Posted: Thu Apr 28, 2005 5:06 am
by phpScott
I can see what it is doing, but part of the problem might be no action set for the form and yes the register global variables being on.

What I was trying to get was a little more context of what was happening other then a poorly coded form not working.

phpscott