[PHP] Php Script Stumped!

2006-04-06 Thread marvin hunkin

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
titleUser Login Form/title
/head
body
form action=UserDetails.php method=post
pUser Name: input type=text name=username /p br
pPassword: input type=text name=password /p br
pinput 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\n;
echo Please Wait ... Loading Your Personal Settings ... br\n;
echo time();
?but

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php Script Stumped!

2006-04-06 Thread Brad Bonkoski

1. Look at this: http://javascript.internet.com/forms/form-focus.html

2. See Below

3. Take a look at this function: 
http://www.php.net/manual/en/function.date.php


-B

marvin hunkin wrote:


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
titleUser Login Form/title
/head
body
form action=UserDetails.php method=post
pUser Name: input type=text name=username /p br
pPassword: input type=text name=password /p br


I would make this: pPassword: input type=password 
name=password/pbr
 -use the password 
input type^



pinput type=submit value=Login /p
/form
/body
/html


Php Script:

?php
echo $_POST['username'];
echo $_POST['password'];


Just say:
   $user = $_POST['username'];
   $pass = $_POST['password'];
echo $user has successfully logged into the Tafe network. br\n;
/* This will STORE your username/password instead of printing them out 
to the screen */
(Of course there are security considerations sending a clear text 
password accross page loads, but it may be outside the scope of the 
assignemnt)


echo Marvin Hunkin has successfully logged into the Tafe network. 
br\n;

echo Please Wait ... Loading Your Personal Settings ... br\n;
echo time();
?but



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Php Script Stumped!

2006-04-06 Thread Jim Moseby
 Hi.

Hi!

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


Assignment, eh?  Generally, folks on the PHP list will not do your homework
for you.  But I'll offer some light nudges in the right direction for you.

 
 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?

Not a PHP issue.  Hint: google body onload  Generally, you will give your
form a name and specify that name and the field name you want to have focus
in the body tag. using the onload directive.

 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.

PHP doesn't automatically display anything you don't ask it to display.
(Other than these occaisional 'error messages' some claim to see ;-) In your
code snippet, I happened to notice that you explicitly echo the username and
password.  I would say the fix for this is don't do that.

 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.

You can format dates and times any way you see fit. You can set timezones
how ever you want.  How? http://php.net/date would be a good place to start.
:-)

Happy coding!

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php