[PHP] html forms and php
Greetings all, Currently I have a form that has two lists that contain options. I use javacript to dynamically move options from one select list to another. All this works fine... this is the select: select name=trucklist size=12 style=width: 150px multiple option value=LT680LT680/option option value=LT685LT685/option option value=LT690LT690/option option value=LT695LT695/option option value=LT700LT700/option option value=LT705LT705/option /select Now I wish to post all the options from one list to another page. So I select all the options in that list and hit the submit button. Obviously, a select list, will return each value with the same name to the second web page. Therefore we can only capture the last option posted. To resolve this we have to create an array out of our select name: select name=trucklist[] size=12 style=width: 150px multiple I added the square brakets to the name...now when I select all the options on the list I can read all values individually. Here is problem...my javascripts have stopped working, I can't move options from one list to the next. Here is the javascript I use currently...I would like help in modifing it so that it may work while using the brakets on the name of the select: Thanks a bunch for the help!! Always appreciated First the two list that transmit the options back and forth: (javascript below) select name=trucklist size=12 style=width: 150px multiple option value=LT680LT680/option option value=LT685LT685/option option value=LT690LT690/option option value=LT695LT695/option option value=LT700LT700/option option value=LT705LT705/option /select /td td input type=button name=SelectAll value= All style=width: 100px; onClick=MoveAll(fleetForm.trucklist, fleetForm.reportinglist)br input type=button name=Select value= style=width: 100px; onClick=Move(fleetForm.trucklist, fleetForm.reportinglist)brbr input type=button name=Unselect value= style=width: 100px; onClick=Move(fleetForm.reportinglist, fleetForm.trucklist)br input type=button name=UnselectAll value= All style=width: 100px; onClick=MoveAll(fleetForm.reportinglist, fleetForm.trucklist) /td td select name=reportinglist[] size=12 style=width: 150px multiple here is the javascript: function Move(fromList, toList){ var tempArray = new Array(); var x = 0; //looping through source element to find selected options for (var i = 0; i fromList.length; i++) { if (fromList.options[i].selected) { //need to move this option to the 'to' list var selectionLen = toList.length++; toList.options[selectionLen].text = fromList.options[i].text; toList.options[selectionLen].value = fromList.options[i].value; } else { //storing options that stay to recreate selected trucks var tempValues = new Object(); tempValues.text = fromList.options[i].text; tempValues.value = fromList.options[i].value; tempArray[y] = tempValues; y++; } } //resetting length of 'from' list fromList.length = tempArray.length; //looping through temp array to recreate intial selection for (var i = 0; i tempArray.length; i++) { fromList.options[i].text = tempArray[i].text; fromList.options[i].value = tempArray[i].value; fromList.options[i].selected = false; } } function MoveAll(from, to){ selectAll(from); Move(from, to); } function selectAll(trucklist) { if (!hasTruck(trucklist)) { return; } for (var i=0; itrucklist.options.length; i++) trucklist.options[i].selected = true; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms and php
Philippe, I recommend using an ID, instead of the NAME attribute to refer to the various elements. This ought to solve your problem. David Philippe Reynolds wrote: Greetings all, Currently I have a form that has two lists that contain options. I use javacript to dynamically move options from one select list to another. All this works fine... this is the select: select name=trucklist size=12 style=width: 150px multiple option value=LT680LT680/option option value=LT685LT685/option option value=LT690LT690/option option value=LT695LT695/option option value=LT700LT700/option option value=LT705LT705/option /select Now I wish to post all the options from one list to another page. So I select all the options in that list and hit the submit button. Obviously, a select list, will return each value with the same name to the second web page. Therefore we can only capture the last option posted. To resolve this we have to create an array out of our select name: select name=trucklist[] size=12 style=width: 150px multiple I added the square brakets to the name...now when I select all the options on the list I can read all values individually. Here is problem...my javascripts have stopped working, I can't move options from one list to the next. Here is the javascript I use currently...I would like help in modifing it so that it may work while using the brakets on the name of the select: Thanks a bunch for the help!! Always appreciated First the two list that transmit the options back and forth: (javascript below) select name=trucklist size=12 style=width: 150px multiple option value=LT680LT680/option option value=LT685LT685/option option value=LT690LT690/option option value=LT695LT695/option option value=LT700LT700/option option value=LT705LT705/option /select /td td input type=button name=SelectAll value= All style=width: 100px; onClick=MoveAll(fleetForm.trucklist, fleetForm.reportinglist)br input type=button name=Select value= style=width: 100px; onClick=Move(fleetForm.trucklist, fleetForm.reportinglist)brbr input type=button name=Unselect value= style=width: 100px; onClick=Move(fleetForm.reportinglist, fleetForm.trucklist)br input type=button name=UnselectAll value= All style=width: 100px; onClick=MoveAll(fleetForm.reportinglist, fleetForm.trucklist) /td td select name=reportinglist[] size=12 style=width: 150px multiple here is the javascript: function Move(fromList, toList){ var tempArray = new Array(); var x = 0; //looping through source element to find selected options for (var i = 0; i fromList.length; i++) { if (fromList.options[i].selected) { //need to move this option to the 'to' list var selectionLen = toList.length++; toList.options[selectionLen].text = fromList.options[i].text; toList.options[selectionLen].value = fromList.options[i].value; } else { //storing options that stay to recreate selected trucks var tempValues = new Object(); tempValues.text = fromList.options[i].text; tempValues.value = fromList.options[i].value; tempArray[y] = tempValues; y++; } } //resetting length of 'from' list fromList.length = tempArray.length; //looping through temp array to recreate intial selection for (var i = 0; i tempArray.length; i++) { fromList.options[i].text = tempArray[i].text; fromList.options[i].value = tempArray[i].value; fromList.options[i].selected = false; } } function MoveAll(from, to){ selectAll(from); Move(from, to); } function selectAll(trucklist) { if (!hasTruck(trucklist)) { return; } for (var i=0; itrucklist.options.length; i++) trucklist.options[i].selected = true; } -- David Grant http://www.grant.org.uk/ http://pear.php.net/package/File_Ogg0.2.1 http://pear.php.net/package/File_XSPF 0.1.0 WANTED: Junior PHP Developer in Bristol, UK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms and php
On 31 Jan 2006, at 16:07, Philippe Reynolds wrote: To resolve this we have to create an array out of our select name: select name=trucklist[] size=12 style=width: 150px multiple I added the square brakets to the name...now when I select all the options on the list I can read all values individually. Here is problem...my javascripts have stopped working, I can't move options from one list to the next. Here is the javascript I use currently...I would like help in modifing it so that it may work while using the brakets on the name of the select: Keep the trucklist[] as the select list NAME. This will allow PHP to work. Add an ID to the select list: select id=trucklist name=trucklist[] size=12 style=width: 150px multiple Now modify your JavaScript to use this ID instead of the form element name when moving. function Move(fromListID, toListID) { fromList = document.getElementById(fromListID); toList = document.getElementById(toListID); etc etc You can now access the fromList select list in the usual way. Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms and php
Awesome...that solved it!! Thanks a bunch to everyone who contributed!! Cheers Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html forms and php
On 31 January 2006 16:08, Philippe Reynolds wrote: I added the square brakets to the name...now when I select all the options on the list I can read all values individually. Here is problem...my javascripts have stopped working, I can't move options from one list to the next. Here is the javascript I use currently...I would like help in modifing it so that it may work while using the brakets on the name of the select: Use the Javascript identity of x.y with x[y], thusly: input type=button name=SelectAll value= All style=width: 100px; onClick=MoveAll(fleetForm.trucklist, fleetForm.reportinglist)br onclick=MoveAll(fleetForm['trucklist[]'], fleetForm['reportinglist[]']) No need to mess about with the complications of DOM and getElementById -- it's much more backward compatible for older browsers, as well, since that identity has existed since day one of JavaScript. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms in php
I HATE Are you sure? prompts. If I wasn't sure, I wouldn't have clicked it in the first place. If you want to make your users happy, trust them when they say Delete, but make it easy to undo. Instead of deleting the records, just set the Delete flag and timestamp. Then when the odd user makes a mistake, just unset that flag. After a period of time, you can really delete the records that were marked a few days ago. Thanks for that comment Scott, it helps me a lot to see what I didn't. I've been developing with Are you sure? confirmation and it really makes things difficult to users and slow actions' time to be committed. Now, I've changed and all is more nice. Thanks again, feel this is a very good practice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms in php
Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? While some of the others here have answered your technical question, I'd like to state my opinion on usability. I HATE Are you sure? prompts. If I wasn't sure, I wouldn't have clicked it in the first place. If you want to make your users happy, trust them when they say Delete, but make it easy to undo. Instead of deleting the records, just set the Delete flag and timestamp. Then when the odd user makes a mistake, just unset that flag. After a period of time, you can really delete the records that were marked a few days ago. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html forms in php
Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? Thanks for the assistance Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html forms in php
[snip] Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? [/snip] You can use JavaScript for this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html forms in php
philippe, you can accomplish this by using a piece of javascript that fires off an alert, asking the user 'yes/no'. if the user selected yes, the app would do a submit to the page that would then take care of the mysql/db interaction... search on google for 'php onsubmit alert' etc... -bruce -Original Message- From: Philippe Reynolds [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 11:14 AM To: php-general@lists.php.net Subject: [PHP] html forms in php Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? Thanks for the assistance Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html forms in php
Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? Hi Phil, You can achieve this in several ways. One would be to use a JavaScript onClick event on the 'dangerous' button to pop up a dialog with your 'Are you sure?' prompt and the yes/no buttons. If the user clicks on the 'no' button, you use JavaScript to cancel the page submission. If they click on the 'yes' button, the page submits. This approach would mean assuming that your users have JavaScript enabled. A second approach would be to have an intermediary page between the page with the button, and the page that performs the actual delete. The intermediary page would be little more than another form with the yes/no buttons. Much warmth, Murray --- Lost in thought... http://www.planetthoughtful.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html forms in php
This might help you. input type=submit name=DELETE onclick=return confirmDelete() script function confirmDelete() { var agree=confirm(WARNING! This will blah blah delete etc yada yada \n\rPress Cancel to go back, or OK to Continue.); if (agree) return true ; else return false ; } /script -Original Message- From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 12:32 PM To: 'Philippe Reynolds'; php-general@lists.php.net Subject: RE: [PHP] html forms in php Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? Hi Phil, You can achieve this in several ways. One would be to use a JavaScript onClick event on the 'dangerous' button to pop up a dialog with your 'Are you sure?' prompt and the yes/no buttons. If the user clicks on the 'no' button, you use JavaScript to cancel the page submission. If they click on the 'yes' button, the page submits. This approach would mean assuming that your users have JavaScript enabled. A second approach would be to have an intermediary page between the page with the button, and the page that performs the actual delete. The intermediary page would be little more than another form with the yes/no buttons. Much warmth, Murray --- Lost in thought... http://www.planetthoughtful.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html forms in php
Here's some javascript I use for such instances: [CODE] if (myForm.hidWhich.value == delete) { var verify = prompt(You are about to delete this entry \n + \n \n + To delete this entry you must type this phrase in the prompt and click OK: \n \n + -- KILL ENTRY!); if (verify == KILL ENTRY!) { myForm.submit(); return(true); } else { alert(Error: Could not delete entry becuase you either canceled out or entered the wrong phrase! \n + Your entry WAS NOT deleted.); return(false); } } [/CODE] The user must click a button to delete the entry. This button calls as function onClick; within that function is the above code. It requires the user to enter an exact phrase. If the exact phrase is not entered, it is returned false and the form never submits. If the correct phrase is entered, it sumbits the form and I remove the entry from Postgresql. So far I have not had any users accidentally delete anything. The only problem is IE does not like the prompt() function -works perfect in FireFox. In IE it doesn't display the text in the prompt window, but if the correct phrase is entered it still works Philippe Reynolds wrote: Good day all, I have a problem for you all.. I have a form that has has the ability to delete a lot of information from my MySQL database. I would like to create a bit of security, in case the user hits the button by accident. I would like to create an additionnal window that would appear that would ask: Are you sure? and then a yes and no buttons to confirm the deletion or to cancel the command. Any thougts?? Thanks for the assistance Phil -- D. Aaron Germ Scarborough Library, Shepherd University (304) 876-5423 Well then what am I supposed to do with all my creative ideas- take a bath and wash myself with them? 'Cause that is what soap is for (Peter, Family Guy) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Html forms to php scripts
I have registered_globals on so this shouldn't matter, but: echo $_POST['ttt']; returns the same problem as simple echo $ttt; Here is my phpinfo(); http://psyche.govst.edu/test.php I'm in the process of upgrading to apache 2.0.45 and php 4.3.1, so maybe that will fix things as I have heard that 4.2.2 doesn't like apache2. Tim Van Zee ITS Network Specialist Governors State University -Original Message- From: Tim Burden [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:07 AM To: VanZee, Timothy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Html forms to php scripts What version of Apache are you using? Can you point us to a phpinfo() file? - Original Message - From: Timothy Vanzee [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:31 AM Subject: FW: [PHP] Html forms to php scripts I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Html forms to php scripts
Here are the results: Array ( [ttt] = javattt=java ) Array ( [ttt] = javattt=java ) Tim Van Zee ITS Network Specialist Governors State University [ snip ] Would be curiuos to see the the results of : echo pre; print_r($_REQUEST); echo/pre; echo pre; print_r($_POST); echo/pre; That might shed some light as to what is being sent and what isn't. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
I though we already covered that this was an PHP / Apache 2 bug?? Stop using Apache 2 with PHP. ---John Holmes... - Original Message - From: VanZee, Timothy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 04, 2003 11:01 AM Subject: RE: [PHP] Html forms to php scripts Here are the results: Array ( [ttt] = javattt=java ) Array ( [ttt] = javattt=java ) Tim Van Zee ITS Network Specialist Governors State University [ snip ] Would be curiuos to see the the results of : echo pre; print_r($_REQUEST); echo/pre; echo pre; print_r($_POST); echo/pre; That might shed some light as to what is being sent and what isn't. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] Html forms to php scripts
Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: FW: [PHP] Html forms to php scripts
VanZee, Timothy wrote: Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. Sorry, but this is not an easy question. I have been working with php for a while and I don't have any answer for you. Your example works for me so the only thing that comes to my mind is try echo $_POST['ttt'] or print_r($GLOBALS). I hope this will help you somehow. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Html forms to php scripts
-Original Message- From: VanZee, Timothy [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 17:31 Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 I'm pretty sure that this is an Apache 2 problem that's fixed in a later version of PHP and/or Apache. Try searching the bug database for more details. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
What version of Apache are you using? Can you point us to a phpinfo() file? - Original Message - From: Timothy Vanzee [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:31 AM Subject: FW: [PHP] Html forms to php scripts Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
It's an Apache 2 / PHP bug. I think if you use $_POST['ttt'], you'll get the correct value, but I'm not sure. Try turning register globals off or using a stable version of Apache that works with PHP (the 1.3 series). ---John Holmes... - Original Message - From: VanZee, Timothy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:31 AM Subject: FW: [PHP] Html forms to php scripts Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
Ford, Mike [LSS] wrote: -Original Message- From: VanZee, Timothy [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 17:31 Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 registered_globals is off by default in your version of PHP (its in the release notes) so, try replacing your echo statement with echo $_POST['ttt']; and see if that helps. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Html forms to php scripts
I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: form action=input.php method=post input type=text name=ttt pinput type=submit name=submit value=Submit/p /form Php file (input.php) looks like this: ? echo $ttt; ? I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University