Problems with a PHP/mySQL site on Windows Mobile 2003

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Atr3ides
Forum Newbie
Posts: 1
Joined: Wed Apr 27, 2005 6:50 am
Contact:

Problems with a PHP/mySQL site on Windows Mobile 2003

Post 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
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

?
echo "<form>Current date: $currentdate <br>";
?

Might be smart to give a bit more..
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post 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...
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

can you give us a little more code as what you have shown doesn't make much sense by itself.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post 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.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post 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
Post Reply