RE: [PHP] Need Help Please
[snip] While tabindex is a neat thing to use it does not necessarily give focus to the first element of the form, it merely dictates the order in which form elements will be given focus when the tab key is pressed. The action may vary from browser to browser. Likely, when going to a form with tabindex defined, none of the elements will have focus until the tab key is pressed once, at which time the element with tabindex=1 will get focus. If you want to give focus to the first input element of a form you must still use a JavaScript widget to place the focus there after the entire page has loaded, tabindex will make sure that the cursor goes in the order you wish to go in after that.[/snip] [snip] Try to use Firefox to debug your javascript. I guess, there are some javascript error. [/snip] I confirmed before I sent the above e-mail that tabindex did not work in Firefox or Opera either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need Help Please
[snip] Although someone else has suggested you use JavaScript to set the focus on a particular form field, I urge you instead to use HTML tabindex property: pUser Name: input tabindex=1 type=text name=username /p br pPassword: input tabindex=2 type=password name=password /p br pinput tabindex=3 type=submit value=Login /p HTML 4.01 Specification 17 Forms 17.11 Giving focus to an element 17.11.1 Tabbing navigation http://www.w3.org/TR/html4/interact/forms.html#h-17.11.1 Simplistic JavaScript solutions place focus on an input field after the page has completely loaded, often after the user has begun interacting with the form, causing irritating focus jumps in mid-input. [/snip] While tabindex is a neat thing to use it does not necessarily give focus to the first element of the form, it merely dictates the order in which form elements will be given focus when the tab key is pressed. The action may vary from browser to browser. Likely, when going to a form with tabindex defined, none of the elements will have focus until the tab key is pressed once, at which time the element with tabindex=1 will get focus. If you want to give focus to the first input element of a form you must still use a JavaScript widget to place the focus there after the entire page has loaded, tabindex will make sure that the cursor goes in the order you wish to go in after that. YMMV -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need Help Please
Hi. doing an assignment, for my Certificate Four In Website Administration. now got a couple of problems. will explain what i have to do. create a html form, which i have done. in textpad. now, when i open the form, it does not set focus to the first form field which is the user name. goes to the login button. why is this? can any one help me? okay, will explain. and to create a script for a login page, on a network. and using php, and now got the user to enter their username and password, and then to display a message, saying the person logged in, and to display the date. if the user, types in the wrong user name and password, then a error message is displayed, and a link back to the form, is displayed. now got the problem of a error, when checking to see if the error happened or not, and whether to let them in or not. so will paste the html form, and the php code below. if any one can help me how to fix these problems, then let me know asap. cheers Marvin. Html Form: Code Starts Here: html head script language=text/javascript function SetFocus { document.forms[0].username.focus(); } /script titleUser Login Form/title /head body onload=SetFocus(); form action=UserDetails.php method=post pUser Name: input type=text name=username /p br pPassword: input type=password name=password /p br pinput type=submit value=Login /p /form /body /html Php Code: Code Starts Here: ?php $_POST['username']; $_POST['password']; if ('username'='username') ('password'='password') { echo Letting you login into the tafe network. br\n; echo Marvin Hunkin has successfully logged into the Tafe network. br\n; echo Please Wait ... Loading Your Personal Settings ... br\n; gmdate('d-m-Y', time()+(10*60*60)); } else { echo Not letting you login into the tafe network. br\n; echo Error! You did not type in a correct username! Please try again... br\n; echo Click on the link below to return back to the login form and enter your correct user name and password. br\n; echo'a href=UserDetails.htmlReturn To Login Form/a'; } ? Code Error: Code Starts Here: Parse error: parse error in c:\program files\easyphp1-8\www\userdetails.php on line 4 I am Using Easy Php 1-8, and using http://localhost in the browser, and sending my files to the www folder of easy php. Have A Great Day. Marvin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help Please
Sure we can... Go back and read your manual. Then surf Google. Then tell us where you are getting the certificate from since some of us might be wasting our time taking a class some place that teaches you so poorly. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help Please
marvin hunkin wrote: Hi. doing an assignment, for my Certificate Four In Website Administration. Wow someone doing an assignment has written some code :) Good stuff! $_POST['username']; $_POST['password']; if ('username'='username') ('password'='password') This little bit of code is your problem. Firstly you want to assign the username and password to some variables: $posted_username = $_POST['username']; $posted_password = $_POST['password']; http://www.php.net/manual/en/language.variables.php#language.variables.basics Then you want to check them: if ($posted_username == 'username' $posted_password == 'password') { in php, one = means assignment http://www.php.net/manual/en/language.operators.assignment.php to check a variable, use two - ==. http://www.php.net/manual/en/language.operators.comparison.php Lastly for some extra credit, you should read http://phpsec.org/projects/. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help Please
Wolf wrote: Sure we can... Go back and read your manual. Then surf Google. Then tell us where you are getting the certificate from since some of us might be wasting our time taking a class some place that teaches you so poorly. At least there were attempts at code which makes a nice change.. ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help Please
marvin hunkin wrote: Hi. doing an assignment, for my Certificate Four In Website Administration. The tutor list is down the hall. now got a couple of problems. will explain what i have to do. create a html form, which i have done. in textpad. now, when i open the form, it does not set focus to the first form field which is the user name. goes to the login button. why is this? can any one help me? Yes. Buy a book on Javascript. okay, will explain. and to create a script for a login page, on a network. and using php, and now got the user to enter their username and password, and then to display a message, saying the person logged in, and to display the date. if the user, types in the wrong user name and password, then a error message is displayed, and a link back to the form, is displayed. now got the problem of a error, when checking to see if the error happened or not, and whether to let them in or not. so will paste the html form, and the php code below. if any one can help me how to fix these problems, then let me know asap. cheers Marvin. Html Form: Code Starts Here: html head script language=text/javascript function SetFocus { document.forms[0].username.focus(); } /script titleUser Login Form/title /head body onload=SetFocus(); form action=UserDetails.php method=post pUser Name: input type=text name=username /p br pPassword: input type=password name=password /p br pinput type=submit value=Login /p /form /body /html Php Code: Code Starts Here: ?php $_POST['username']; $_POST['password']; if ('username'='username') ('password'='password') { echo Letting you login into the tafe network. br\n; echo Marvin Hunkin has successfully logged into the Tafe network. br\n; echo Please Wait ... Loading Your Personal Settings ... br\n; gmdate('d-m-Y', time()+(10*60*60)); } else { echo Not letting you login into the tafe network. br\n; echo Error! You did not type in a correct username! Please try again... br\n; echo Click on the link below to return back to the login form and enter your correct user name and password. br\n; echo'a href=UserDetails.htmlReturn To Login Form/a'; } ? Code Error: Code Starts Here: Parse error: parse error in c:\program files\easyphp1-8\www\userdetails.php on line 4 I am Using Easy Php 1-8, and using http://localhost in the browser, and sending my files to the www folder of easy php. Have A Great Day. Marvin. Instead of cutting and pasting, RTFM and understand what your code is (not) doing. If this is level four, Most of us here would be a Grand Poobah. -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help Please
At 07:38 PM 5/21/2006, marvin hunkin wrote: now, when i open the form, it does not set focus to the first form field which is the user name. goes to the login button. why is this? Marvin, Although someone else has suggested you use JavaScript to set the focus on a particular form field, I urge you instead to use HTML tabindex property: pUser Name: input tabindex=1 type=text name=username /p br pPassword: input tabindex=2 type=password name=password /p br pinput tabindex=3 type=submit value=Login /p HTML 4.01 Specification 17 Forms 17.11 Giving focus to an element 17.11.1 Tabbing navigation http://www.w3.org/TR/html4/interact/forms.html#h-17.11.1 Simplistic JavaScript solutions place focus on an input field after the page has completely loaded, often after the user has begun interacting with the form, causing irritating focus jumps in mid-input. Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need Help: Please click on Test Link
Hi I need your help. Can you please visit a site http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I am trying to get hits from different parts of the world to make sure that it works. Planning to develop a webservice from this. Thanks in advance, Suhas _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help: Please click on Test Link
Hello, This is a reply to an e-mail that you wrote on Thu, 17 Jul 2003 at 02:02, lines prefixed by '' were originally written by you. I need your help. Can you please visit a site http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I am trying to get hits from different parts of the world to make sure that it works. Planning to develop a webservice from this. Did not work for me, it was just blank. I use the free IP to country database at http://ip-to-country.com whenever I need country stats and I have never had a problem with it (obviously never rely on results from a database like this to make your site work correctly though and let the user override the country settings if it effects how they can use your site). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help. please
I'm sorry for those who my have responded to my last email. I thought I had plenty of room in my email client, but I forgot to delete my trash, so I did not get any responses. So, I'm going to restate my initial problem. Any help will be greatly appreciated. Thanks again I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store Hello, I need # help in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need help. please
John Holcomb wrote: I'm sorry for those who my have responded to my last email. I thought I had plenty of room in my email client, but I forgot to delete my trash, so I did not get any responses. So, I'm going to restate my initial problem. Any help will be greatly appreciated. Thanks again I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store Hello, I need # help in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is check to see if the field where the info is going into is long enough. ie varchar(50). anything more than 50 get cut off. being diplayed on the succeeding web page. I've tried what did you name the textfield? You should be able to echo $string; if you named the textfield string using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]