WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Php Script Stumped!

for

Number of posts in this thread: 3 (In chronological order)

From: marvin hunkin
Date: Thu, Apr 06 2006 12:30AM
Subject: Php Script Stumped!
No previous message | Next message →

Hi.
doing this script for an assignment, and got it basically working.
the only problems are:


1. wen i load the user form, the focus goes to the login button, and not the
first form field.
did try putting one it, did not like it.
so how do i do this?
is there a basic dom example, how to set focus on a form field, when the
form loads?
2. got a user name and password.
and enter username and password, and when the php script loads, it shows the
user name and the password.
want to hide this, and only have the message, now how do i accomplish this?
tried things on the web and tried on google, but could not find any thing
for this.
3. and got to provide the time, but how do i format it say for australian
east standard time?
just got the standard time, and jaws reads it out, as one line of text.
will paste the user form and php code.
if any one can offer code snippets, or point me to links, and examples, let
me know.
sorry about this, but these are stumping me and banging my head up against
the brick wall, so, would ask.
cheers Marvin.




User Form:

<html>
<head>
<title>User Login Form</title>
</head>
<body>
<form action="UserDetails.php" method="post">
<p>User Name: <input type="text" name="username"> </p> <br>
<p>Password: <input type="text" name="password"> </p> <br>
<p><input type="submit" value="Login"> </p>
</form>
</body>
</html>


Php Script:

<?php
echo $_POST['username'];
echo $_POST['password'];
echo "Marvin Hunkin has successfully logged into the Tafe network. <br>
";
echo "Please Wait ... Loading Your Personal Settings ... <br>
";
echo time();
?>but






From: Sailesh Panchang
Date: Thu, Apr 06 2006 3:00PM
Subject: Php Script Stumped!
← Previous message | Next message →

Hello There,
Looked at the code and wondered if I understood you right. You are
explicitly echoing or displaying the username and password through the PHP
script. If you do not do so then the username and password will not display,
right? Or am I missing something? I see you are hard coding the username in
the message instead of echoing the POST variable.

As for the time:
Consider getdate() then use strftime with format characters as you wish
Eg. print strftime('%c');
Also consider
// For local time is EST (U.S.)
$time_parts = localtime();
// (Then PST) is three hours earlier
$PST_time_parts = localtime(time() - 3 * 3600);
Hope this helps
Sailesh Panchang
Senior Accessibility Engineer
Deque Systems Inc. (www.deque.com)
11180 Sunrise Valley Drive, Suite #400,
Reston VA 20191
Phone: 703-225-0380 (ext 105)
E-mail: = EMAIL ADDRESS REMOVED =






From: Tonda King
Date: Fri, Apr 07 2006 5:20AM
Subject: Re: Php Script Stumped!
← Previous message | No next message

Hi Salish,

Are you sure you meant to send this to me? I only just opened up our
Ramp Ascend the other day to test out how it may generate a report on
accessibility on our website. However, I had to close it down because
it was time for our virus protection to run and that slows out system
down horribly.

Thanks, TK


>>> = EMAIL ADDRESS REMOVED = >>>
Hello There,
Looked at the code and wondered if I understood you right. You are
explicitly echoing or displaying the username and password through the
PHP
script. If you do not do so then the username and password will not
display,
right? Or am I missing something? I see you are hard coding the
username in
the message instead of echoing the POST variable.

As for the time:
Consider getdate() then use strftime with format characters as you wish
Eg. print strftime('%c');
Also consider
// For local time is EST (U.S.)
$time_parts = localtime();
// (Then PST) is three hours earlier
$PST_time_parts = localtime(time() - 3 * 3600);
Hope this helps
Sailesh Panchang
Senior Accessibility Engineer
Deque Systems Inc. (www.deque.com)
11180 Sunrise Valley Drive, Suite #400,
Reston VA 20191
Phone: 703-225-0380 (ext 105)
E-mail: = EMAIL ADDRESS REMOVED =