[PHP] Getting values from the Javascript namespace
Is there any way to get values from the Javascript namespace into PHP? I want to use a value passed into a Javascript function in a query within some PHP code in the function which is used to dynamically populate a select's options. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting values?
I have a form that uses -$i in it to create multiple write boxes for editing the information. It then passes that information to another script that read through and modifies the DB based on the information. I have this code in my parsing script and I know it is BC of the way I am accessing data, can anyone help? ! -- Snip -- for ($i=0; $i$num_rows; $i++) { if ($_POST[comment-$i] != ) $comment = $_POST[comment-$i]; else $comment = $_POST[color-$i]; $id = $_POST[id-$i]; $sess = $_POST[SESSID-$i]; ! -- End Snip -- All the values turn up empty doing it this way, and there are about 14 values to do. TIA Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting values?
[snip] I have a form that uses -$i in it to create multiple write boxes for editing the information. It then passes that information to another script that read through and modifies the DB based on the information. I have this code in my parsing script and I know it is BC of the way I am accessing data, can anyone help? ! -- Snip -- for ($i=0; $i$num_rows; $i++) { if ($_POST[comment-$i] != ) $comment = $_POST[comment-$i]; else $comment = $_POST[color-$i]; $id = $_POST[id-$i]; $sess = $_POST[SESSID-$i]; ! -- End Snip -- All the values turn up empty doing it this way, and there are about 14 values to do. [/snip] -$i ? Why the dash? Is your tag like this... input type=text name=comment-$i value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting values?
On Friday 18 June 2004 20:38, Robert Sossomon wrote: if ($_POST[comment-$i] != ) Put double-quotes around your array subscripts. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Death to all fanatics! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting values?
THANKS!! Worked like a charm. Robert -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 8:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Getting values? On Friday 18 June 2004 20:38, Robert Sossomon wrote: if ($_POST[comment-$i] != ) Put double-quotes around your array subscripts. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Death to all fanatics! */ -- 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
[PHP] PHP getting values from XML
Hello All and Thanks in advance. I'm developing a site PHP site. I would like to define HTML code in XML and be able to get the HTML code using PHP. I was hoping for a simple example. I will not be able to update the version of PHP with any modules as my hosting company (hostway.com) admins the PHP environment. Cheers, Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP getting values from XML
Hi there are a couple projects done in php to go around these problemes however it will cost you on performance. Here are a couple projects you might want to look into (I never used them, but since the book XML and PHP talk about them i guess they are good proejcts) eZXML (an alternative to PHP/Dom) PHP.XPATH http://sourceforge.net/projects/phpxpath/ PHP XML RPC http://sourceforge.net/projects/phpxmlrpc/ NuSOAP http://dietrich.ganx4.com/nusoap/index.php (befor it was named SOAPx4) There must be other projects also but i dont know them. Yann Larrivée www.phpquebec.org www.protonicdesign.com On Sat, 2003-05-31 at 22:52, [EMAIL PROTECTED] wrote: Hello All and Thanks in advance. I'm developing a site PHP site. I would like to define HTML code in XML and be able to get the HTML code using PHP. I was hoping for a simple example. I will not be able to update the version of PHP with any modules as my hosting company (hostway.com) admins the PHP environment. Cheers, Ray -- 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] PHP getting values from XML
Hi, At 2003-05-31 14:52 -0400, [EMAIL PROTECTED] wrote: I'm developing a site PHP site. I would like to define HTML code in XML and be able to get the HTML code using PHP. I was hoping for a simple example. I will not be able to update the version of PHP with any modules as my hosting company (hostway.com) admins the PHP environment. I wrote a very compact stand-alone XML interpreter for the Amazon.com XML webservices interface: http://www.chipdir.nl/amazon/ The part that interprets the XML code is only about 30 lines long. Please consider that I can't guarantee that it's useable as a general XML-interpreter, because it was written with the quite neat Amazon code in mind. The code may also not be useable for big source files. Furthermore the code reads the XML code in such a way that the resulting array stays as shallow as possible. To this end certain information is not stored in the array, and therefore it's not possible to regenerate the XML code from the array again. I have also been busy expanding the script code into a similar HTML interpreter (which is much harder of course) but that means that I don't have a very clear picture in my head about what the quality of the XML interpreter currently is. I think I have found some serious improvements while working on the HTML version. One of the problems I encountered whilst trying to keep the resulting tree shallow was, that when you interpret something like: a a_data_ b_data_ c_data_ (I'm leaving out the end-tags.) You can't put the a,b,c in an associative array, with a,b,c as index, because every index should be unique and the sequence might as well be: a a_data_ b_data_ b... c This means that you have to put the elements in an enumerated array. But in the case of say: author name _data_ street _data_ city _data_ One really would prefer to put them in an associative array. Of course one could check first if all the fields are unique and decide then, but this might lead to the fact that XML code like: authors author_data_ author_data_ authors author_data_ leads to arrays of different depth. I haven't checked yet if interpreting the DTD could help to resolve this issue. Greetings, Jaap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] getting values from objects
-Original Message- From: Charles Kline [mailto:[EMAIL PROTECTED] Sent: 01 April 2003 21:21 To: Dan Joseph Cc: [EMAIL PROTECTED] Subject: Re: [PHP] getting values from objects My objective was to try and NOT use a temporary variable. for example I can do this: foreach ($res_pform-getSubmitValue(investigator5) AS $k=$v){ echo $k . br; } I was just wondering in other circumstances, how I can maybe just get to the value of one of the keys without setting it first to a variable Sorry, but you can't -- the intermediate variable is the only way (because you can only apply [] to variables!). 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
[PHP] getting values from objects
hi there, if this: $res_pform-getSubmitValue(investigator5); returns an array, how do I get to the individual values in that array without first setting it to a variable like: $myvar = $res_pform-getSubmitValue(investigator5); echo $myvar['field']; thanks charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from objects
On Wednesday 02 April 2003 03:58, Charles Kline wrote: $res_pform-getSubmitValue(investigator5); returns an array, how do I get to the individual values in that array without first setting it to a variable like: $myvar = $res_pform-getSubmitValue(investigator5); echo $myvar['field']; You can try: list($field1, $field2, ...) = $res_pform-getSubmitValue(investigator5); -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* e-credibility: the non-guaranteeable likelihood that the electronic data you're seeing is genuine rather than somebody's made-up crap. - Karl Lehenbauer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from objects
My objective was to try and NOT use a temporary variable. for example I can do this: foreach ($res_pform-getSubmitValue(investigator5) AS $k=$v){ echo $k . br; } I was just wondering in other circumstances, how I can maybe just get to the value of one of the keys without setting it first to a variable (which is the only way I know how to now). Thanks, Charles On Tuesday, April 1, 2003, at 03:18 PM, Dan Joseph wrote: Have you tried: extract ($myvar = $res_pform-getSubmitValue(investigator5)); -Dan Joseph -Original Message- From: Charles Kline [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 2:58 PM To: [EMAIL PROTECTED] Subject: [PHP] getting values from objects hi there, if this: $res_pform-getSubmitValue(investigator5); returns an array, how do I get to the individual values in that array without first setting it to a variable like: $myvar = $res_pform-getSubmitValue(investigator5); echo $myvar['field']; thanks charles -- 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] getting values by a joints mysql query
You need to establish a relation between the two tables to complete the join with something like: AND G.GID = U.GID Also, this is not a PHP related question. You should also be directing this to the MySQL mailing list. -Original Message- Im having problem in getting the the result values in my cross joint query. $query=(Select U.Name, U.Title, G.Groups from Users as U, Groups as G where U.Id='$Id' ); This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting values
http://kwister.dns2go.com/php/4.php?action=tablesdatabase=mysqltable=user http://kwister.dns2go.com/php/4.txt Hi - I'm online for next few hours (I'll upload to a non PHP server when i go offline) basically ive had help, fixed my script to show 4 rows of 17 columns each (Instead of 1 row of 1000 columns ;-) Now - Ive tried the mysql_fetch_field() the mysql_field_seek(). commands http://www.php.net/manual/en/function.mysql-fetch-field.php However in the example - the person KNOWS the names of the columns eg... blob: $meta-blob max_length: $meta-max_length multiple_key: $meta-multiple_key name: $meta-name BUT - How do i 'retrieve' thevalues of the table if I DONT know the name of each column.. Eg.. If i want to see Column 7, Row 5, - the value is 3. Column 3 row 2 = Fred etc... How can i do this ? G. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting values of Checkboxes
I have checkboxes on my FORM and I want to get the values of thoses checkboxes with my PHP script. My html use the post method I am trying to use $HTTP_POST_FORM['name_of_the_checkbox'] but I am not beeing successfull. How can I do it?? Thank you Daniel; F. Castro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting values of Checkboxes
try $_POST['name_of_the_checkbox'] or just $name_of_the_checkbox (if you have register_globals set to on) -Original Message- From: Daniel Ferreira Castro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] Getting values of Checkboxes I have checkboxes on my FORM and I want to get the values of thoses checkboxes with my PHP script. My html use the post method I am trying to use $HTTP_POST_FORM['name_of_the_checkbox'] but I am not beeing successfull. How can I do it?? Thank you Daniel; F. Castro -- 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] Getting values of Checkboxes
If a heckbox is left blank, then the webserver does not pass it's name/value pair on to the PHP processor. This means that if you have input type=checkbox name=foo And the box is not checked, then when your script recieves the form, $_POST['foo'] will not be available. So to test for it, use isset($_POST['foo']) to see if they checked it. (the example code is for version 4.1.x) [TK] -Original Message- From: Daniel Ferreira Castro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 19 March 2002 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] Getting values of Checkboxes I have checkboxes on my FORM and I want to get the values of thoses checkboxes with my PHP script. My html use the post method I am trying to use $HTTP_POST_FORM['name_of_the_checkbox'] but I am not beeing successfull. How can I do it?? Thank you Daniel; F. Castro -- 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] getting values from multiple select
-Original Message- From: Scott St. John [mailto:[EMAIL PROTECTED]] Sent: 13 March 2002 21:32 I am working on a javascript box that will allow the user to drag values from one select box to another. I will use this box to set the values. This is a standard, multiple select box. On the next page I need to figure out what PHP is doing with the data coming in. If I send 5 fields to the next page PHP will show me one when I echo the variable to the page. Name your field with trailing brackets (e.g. INPUT NAME=field_name[] ...) and you will see it as an array in PHP containing your 5 (or however many) values. 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] getting values from multiple select
On Wednesday, March 13, 2002, at 04:31 PM, Scott St. John wrote: If I send 5 fields to the next page PHP will show me one when I echo the variable to the page. If I try to split the varaiable I still get only one value in the echo. Tried to reponse.write it in asp and I get the string with comma seperate values. Did you try putting brackets at the end of the input names? This tells PHP to put the values into an array, whose key is the name of the input. select name=choice[] multiple=yes option value=aA/option option value=bB/option option value=cC/option /select This might work for you, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from multiple select
Yes, I have tried that. To view them on the next page I would call them as $choice[0];$choice[1];, etc, but only the first item in the list is available. -Scott On Thu, 14 Mar 2002, Erik Price wrote: Did you try putting brackets at the end of the input names? This tells PHP to put the values into an array, whose key is the name of the input. select name=choice[] multiple=yes option value=aA/option option value=bB/option option value=cC/option /select This might work for you, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from multiple select
On Thursday, March 14, 2002, at 09:33 AM, Scott St. John wrote: Yes, I have tried that. To view them on the next page I would call them as $choice[0];$choice[1];, etc, but only the first item in the list is available. Hm... have you tried using a loop to get their values, rather than using the numeric indexes? Like this: foreach ($choice as $array_element) { echo $array_element; } This will go through the entire array, regardless of numeric index, and echo the value of each element in the array. Try this, if it doesn't work then perhaps only one value is being passed to the receiving script. Have you made sure your listbox features the attribute multiple=yes and have you made sure to select more than one item in the listbox by holding down either Alt (PC) or Cmd (Mac) as you make your selections. If you're only selecting ONE item, then only one item will be passed to the receiving script. Use the above techniques to make sure that you are actually passing more than one value. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from multiple select
Ok, how about a code snipet since I seem to be blind this morning. The select box code: select multiple=yes name=groups id=av ? $sql = select groupID,groupName from groups order by groupName; $result = mssql_query($sql,$connection); while($row = mssql_fetch_array($result)){ $groupID = $row[groupID]; $groupName = $row[groupName]; echo option value=\$groupID\$groupName/option; } ? /select On the next page I tried the code Erik recommended doing this: foreach ($groups as $group_list){ echo $group_list; } Any eye openers? Thanks, -Scott On Thu, 14 Mar 2002, Erik Price wrote: Hm... have you tried using a loop to get their values, rather than using the numeric indexes? Like this: foreach ($choice as $array_element) { echo $array_element; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from multiple select
On Thursday, March 14, 2002, at 09:52 AM, Scott St. John wrote: Ok, how about a code snipet since I seem to be blind this morning. The select box code: select multiple=yes name=groups id=av ? $sql = select groupID,groupName from groups order by groupName; ... Any eye openers? Thanks, -Scott Sure! First go get a cup of coffee! :) Then change the first line to say this: select multiple=yes name=groups[] id=av Let me know how that works for you. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values from multiple select
On Thu, 14 Mar 2002, Erik Price wrote: Sure! First go get a cup of coffee! :) Then change the first line to say this: select multiple=yes name=groups[] id=av Let me know how that works for you. Erik- I don't do coffee, but the Iced Tea works just as well :) Thank you, all is well and my happy face is back on. I was missing the [], I had tried that before but had an error because I forgot to update my javascript code. Thanks everyone, -Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting values from multiple select
Hi gang- I am working on a javascript box that will allow the user to drag values from one select box to another. I will use this box to set the values. This is a standard, multiple select box. On the next page I need to figure out what PHP is doing with the data coming in. If I send 5 fields to the next page PHP will show me one when I echo the variable to the page. If I try to split the varaiable I still get only one value in the echo. Tried to reponse.write it in asp and I get the string with comma seperate values. Help! Thanks, -Scott -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting values inside PHP from outside script
thanks heaps mate. Chris Lambert [EMAIL PROTECTED] wrote in message 000c01c12e95$b217e600$6401a8c0@server">news:000c01c12e95$b217e600$6401a8c0@server... The easy ugly one line solution: $csvalues = explode(,, implode(, file(http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=. csv))) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Scott Mebberson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 26, 2001 9:04 PM Subject: [PHP] getting values inside PHP from outside script | Hi Guys, | | I want to write a script that retrieves quote prices off the ASX (Australian | Stock Exchange) and then adds it to the database. | | I think the only way I can do this is by using the yahoo finance query. | I need to know how I can call a string within my PHP script and then get the | results. The results are returned in a comma delimited format. Any ideas? | | use | http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv to | see the results. | | thanks | | Scott. | | | | -- | 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] | | | -- 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]
[PHP] getting values inside PHP from outside script
Hi Guys, I want to write a script that retrieves quote prices off the ASX (Australian Stock Exchange) and then adds it to the database. I think the only way I can do this is by using the yahoo finance query. I need to know how I can call a string within my PHP script and then get the results. The results are returned in a comma delimited format. Any ideas? use http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv to see the results. thanks Scott. -- 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] getting values inside PHP from outside script
The easy ugly one line solution: $csvalues = explode(,, implode(, file(http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=. csv))) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Scott Mebberson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 26, 2001 9:04 PM Subject: [PHP] getting values inside PHP from outside script | Hi Guys, | | I want to write a script that retrieves quote prices off the ASX (Australian | Stock Exchange) and then adds it to the database. | | I think the only way I can do this is by using the yahoo finance query. | I need to know how I can call a string within my PHP script and then get the | results. The results are returned in a comma delimited format. Any ideas? | | use | http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv to | see the results. | | thanks | | Scott. | | | | -- | 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] | | | -- 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]
[PHP] getting values from apache_lookup_uri()
I do $var apache_lookup_uri(file); echo $var['uri'] ; or anything else, I get nothing, so I do var_dump($var['uri']);//is Null but... var_dump($var);//everything is there? help -- 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] getting values from apache_lookup_uri()
$var apache_lookup_uri(file); What is your exact line? It obviously isn't that. Something like: $var = apache_lookup_uri(/path/file.html); should work just fine. You need to pass this function a URI. A URI being the part of a URL after the hostname but including the leading / -Rasmus -- 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]
[PHP] Getting values for posted form in HASH array rather than just variables.
SUBJECT: Getting values for posted form in HASH array rather than just variables. I've been using perl for a while and am just starting with PHP. I like it. Is there an array that holds all the information that was submitted via a FORM post or get. I know that PHP automatically creates variables that are named after the name of the INPUT tag on the HTML form. But what if I don't know what the names of the input tags are? Are they stored in a HASH array as well? What is the name of the array? I.E. in perl, if you use cgi-lib.pl, all the form elements are stored in a HASH array called %in. You don't need to know the names of the input tags to get the data from them. HTML HAS... input name="joe" type="text input name="alice type="text PERL Example. # library for handling CGI in require 'cgi-lib.pl'; # get all the info from the form, # put it in HASH array called %in ReadParse(); foreach $key (sort keys %in) { print $in{$key}; } PHP EXAMPLE... # is there a hash array equivalent of %in like in the perl above? === Matthew Toledo FrogNet Design Domain Management [EMAIL PROTECTED] -- 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] Getting values for posted form in HASH array rather than just variables.
On Tue, 20 Feb 2001 08:56, Matthew Toledo wrote: SUBJECT: Getting values for posted form in HASH array rather than just variables. I've been using perl for a while and am just starting with PHP. I like it. Is there an array that holds all the information that was submitted via a FORM post or get. I know that PHP automatically creates variables that are named after the name of the INPUT tag on the HTML form. But what if I don't know what the names of the input tags are? Are they stored in a HASH array as well? What is the name of the array? I.E. in perl, if you use cgi-lib.pl, all the form elements are stored in a HASH array called %in. You don't need to know the names of the input tags to get the data from them. HTML HAS... input name="joe" type="text input name="alice type="text PERL Example. # library for handling CGI in require 'cgi-lib.pl'; # get all the info from the form, # put it in HASH array called %in ReadParse(); foreach $key (sort keys %in) { print $in{$key}; } PHP EXAMPLE... # is there a hash array equivalent of %in like in the perl above? Check out the section of the manual on PHP Variables (in the Variables chapter 7) HTTP_POST_VARS and HTTP_GET_VARS will be the ones you are looking for - oh and possibly HTTP_COOKIE_VARS. -- David Robley| WEBMASTER Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- 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]