|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Tue Oct 29 2002 - 12:00:46 CST
php-general Digest 29 Oct 2002 18:00:46 -0000 Issue 1673
Topics (messages 121819 through 121914):
Re: Group by YEAR in date
121819 by: Faisal Abdullah
Re: Passing the variables ...
121820 by: Krzysztof Dziekiewicz
121823 by: Chris Hewitt
121867 by: Maxim Maletsky
File upload problem...
121821 by: David Russell
121829 by: Marek Kilimajer
public_html and httpd.conf
121822 by: Mukta Telang
121830 by: Marek Kilimajer
121858 by: John Nichel
121865 by: Maxim Maletsky
Re: Making string upper/lowercase with regex?
121824 by: Erwin
help/sesssssions !
121825 by: Shaun
$_FILES['userfile']['error'] is always 0 ! Why ???
121826 by: Jorge.Manuel.Silva.bportugal.pt
problem loading extension
121827 by: Simon Taylor
121831 by: Marek Kilimajer
121844 by: Frank W.
Re: fread & EOF
121828 by: Marek Kilimajer
expire
121832 by: Shaun
121837 by: Marek Kilimajer
find html links..
121833 by: Baroiller Pierre-Emmanuel
Another question
121834 by: Trasca Ion-Catalin
121836 by: Erwin
Re: standardization across apps?
121835 by: Alister
Re: Plus sign changing to space in html form
121838 by: Stan
121846 by: Stan
Re: Array Question
121839 by: Ford, Mike [LSS]
121847 by: Brent Baisley
121906 by: PHP List
back and forward through a result query
121840 by: Petre Agenbag
121841 by: Petre Agenbag
121850 by: Rick Emery
121851 by: Petre Agenbag
ImageCreateTrueColor background always gets black and JPEG vs. PNG color difference
121842 by: Wouter de Jong
121843 by: jla21.cornell.edu
121845 by: Wouter de Jong
121866 by: Rasmus Lerdorf
Problems getting error values in FILES superglobal.
121848 by: Jorge.Manuel.Silva.bportugal.pt
Multiple paths in safe_mode_exec_dir ?
121849 by: Andreas Nordvall
Yet another question
121852 by: Trasca Ion-Catalin
121859 by: Rick Emery
Flash and PHP?
121853 by: Neil
121855 by: John Wards
121868 by: Joseph Szobody
121869 by: Maxim Maletsky
121881 by: Neil
121883 by: Jay Blanchard
121885 by: Neil
121886 by: Jay Blanchard
Framed Redirect
121854 by: Martin Wright
121857 by: Adam Voigt
counting clicks on a flash ad
121856 by: Ben-Nes Yonatan
121860 by: Joel Boonstra
php form mail - checkbox problem
121861 by: Tine
121862 by: Rick Emery
121864 by: Tine
121871 by: Rick Emery
121905 by: Tine
strtotime no longer accepting many dates?
121863 by: David
Select values in an array???
121870 by: Craig
121872 by: John Nichel
121873 by: Rick Emery
121874 by: Rick Emery
121875 by: John Nichel
121876 by: Rick Emery
121877 by: Craig
121878 by: John Nichel
121879 by: Rick Emery
121880 by: . Edwin
121882 by: John Nichel
121887 by: Rick Emery
121888 by: Rick Emery
121889 by: Ford, Mike [LSS]
121890 by: . Edwin
121893 by: Rick Emery
121894 by: John Nichel
121895 by: John Nichel
121898 by: . Edwin
Re: preg_replace (underscore)
121884 by: Shawn McKenzie
Re: Smarty functions help
121891 by: Daniel Masson
Re: Just curious about Mod_SSL and Apache.
121892 by: Scott Fletcher
Getting Apache (SSL) to start without typing in passphrase
121896 by: Scott Fletcher
searching an array
121897 by: Davíđ Örn Jóhannsson
121899 by: John Nichel
121900 by: . Edwin
unique id
121901 by: Edward Peloke
121909 by: 1LT John W. Holmes
need php help $$
121902 by: rhodespc.telerama.com
PHP XML mailing list
121903 by: Chris Boget
Regex Help
121904 by: Gerard Samuel
.inc files doubles up
121907 by: Tine
121908 by: Tine
121910 by: Martin Hudec
121912 by: Tine
POST-ing or GET-ing an array
121911 by: Petre Agenbag
121913 by: Sascha Cunz
121914 by: Petre Agenbag
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Thanks guys.
It worked.
Regards,
Faisal
> -----Original Message-----
> From: 1LT John W. Holmes [mailto:holmes072000
charter.net]
> Sent: Monday, October 28, 2002 10:17 PM
> To: Faisal Abdullah; php-general
lists.php.net
> Subject: Re: [PHP] Group by YEAR in date
>
>
> > I have a table (postgres), with a date field (yyyy-mm-dd). How
> do I group
> by
> > year?
> >
> > 'select sum(profit) from loan group by apply_date' would group
> by the DAY,
> > not year.
>
> SELECT SUM(profit) FROM load GROUP BY YEAR(apply_date)
>
> ---John Holmes...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________
attached mail follows:
> [snip]
>> I tried using echo($_GET['$textbox']) instead of printf statement in
>> hello.php..
> [/snip]
> Try $_POST['textbox'] instead. (You were using "method=post".)
... or $HTTP_POST_VARS['textbox']
-- Krzysztof Dziekiewicz
attached mail follows:
Mukta Telang wrote:
>I tried using echo($_GET['$textbox']) instead of printf statement in > As the name of your textbox is "textbox" not "$textbox", use $_GET['textbox'] instead.
HTH Chris
attached mail follows:
Ever since PHP 4.2.0 (in PHP v4.1.0 it was not default yet) you need to access the value in variable $textbox via $_POST variable:
printf("<BR>hello %s!",$_POST['textbox']);
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Mukta Telang <mukta
darya.nio.org> wrote... :
> I have written followong code in hello.html: > > <HTML> > <HEAD> > </HEAD> > <BODY> > <FORM ACTION=hello.php METHOD=POST> > <B>enter your name:</B> > <INPUT TYPE=TEXTAREA NAME=textbox> > <INPUT TYPE=SUBMIT> > </FORM> > </BODY> > </HTML> > > and following in hello.php: > > <HTML> > <HEAD> > </HEAD> > <BODY> > <?php > printf("<BR>hello %s!",$textbox); > ?> > </BODY> > </HTML> > > > This script works fine with php in redhat 7.2 system > but does not work in solaris 7 ! > > I have done the php installation... > > apache version: 2.0.40 > php version: 4.2.2 > > What are the chances that the problem is with the php-installation? > ( I had to copy code from apache2filter directory of pre 4.3 version of > php to remove errors during make ) > > I tried using echo($_GET['$textbox']) instead of printf statement in > hello.php.. > > > What could be the problem?? > Please help!! > mukta > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hi all,
I have a form with a file upload section. The target script contains the following:
if (is_uploaded_file($_FILES['newuserfile']['tmp_name'])) { AddAttachment($BPFNo, $newuserfile, $newuserfile_name, $newuserfile_size, $newuserfile_type); }
AddAttachment() is an included function which works elsewhere.
When running this, I get the following error: Notice: Undefined index: newuserfile in c:\webpages\intranet\htmlroot\optimiza\bpf\updatebpf.php on line 77
And obviously, the attachment is not added.
Where can I look for info on the $_FILES global array, and start narrowing down the problem.
One caveat - I currently have no internet access (e-mail only). Could people please e-mail me information especially if they want to include links to relevant websites.
Thanks
David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250
Fax: +2711 444-7256
e-mail: DavidR
BarloworldOptimus.com
web: www.BarloworldOptimus.com
attached mail follows:
Try print_r($_FILES) and see if you really get what you should. And also check if you have your form set as <form enctype="multipart/form-data" action=" url " method="POST">
David Russell wrote:
>Hi all,
>
>I have a form with a file upload section. The target script contains the
>following:
>
> if (is_uploaded_file($_FILES['newuserfile']['tmp_name'])) {
> AddAttachment($BPFNo, $newuserfile, $newuserfile_name,
>$newuserfile_size, $newuserfile_type);
> }
>
>AddAttachment() is an included function which works elsewhere.
>
>When running this, I get the following error:
>Notice: Undefined index: newuserfile in
>c:\webpages\intranet\htmlroot\optimiza\bpf\updatebpf.php on line 77
>
>And obviously, the attachment is not added.
>
>Where can I look for info on the $_FILES global array, and start
>narrowing down the problem.
>
>One caveat - I currently have no internet access (e-mail only). Could
>people please e-mail me information especially if they want to include
>links to relevant websites.
>
>Thanks
>
>David Russell
>IT Support Manager
>Barloworld Optimus (Pty) Ltd
>Tel: +2711 444-7250
>Fax: +2711 444-7256
>e-mail: DavidR
BarloworldOptimus.com
>web: www.BarloworldOptimus.com
>
>
>
>
attached mail follows:
Hi, All the (php) files that I create under public_html directory are visible to all users...is there anything like "private_html" where I could test my code and it will not be visible to all except me?! I am using php in solaris... mukta
attached mail follows:
You can use .htaccess file to restrict access to a directory (if you are allowed to do it). And about as much safe and much simpler is to make a secret directory that noone knows about.
Mukta Telang wrote:
>Hi, >All the (php) files that I create under public_html directory >are visible to all users...is there anything like "private_html" >where I could test my code and it will not be visible to all except me?! > I am using php in solaris... >mukta > > > > >
attached mail follows:
.htaccess
Mukta Telang wrote: > Hi, > All the (php) files that I create under public_html directory > are visible to all users...is there anything like "private_html" > where I could test my code and it will not be visible to all except me?! > I am using php in solaris... > mukta > > >
attached mail follows:
password-protect it :)
it is not PHP question
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Mukta Telang <mukta
darya.nio.org> wrote... :
> Hi, > All the (php) files that I create under public_html directory > are visible to all users...is there anything like "private_html" > where I could test my code and it will not be visible to all except me?! > I am using php in solaris... > mukta > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Leif K-Brooks wrote: > I need a way to make a string be replaced with its uppercase version > using ereg_replace. Any ideas?
> Chris Shiflett wrote: > >> Why must you use ereg_replace? >> >> Does your question mean that you, for whatever reason, cannot use >> strtoupper() instead? >>
>> Leif K-Brooks wrote: >>> I don't want the entire string upercase, just part of it as defined >>> by a regex.
Then use preg_replace. The PHP website has an example to uppercase a part of a string using preg_replace(http://www.php.net/preg_replace).
Erwin
attached mail follows:
Hi ,
I`m making a website where users login. After the login is successfull, the session starts, and keeps the username and password in a PHPSESSID cookie.
Question:
When the user leaves the sercure.php(page after login) page (to go to another page like another website or to a home page link) , i want the site to prompt user to tell him the session will end. How do i do this.
next, i want to kill the user`s session when it is inactive for say 2min , how do i do this?
Thanks , Shaun
attached mail follows:
Hi,
I'm doing HTTP file upload but I'm having a problem where "$_FILES ['userfile']['error']" is always 0. Even if I press the stop button or close the broser window where the upload is occuring it's always 0. This results in truncated files.
Why ? What could be happening ?
Is there any other way I can use to identify truncated files in uploads ? I'm so desperate that I've been looking at "content-length"...
I'm running RH 7.3 with PHP 4.2.2.
Thanks in advance,
Jorge.
attached mail follows:
Hi All, I have just been trying to add some more extensions to my site, I have copied the dll's for the extensions I wish to add to my extensions dir and uncommented them in my php.ini. This worked fine for all of them which include ctype, gd etc. , except for the xslt extension which will just not work for me... I am getting this message. PHP Warning: Unable to load dynamic library 'C:\PHP\dll\./php_xslt.dll' - The specified module could not be found. in Unknown on line 0 The file is most definitely there and if I move one of the other extension files I get the same message for them, not sure what I am doing wrong. Any ideas appreciated. Thanks _____________________________________ Simon Taylor AfriTol (Pty) Ltd.
attached mail follows:
don't know much about windows, but isn't the problem in the "./" part? Can you remove it?
Simon Taylor wrote:
>Hi All, >I have just been trying to add some more extensions to my site, I have >copied the dll's for the extensions I wish to add to my extensions dir and >uncommented them in my php.ini. >This worked fine for all of them which include ctype, gd etc. , except for >the xslt extension which will just not work for me... I am getting this >message. >PHP Warning: Unable to load dynamic library 'C:\PHP\dll\./php_xslt.dll' - >The specified module could not be found. in Unknown on line 0 >The file is most definitely there and if I move one of the other extension >files I get the same message for them, not sure what I am doing wrong. >Any ideas appreciated. >Thanks >_____________________________________ >Simon Taylor >AfriTol (Pty) Ltd. > > >
attached mail follows:
there should be something like: extension_dir = "C:\PHP\extensions" in your php.ini
Simon Taylor wrote:
> Hi All, > I have just been trying to add some more extensions to my site, I have > copied the dll's for the extensions I wish to add to my extensions dir and > uncommented them in my php.ini. > This worked fine for all of them which include ctype, gd etc. , except for > the xslt extension which will just not work for me... I am getting this > message. > PHP Warning: Unable to load dynamic library 'C:\PHP\dll\./php_xslt.dll' - > The specified module could not be found. in Unknown on line 0 > The file is most definitely there and if I move one of the other extension > files I get the same message for them, not sure what I am doing wrong. > Any ideas appreciated. > Thanks > _____________________________________ > Simon Taylor > AfriTol (Pty) Ltd. >
attached mail follows:
Would not be closing the conection in the perl script enough?
Martin Adler wrote:
>Hi,
>
>this php-script should read from a server (that i've written in perl) until
>it receives the EOF signal.
>My server sends the EOF-signal by
>print $client "\n\004"; # \004 = EOF
>to my script but fread wouldn't stop reading
>and i don't have any ideas why.
>Is php using an other sign for EOF?
>
>
>------ php script - client
>
><?
>$server = 'myserver';
>$command = "some commands";
>?>
>
><html>
> <head>
> <title></title>
> </head>
><body marginwidth="30" marginheight="30">
>
><table width="40%" cellpadding="4" cellspacing="2">
><tr>
> <td bgcolor="#c0c0ff" valign="top">Sende Kommando:</td>
> <td bgcolor="#99ff99" valign="top"><? $fd = fsockopen($server, 2202,
>&$errno,
>&$errstr, 30); echo $command;?></td>
></tr>
><tr>
> <td bgcolor="#c0c0ff" valign="top">Erhaltene Daten:</td>
> <td bgcolor="#99ff99" valign="top">
><?
>echo nl2br(fread($fd, 2048));
>fputs($fd, "$command\n\004");
>fclose($fd);
>?>
></td>
></tr>
></table>
>
></body>
></html>
>
>
>------ perl script - server
>
>#!/usr/bin/perl -w
>
>use IO::Socket;
># set record seperator to EOF
>$/ = "\004";
>$sock_port = 2202;
>
>$sock = IO::Socket::INET->new(LocalPort => $sock_port,
> Type => SOCK_STREAM,
> Reuse => 1,
> Listen => 10) # oder SOMAXCONN
> or die "can't create local socket: $
\n";
>
>while($client = $sock->accept()) {
> print $client "some output \n";
> # terminate client-reading by sending EOF
> print $client "\n\004";
>
> chomp($rec = <$client>);
> # do something with $rec
> $client->close();
>}
>
>$sock->close();
>
>
>
>
>
>
attached mail follows:
hi,
i asked this before , but how do i end a session when a person changes from my secure site to another site.
eg.MY page is secure.php(you have to login to get here) what is the user types in www.php.net at url, then the session will still go on , by i want it to end !
Thanx ,shaun
attached mail follows:
You may session_destroy() on other pages you have control of, but there is no way of finding out that the user has left your page and then came back (maybe you can play with onunload body tag, but it will be a pain for you to implement and also for the user). Alse check *session_set_cookie_params* function.
Shaun wrote:
>hi, > >i asked this before , but how do i end a session when a person changes from >my secure site to another site. > >eg.MY page is secure.php(you have to login to get here) >what is the user types in www.php.net at url, then the session will still go >on , by i want it to end ! > >Thanx ,shaun > > > > >
attached mail follows:
Hi... I'm looking for a preg_match regular expression to find all href tags into a text field... can someone help me?? I've tried a lot of regexp but... nothing work correctly...
I can't get all matching href ( such as <a href='xxx'></a> or < a href="xx"></a> , ... ) any idea?
cheers.. P.E
attached mail follows:
If I have a page with frames, how can I get the title of the frameset to be the title of the main frame? I want this title to change every time the visitor change the page. Any help?
-- Trasca Ion-Catalin
attached mail follows:
Trasca Ion-Catalin wrote: > If I have a page with frames, how can I get the title of the frameset > to be the title of the main frame? I want this title to change every > time the visitor change the page. > Any help?
That doesn't have anything to do with PHP, but...
you can use JavaScript, something like
top.document.title = 'Title'
or
document.title = 'Title'
I'm not exactly sure which one (if any) of these works, but it's something like this...
Grtz Erwin
attached mail follows:
On Tue, 29 Oct 2002 00:14:06 -0500
taylor <taylor
justaddfire.com> wrote:
> i might be crazy, but why don't the many CMS, forum, link directory, > etc packages integrate with a unified user manager? > is this possible? is there perhaps an xml standard for contact > datatypes that could be used?
There is a system in PEAR that does that - and I think if they can really get it right - and get it widely used, it will be a killer tool - avoiding all the problems you say. XML is, I think, the wrong tool for this job though.
As others have said, making better use of classes to package up applications, even if it means that a program is just a very thin layer that calls the class, would also be incredibly useful - if they just dump output to screen - or use one common template solution (like http://Smarty.php.net). then programmers (like me) could really take different systems and with some very simple configuration, they would just all work together, and without having to write inside a particular framework, like phpNuke or Horde.
Alister
attached mail follows:
I dont know how to see the http request. tcpdump on FreeBSD requires read access to /dev/bpf0 which i dont have.
Different browsers works the same.
>"Chris Shiflett" <chris
shiflett.org> wrote in message
news:3DBDE88B.7010009
shiflett.org...
> This is true, but the + itself should also be encoded.
>
> I did a quick test, and when I post a form variable called test with a
> value of 1+1=2, the HTTP request looks like this:
>
> POST /test.php HTTP/1.1
> Host: 127.0.0.1
> User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916
> Accept:
>
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
> Accept-Language: en
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> Keep-Alive: 300
> Connection: keep-alive
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 14
>
> test=1%2B1%3D2
>
> So, that %2B would have to get decoded twice to result in a space.
>
> Stan, do you have a way to see what the HTTP request is? You mention
> being on a BSD box, so I assume you have tcpdump? Also, is this behavior
> consistent with different browsers?
>
> Chris
>
> John W. Holmes wrote:
>
> >The plus sign is used to signify a space in some URL encoding. PHP is
> >probably thinking the text is encoded and it's removing the plus sign.
> >Not sure on a solution.
> >
> >---John Holmes...
> >
> >>-----Original Message-----
> >>From: Stan [mailto:stann
pobox.sk]
> >>Sent: Monday, October 28, 2002 6:27 PM
> >>To: php-general
lists.php.net
> >>Subject: [PHP] Plus sign changing to space in html form
> >>
> >>When i post a string containing plus sign with htmp form to a php
scritp,
> >>
> >>
> >>the '+' is changed to space. e.g: i enter 'as+df' to a text input but
$_POST[] returns 'as df' instead.
> >>
> >>
> >>It must be in php or apache configuration bcause i have this problem
only
> >>
> >>
> >>on sytem with FreeBSD. On windows it works as expected.
> >>
> >>Know someone how could i make the '+' left intact? Please help.
> >>
> >>
> >><?
> >>echo $_POST['test'];
> >>?>
> >><form actiom='test.php' method=POST>
> >><input type=text value='' name=test>
> >><input type=submit value='submit'>
> >></form>
> >>
>
attached mail follows:
When i enter 1%2B1%3D2 to the input form and submit, the result is 1+1=2
It looks like the http request received by php is not "application/x-www-form-urlencoded" but php thinks that it is. I dont know what to think about that.
"Chris Shiflett" <chris
shiflett.org> wrote in message
news:3DBDE88B.7010009
shiflett.org...
> This is true, but the + itself should also be encoded.
>
> I did a quick test, and when I post a form variable called test with a
> value of 1+1=2, the HTTP request looks like this:
>
> POST /test.php HTTP/1.1
> Host: 127.0.0.1
> User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916
> Accept:
>
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
> Accept-Language: en
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> Keep-Alive: 300
> Connection: keep-alive
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 14
>
> test=1%2B1%3D2
>
> So, that %2B would have to get decoded twice to result in a space.
>
> Stan, do you have a way to see what the HTTP request is? You mention
> being on a BSD box, so I assume you have tcpdump? Also, is this behavior
> consistent with different browsers?
>
> Chris
>
> John W. Holmes wrote:
>
> >The plus sign is used to signify a space in some URL encoding. PHP is
> >probably thinking the text is encoded and it's removing the plus sign.
> >Not sure on a solution.
> >
> >---John Holmes...
> >
> >>-----Original Message-----
> >>From: Stan [mailto:stann
pobox.sk]
> >>Sent: Monday, October 28, 2002 6:27 PM
> >>To: php-general
lists.php.net
> >>Subject: [PHP] Plus sign changing to space in html form
> >>
> >>When i post a string containing plus sign with htmp form to a php
scritp,
> >>
> >>
> >>the '+' is changed to space. e.g: i enter 'as+df' to a text input but
$_POST[] returns 'as df' instead.
> >>
> >>
> >>It must be in php or apache configuration bcause i have this problem
only
> >>
> >>
> >>on sytem with FreeBSD. On windows it works as expected.
> >>
> >>Know someone how could i make the '+' left intact? Please help.
> >>
> >>
> >><?
> >>echo $_POST['test'];
> >>?>
> >><form actiom='test.php' method=POST>
> >><input type=text value='' name=test>
> >><input type=submit value='submit'>
> >></form>
> >>
>
attached mail follows:
> -----Original Message-----
> From: PHP List [mailto:php_list
ibcnetwork.net]
> Sent: 28 October 2002 22:48
> To: php
> Subject: [PHP] Array Question
>
>
> Hi,
> Lets say I have a simple array like this:
> $myarray = array("a"=>"b","d"=>"c");
>
> echo $myarray[0] will return 'b';
>
> How can I get the name of the index? so:
I'd suggest a look at array_keys() (http://www.php.net/manual/en/function.array-keys.php). Seems to be the nearest to what you want.
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: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Perhaps you want to look at array_keys().
On Monday, October 28, 2002, at 05:48 PM, PHP List wrote:
> How can I get the name of the index?
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577
attached mail follows:
No, array_keys does not do what I want, in order to user array_keys, it assumes I know the value of the key, but I don't, I want to get the value of the key but all I know is the index.
> Perhaps you want to look at array_keys(). > > On Monday, October 28, 2002, at 05:48 PM, PHP List wrote: > > > How can I get the name of the index? > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology Environments > p: 212.759.6400/800.759.0577 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hi I need to do the following, and have a slight idea of how to do it, but I'm not sure...
I want to do a "select id from table where something = "whatever" ", then I will display all the "hits" from that query as links to a "display" page, sending along the id's of the row.
On that next page, I will use that id to retrieve the relevant data to display for that specific record, but, I want to have a previous|next function, that will display the relevant data of the previous or next record as was displayed on the original page that showed the list of "hits". So I *think* I should create an array containing all the id's of that query, and send it along with the clickthrough to the "display" page and then from there use the array functions "next" and "prev" to get the id's directly adjacent to the one I currently have, but I'm not sure if this is the best way to do it, for one, I don't know how to put those id's into an array from the original query, and two, don't know how to tell it to "get prev of current id from array" or "get next of current id from array". And I think it might be a bit of an unnecessary overhead to send that entire array via GET to the display page if you are only ever going to use 2 values from it, so It would make much more sense to me to pass the current id, the next id and the previous id for each "hit" along to the "display" page.
Any ideas on how I could do that?
Thanks
attached mail follows:
PS, also, I would need to know and handle the beginning and end of that array, ie, if there isn't a next or previous, I wouldn't want to display a next or forward button, or maybe disable it...
Thanks
On Tue, 2002-10-29 at 14:06, Petre Agenbag wrote: > Hi > I need to do the following, and have a slight idea of how to do it, but > I'm not sure... > > I want to do a "select id from table where something = "whatever" ", > then I will display all the "hits" from that query as links to a > "display" page, sending along the id's of the row. > > On that next page, I will use that id to retrieve the relevant data to > display for that specific record, but, I want to have a previous|next > function, that will display the relevant data of the previous or next > record as was displayed on the original page that showed the list of > "hits". So I *think* I should create an array containing all the id's of > that query, and send it along with the clickthrough to the "display" > page and then from there use the array functions "next" and "prev" to > get the id's directly adjacent to the one I currently have, but I'm not > sure if this is the best way to do it, for one, I don't know how to put > those id's into an array from the original query, and two, don't know > how to tell it to "get prev of current id from array" or "get next of > current id from array". And I think it might be a bit of an unnecessary > overhead to send that entire array via GET to the display page if you > are only ever going to use 2 values from it, so It would make much more > sense to me to pass the current id, the next id and the previous id for > each "hit" along to the "display" page. > > Any ideas on how I could do that? > > Thanks > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
This is a common requirement; check the archives and/or php.net, phpbuilder, etc.
What you will do is use mysql's LIMIT parameter on your select; go to mysql.com to read about it. Lets assume you wish to display 20 lines per page; assume you use a pointer, $ptr, to determine where you are in a search:
$query = "SELECT * FROM mytable WHERE some criteria LIMIT $ptr,20"; mysql_query($query) or die(mysql_error());
To go to the next page, create a hyperlink: $ptrN = $ptr + 20; <A href="this_script.php?ptr=$ptrN">Next</A> $ptrP = $ptr - 20; <A href="this_script.php?ptr=$ptrP>Previous</A>
I leave the details to you.
----- Original Message -----
From: "Petre Agenbag" <internet
vsa.co.za>
To: <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 6:06 AM
Subject: [PHP] back and forward through a result query
Hi I need to do the following, and have a slight idea of how to do it, but I'm not sure...
I want to do a "select id from table where something = "whatever" ", then I will display all the "hits" from that query as links to a "display" page, sending along the id's of the row.
On that next page, I will use that id to retrieve the relevant data to display for that specific record, but, I want to have a previous|next function, that will display the relevant data of the previous or next record as was displayed on the original page that showed the list of "hits". So I *think* I should create an array containing all the id's of that query, and send it along with the clickthrough to the "display" page and then from there use the array functions "next" and "prev" to get the id's directly adjacent to the one I currently have, but I'm not sure if this is the best way to do it, for one, I don't know how to put those id's into an array from the original query, and two, don't know how to tell it to "get prev of current id from array" or "get next of current id from array". And I think it might be a bit of an unnecessary overhead to send that entire array via GET to the display page if you are only ever going to use 2 values from it, so It would make much more sense to me to pass the current id, the next id and the previous id for each "hit" along to the "display" page.
Any ideas on how I could do that?
Thanks
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Rick, thanks, I will check the lists, but I'm not sure that will resolve my problem, I don't want to limit the display in the initial result set, I want to have a page that lists ALL the hits above each other, and it's only once you click through to the next page that I want to start "walking" through the list.
Anyway, I might be missing the point you are trying to make her, so I will first go and do some research before I ask a bunch of questions you have already answered for me...
Ta
On Tue, 2002-10-29 at 15:33, Rick Emery wrote:
> This is a common requirement; check the archives and/or php.net, phpbuilder, etc.
>
> What you will do is use mysql's LIMIT parameter on your select; go to mysql.com to read
> about it.
> Lets assume you wish to display 20 lines per page; assume you use a pointer, $ptr, to
> determine where you are in a search:
>
> $query = "SELECT * FROM mytable WHERE some criteria LIMIT $ptr,20";
> mysql_query($query) or die(mysql_error());
>
> To go to the next page, create a hyperlink:
> $ptrN = $ptr + 20;
> <A href="this_script.php?ptr=$ptrN">Next</A>
> $ptrP = $ptr - 20;
> <A href="this_script.php?ptr=$ptrP>Previous</A>
>
> I leave the details to you.
>
> ----- Original Message -----
> From: "Petre Agenbag" <internet
vsa.co.za>
> To: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 6:06 AM
> Subject: [PHP] back and forward through a result query
>
>
> Hi
> I need to do the following, and have a slight idea of how to do it, but
> I'm not sure...
>
> I want to do a "select id from table where something = "whatever" ",
> then I will display all the "hits" from that query as links to a
> "display" page, sending along the id's of the row.
>
> On that next page, I will use that id to retrieve the relevant data to
> display for that specific record, but, I want to have a previous|next
> function, that will display the relevant data of the previous or next
> record as was displayed on the original page that showed the list of
> "hits". So I *think* I should create an array containing all the id's of
> that query, and send it along with the clickthrough to the "display"
> page and then from there use the array functions "next" and "prev" to
> get the id's directly adjacent to the one I currently have, but I'm not
> sure if this is the best way to do it, for one, I don't know how to put
> those id's into an array from the original query, and two, don't know
> how to tell it to "get prev of current id from array" or "get next of
> current id from array". And I think it might be a bit of an unnecessary
> overhead to send that entire array via GET to the display page if you
> are only ever going to use 2 values from it, so It would make much more
> sense to me to pass the current id, the next id and the previous id for
> each "hit" along to the "display" page.
>
> Any ideas on how I could do that?
>
> Thanks
>
>
>
>
>
> --
> 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
>
attached mail follows:
Hi,
Could anyone tell why my background colors with ImageCreateTrueColor() are becoming black ?
I use the following script:
<?php
Header("Content-type: image/png");
$im =
ImageCreateTrueColor(120, 50)
or die ("Cannot Initialize new GD image stream!");
$background_color = ImageColorAllocate($im,255,255,100);
$text_color = ImageColorAllocate($im,233,14,91);
ImageString($im,1,5,5,"A Simple Text String",$text_color);
ImagePNG($im);
ImageDestroy($im);
?>
If I use ImageCreate(), the color becomes yellow as expected.
This is with GD 2.0.4 (conf-opts: http://s003.widexs.nl/phpinfo.php)
Any help appreciated :)
Another question:
Is it correct that JPEG images are showing up very ugly compared to the same code with PNG?
See http://s003.widexs.nl/gd-test-png.php and http://s003.widexs.nl/gd-test-jpeg.php
The source is the above code, but with ImageCreate() instead of ImageCreateTrueColor(), and with jpeg instead of png for the gd-test-jpeg.php script.
-- Met vriendelijke groet/With kind regards,Wouter de Jong System-Administrator
CABLE & WIRELESS Delivering the Internet promise(tm) URL: http://www.widexs.nl
Email: Wouter.deJong
cw.com Tel: +31 (0) 23 5698070 Fax: +31 (0) 23 5698099
*************************************************************************************** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. ***************************************************************************************
attached mail follows:
From the gd manual at boutell.com:
Truecolor images are always filled with black at creation time. There is no concept of a "background" color index.
I suppose you'll have to use a function like imagefill to get your yellow background.
-Josh
On Tue, 29 Oct 2002, Wouter de Jong wrote:
> Hi,
>
> Could anyone tell why my background colors with
> ImageCreateTrueColor() are becoming black ?
>
> I use the following script:
>
> <?php
> Header("Content-type: image/png");
> $im =
ImageCreateTrueColor(120, 50)
> or die ("Cannot Initialize new GD image stream!");
> $background_color = ImageColorAllocate($im,255,255,100);
> $text_color = ImageColorAllocate($im,233,14,91);
> ImageString($im,1,5,5,"A Simple Text String",$text_color);
> ImagePNG($im);
> ImageDestroy($im);
> ?>
>
> If I use ImageCreate(), the color becomes yellow as expected.
>
> This is with GD 2.0.4 (conf-opts: http://s003.widexs.nl/phpinfo.php)
>
> Any help appreciated :)
>
> Another question:
>
> Is it correct that JPEG images are showing up very ugly compared to the
> same code with PNG?
>
> See http://s003.widexs.nl/gd-test-png.php and
> http://s003.widexs.nl/gd-test-jpeg.php
>
> The source is the above code, but with ImageCreate() instead of
> ImageCreateTrueColor(), and with jpeg instead of png for the
> gd-test-jpeg.php script.
>
> --
> Met vriendelijke groet/With kind regards,
>
> Wouter de Jong
> System-Administrator
>
> CABLE & WIRELESS
> Delivering the Internet promise(tm)
> URL: http://www.widexs.nl
>
> Email: Wouter.deJong
cw.com
> Tel: +31 (0) 23 5698070
> Fax: +31 (0) 23 5698099
>
>
> ***************************************************************************************
> This message may contain information which is confidential or privileged.
> If you are not the intended recipient, please advise the sender immediately
> by reply e-mail and delete this message and any attachments without retaining a copy.
> ***************************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
On Tue, Oct 29, 2002 at 07:51:21AM -0500, jla21
cornell.edu wrote:
> >From the gd manual at boutell.com:
Hmm, that was one place I didn't look at :( *stupid*
> Truecolor images are always filled with black at creation time. There is > no concept of a "background" color index. > > I suppose you'll have to use a function like imagefill to get your yellow > background.
Thanks,
This works idd. :) > -Josh
-- Met vriendelijke groet/With kind regards,Wouter de Jong System-Administrator
CABLE & WIRELESS Delivering the Internet promise(tm) URL: http://www.widexs.nl
Email: Wouter.deJong
cw.com Tel: +31 (0) 23 5698070 Fax: +31 (0) 23 5698099
*************************************************************************************** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. ***************************************************************************************
attached mail follows:
You have to fill in the background yourself with an ImageRectangle call. For truecolor images the first colour allocated is no longer the default background colour.
-Rasmus
On Tue, 29 Oct 2002, Wouter de Jong wrote:
> Hi,
>
> Could anyone tell why my background colors with
> ImageCreateTrueColor() are becoming black ?
>
> I use the following script:
>
> <?php
> Header("Content-type: image/png");
> $im =
ImageCreateTrueColor(120, 50)
> or die ("Cannot Initialize new GD image stream!");
> $background_color = ImageColorAllocate($im,255,255,100);
> $text_color = ImageColorAllocate($im,233,14,91);
> ImageString($im,1,5,5,"A Simple Text String",$text_color);
> ImagePNG($im);
> ImageDestroy($im);
> ?>
>
> If I use ImageCreate(), the color becomes yellow as expected.
>
> This is with GD 2.0.4 (conf-opts: http://s003.widexs.nl/phpinfo.php)
>
> Any help appreciated :)
>
> Another question:
>
> Is it correct that JPEG images are showing up very ugly compared to the
> same code with PNG?
>
> See http://s003.widexs.nl/gd-test-png.php and
> http://s003.widexs.nl/gd-test-jpeg.php
>
> The source is the above code, but with ImageCreate() instead of
> ImageCreateTrueColor(), and with jpeg instead of png for the
> gd-test-jpeg.php script.
>
> --
> Met vriendelijke groet/With kind regards,
>
> Wouter de Jong
> System-Administrator
>
> CABLE & WIRELESS
> Delivering the Internet promise(tm)
> URL: http://www.widexs.nl
>
> Email: Wouter.deJong
cw.com
> Tel: +31 (0) 23 5698070
> Fax: +31 (0) 23 5698099
>
>
> ***************************************************************************************
> This message may contain information which is confidential or privileged.
> If you are not the intended recipient, please advise the sender immediately
> by reply e-mail and delete this message and any attachments without retaining a copy.
> ***************************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
I'm resending this because I don't see the message in the "archive". Sorry if you're getting the message for the second time.
Jorge.
----- Forwarded by Jorge Manuel Silva/doi/ep/bportugal on 29-10-2002 13:23
-----
Jorge.Manuel.Silva
bp
ortugal.pt To: php-general
lists.php.net
cc:
28-10-2002 18:53 Subject: [PHP] $_FILES['userfile']['error'] is always 0 ! Why ???
Hi,
I'm doing HTTP file upload but I'm having a problem where "$_FILES ['userfile']['error']" is always 0. Even if I press the stop button or close the broser window where the upload is occuring it's always 0. This results in truncated files.
Why ? What could be happening ?
Is there any other way I can use to identify truncated files in uploads ? I'm so desperate that I've been looking at "content-length"...
I'm running RH 7.3 with PHP 4.2.2.
Thanks in advance,
Jorge.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi,
Is there any good reason why one is not able to use a colon separated path, in safe_mode_exec_dir, in a similar fashion to the include_path and safe_mode_include_dir directives?
Can the problem be solved in any other way than duplicated executables or ugly symlinks?
--Best regards Andreas
attached mail follows:
It's posible to call a variable from another file?
-- Trasca Ion-Catalin
attached mail follows:
Store it in a session variable or a cookie.
----- Original Message -----
From: "Trasca Ion-Catalin" <tic2000
home.ro>
To: <>
Sent: Tuesday, October 29, 2002 8:05 AM
Subject: [PHP] Yet another question
It's posible to call a variable from another file?
-- Trasca Ion-Catalin-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Does anyone use this?
attached mail follows:
On Tuesday 29 Oct 2002 2:06 pm, Neil wrote: > Does anyone use this?
Yes
next question..................
attached mail follows:
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html
http://www.phpbuilder.com/columns/hill20011214.php3
"Neil" <nlaker
jbennett.co.uk> wrote in message news:20021029140955.29707.qmail
pb1.pair.com...
> Does anyone use this?
>
>
attached mail follows:
In thousands.
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
"Neil" <nlaker
jbennett.co.uk> wrote... :
> Does anyone use this? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Thanks for the links, what I'm looking for is a simple form that communicates with a .php file on IIS 5 and then emails back to a e-mail address. Any help? (I have created the form with variables just need help with the .php)
Thanks again
"Joseph Szobody" <jszobody
excite.com> wrote in message
news:20021029151802.85671.qmail
pb1.pair.com...
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html
http://www.phpbuilder.com/columns/hill20011214.php3
"Neil" <nlaker
jbennett.co.uk> wrote in message
news:20021029140955.29707.qmail
pb1.pair.com...
> Does anyone use this?
>
>
attached mail follows:
[snip] Thanks for the links, what I'm looking for is a simple form that communicates with a .php file on IIS 5 and then emails back to a e-mail address. Any help? (I have created the form with variables just need help with the .php) [/snip]
Let me understand, you want a Flash form that submits variables to a PHP page which will then e-mail something to an e-mail address? And Flash is needed why?
Jay
attached mail follows:
The entire site is flash.
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:001801c27f63$3a40a480$8102a8c0
000347D72515...
> [snip]
> Thanks for the links, what I'm looking for is a simple form that
> communicates with a .php file on IIS 5 and then emails back to a e-mail
> address. Any help? (I have created the form with variables just need help
> with the .php)
> [/snip]
>
> Let me understand, you want a Flash form that submits variables to a PHP
> page which will then e-mail something to an e-mail address? And Flash is
> needed why?
>
> Jay
>
>
attached mail follows:
[snip] The entire site is flash. [/snip]
So, are you asking for someone here to write the PHP for you? Or are you asking for the list to find you a set of pre-made scripts that work in every situation? I see that you have been pointed to multiple tutorials for working with Flash and PHP. I also see that your original e-mail and subsequent follow-ups have asked really broad questions. Have you done any of the research? Have you attempted any of the tutorials? How long have you been a developer? Can you show us any code?
Jay
attached mail follows:
I'm new to PHP :(
Can someone either give me a hint on how to achieve a framed redirect or point me somewhere where someone does?
I have looked around at the obvious (?, well to me!) sites and drawn a blank. I've found how to do it in Vbscript - but that's neither what I need or am headed :)
-- Martin
attached mail follows:
What do you mean framed redirect? If you mean make frame go to a different url, just use javascript. If you mean make a link target a frame, just use target= in the a href.
On Tue, 2002-10-29 at 09:11, Martin Wright wrote: > I'm new to PHP :( > > Can someone either give me a hint on how to achieve a framed redirect or > point me somewhere where someone does? > > I have looked around at the obvious (?, well to me!) sites and drawn a > blank. I've found how to do it in Vbscript - but that's neither what I > need or am headed :) > > -- > Martin > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hi all!
in the current site that im building there are flash banners for advertisment. now the owner of the site want to know how many times a banner got clicked and viewed.
here i got a problem... the flash banners direct to another sites (changing all the time) and i cant figure out a way to tell my server that the banner got clicked and to update my db because of it.
i thought on redirecting but as far as i know flash files contain their own link and that link cant be changed (created when the flash get compiled).
does anyone know a way to count those clicks? or just got a link to a site which explain alittle?
with thanks in advance Ben-Nes Yonatan
attached mail follows:
On Tue, 29 Oct 2002, Ben-Nes Yonatan wrote: <snip> > does anyone know a way to count those clicks? > or just got a link to a site which explain alittle?
You might try using software like phpAdsNew:
It has a fantastic admin interface for you and for the advertiser, it supports Flash banners, as well as everything else you want to throw at it, it's free, and it's free. Installation is remarkably easy.
Joel
-- [ joel boonstra | jboonstragospelcom.net ]
attached mail follows:
Greetings,
Forgive my newbism here, but I am having a hard time recieving check(box)ed items from a form sent to e-mail using PHP.
The code is as follows:
//Routine for checkboxes
$MailBody .="Type medlemskap : ";
$items = 2; //initiate possible # of items
for ($i = 1; $i <= $items; $i++) { //loop on # of items
$MailBody .= "$medlemskap[$i], "; //put results in variable MailBody }
..and the html code put in the form is:
<input type="checkbox" name="item_1[]" value="hovedmedlemskap"> hovedmedlemskap [200 kr.] <input type="checkbox" name="item_2[]" value="2 i husholdning"> 2 eller flere i samme husholdning [100 kr.]
The problem is, when I recieve the form as email, it just shows the checked item(s) as: ",," (without the quotemarks)
What am I doing wrong? I am using the script found here: http://www.grenadine.net/php/NadForm/NadForm_en.html
Website where my form is located is here: http://komposlo.inmono.net/m_skap.html
Help is very much appreciated!
Thanks in advance, Tine
attached mail follows:
What is $medlemskap[]???
You MUST refer to item_1[].
Also, I believe you REALLY meant that all values be accessed through an array; therefore the "name=" parameter in your HTML must all be the SAME name:
<input type="checkbox" name="items[]" value="hovedmedlemskap"> hovedmedlemskap [200 kr.] <input type="checkbox" name="items[]" value="2 i husholdning"> 2 eller flere i samme husholdning [100 kr.]
----- Original Message -----
From: "Tine" <thaugen
optonline.net>
To: <>
Sent: Tuesday, October 29, 2002 8:34 AM
Subject: [PHP] php form mail - checkbox problem
Greetings,
Forgive my newbism here, but I am having a hard time recieving check(box)ed items from a form sent to e-mail using PHP.
The code is as follows:
//Routine for checkboxes
$MailBody .="Type medlemskap : ";
$items = 2; //initiate possible # of items
for ($i = 1; $i <= $items; $i++) { //loop on # of items
$MailBody .= "$medlemskap[$i], "; //put results in variable MailBody }
..and the html code put in the form is:
<input type="checkbox" name="item_1[]" value="hovedmedlemskap"> hovedmedlemskap [200 kr.] <input type="checkbox" name="item_2[]" value="2 i husholdning"> 2 eller flere i samme husholdning [100 kr.]
The problem is, when I recieve the form as email, it just shows the checked item(s) as: ",," (without the quotemarks)
What am I doing wrong? I am using the script found here: http://www.grenadine.net/php/NadForm/NadForm_en.html
Website where my form is located is here: http://komposlo.inmono.net/m_skap.html
Help is very much appreciated!
Thanks in advance, Tine
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
"Rick Emery" <remery
emeryloftus.com> wrote in message
news:03f901c27f5a$2bab0e50$0500a8c0
honeybee...
> What is $medlemskap[]???
....? I just modified it from the default code:
//Routine for checkboxes
$MailBody .="Question 8 : ";
$items = 3; //initiate possible # of items
for ($i = 1; $i <= $items; $i++) { //loop on # of items
$MailBody .= "$champ8[$i], "; //put results in variable MailBody }
-----------
> You MUST refer to item_1[].
> Also, I believe you REALLY meant that all values be accessed through an array; therefore > the "name=" parameter in your HTML must all be the SAME name: > > <input type="checkbox" name="items[]" value="hovedmedlemskap"> > hovedmedlemskap [200 kr.] > <input type="checkbox" name="items[]" value="2 i husholdning"> > 2 eller flere i samme husholdning [100 kr.]
Tried that, same same. Still not working :oO
> ----- Original Message -----
> From: "Tine" <thaugen
optonline.net>
> To: <>
> Sent: Tuesday, October 29, 2002 8:34 AM
> Subject: [PHP] php form mail - checkbox problem
>
>
> Greetings,
>
> Forgive my newbism here, but I am having a hard time recieving
check(box)ed
> items from a form sent to e-mail using PHP.
>
> The code is as follows:
>
> //Routine for checkboxes
>
> $MailBody .="Type medlemskap : ";
>
> $items = 2; //initiate possible # of items
>
> for ($i = 1; $i <= $items; $i++) { //loop on # of items
>
> $MailBody .= "$medlemskap[$i], "; //put results in variable MailBody
> }
>
> ..and the html code put in the form is:
>
> <input type="checkbox" name="item_1[]" value="hovedmedlemskap">
> hovedmedlemskap [200 kr.]
> <input type="checkbox" name="item_2[]" value="2 i husholdning">
> 2 eller flere i samme husholdning [100 kr.]
>
> The problem is, when I recieve the form as email, it just shows the
checked
> item(s) as: ",,"
> (without the quotemarks)
>
> What am I doing wrong? I am using the script found here:
> http://www.grenadine.net/php/NadForm/NadForm_en.html
>
> Website where my form is located is here:
> http://komposlo.inmono.net/m_skap.html
>
> Help is very much appreciated!
>
> Thanks in advance,
> Tine
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Please don't answer with "Tried that" without showing us your new HTML and code Show us the new code.
----- Original Message -----
From: "Tine" <thaugen
optonline.net>
To: <>
Sent: Tuesday, October 29, 2002 9:12 AM
Subject: Re: [PHP] php form mail - checkbox problem
"Rick Emery" <remery
emeryloftus.com> wrote in message
news:03f901c27f5a$2bab0e50$0500a8c0
honeybee...
> What is $medlemskap[]???
....? I just modified it from the default code:
//Routine for checkboxes
$MailBody .="Question 8 : ";
$items = 3; //initiate possible # of items
for ($i = 1; $i <= $items; $i++) { //loop on # of items
$MailBody .= "$champ8[$i], "; //put results in variable MailBody }
-----------
> You MUST refer to item_1[].
> Also, I believe you REALLY meant that all values be accessed through an array; therefore > the "name=" parameter in your HTML must all be the SAME name: > > <input type="checkbox" name="items[]" value="hovedmedlemskap"> > hovedmedlemskap [200 kr.] > <input type="checkbox" name="items[]" value="2 i husholdning"> > 2 eller flere i samme husholdning [100 kr.]
Tried that, same same. Still not working :oO
> ----- Original Message -----
> From: "Tine" <thaugen
optonline.net>
> To: <>
> Sent: Tuesday, October 29, 2002 8:34 AM
> Subject: [PHP] php form mail - checkbox problem
>
>
> Greetings,
>
> Forgive my newbism here, but I am having a hard time recieving
check(box)ed
> items from a form sent to e-mail using PHP.
>
> The code is as follows:
>
> //Routine for checkboxes
>
> $MailBody .="Type medlemskap : ";
>
> $items = 2; //initiate possible # of items
>
> for ($i = 1; $i <= $items; $i++) { //loop on # of items
>
> $MailBody .= "$medlemskap[$i], "; //put results in variable MailBody
> }
>
> ..and the html code put in the form is:
>
> <input type="checkbox" name="item_1[]" value="hovedmedlemskap">
> hovedmedlemskap [200 kr.]
> <input type="checkbox" name="item_2[]" value="2 i husholdning">
> 2 eller flere i samme husholdning [100 kr.]
>
> The problem is, when I recieve the form as email, it just shows the
checked
> item(s) as: ",,"
> (without the quotemarks)
>
> What am I doing wrong? I am using the script found here:
> http://www.grenadine.net/php/NadForm/NadForm_en.html
>
> Website where my form is located is here:
> http://komposlo.inmono.net/m_skap.html
>
> Help is very much appreciated!
>
> Thanks in advance,
> Tine
>
>
>
>
> --
> 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
attached mail follows:
> Please don't answer with "Tried that" without showing us your new HTML and code > Show us the new code.
Sorry - found my mistake. I had forgotten to include a hidden input field :oO
attached mail follows:
I recently upgraded my system, and all of a sudden strtotime won't handle a date/time prior to the unix start microtime..
For example echo strtotime("1965-01-01"); returns a -1 (e.i. invalid date/time format). According to the PHP4 docs:
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
But dates between 1901 and 1969ish don't work anymore... Is there another date function to convert a date to a negitive unix timestamp??? Please help.
Thanks David
attached mail follows:
I am trying to pass the values of a select box which can have more than one value to a page.
In the address bar of the page i have sent to, I have select=item1&select=item2select=item3&select=item4select=item5&select=item6
on the page i have echo $select
but only the last item (item6) is being displayed on the page
how do i create an array of all the items in a list on the page?
any help would be gratefully appreciated
craig
attached mail follows:
Change the name of your select field to "select[]"
<select name="whatever[]" multiple>
Craig wrote: > I am trying to pass the values of a select box which can have more than one > value to a page. > > In the address bar of the page i have sent to, I have > select=item1&select=item2select=item3&select=item4select=item5&select=item6 > > on the page i have > echo $select > > but only the last item (item6) is being displayed on the page > > how do i create an array of all the items in a list on the page? > > any help would be gratefully appreciated > > craig > > >
attached mail follows:
Where are the selected values coming from?
Please provide more details and code...we cannot read your mind...
----- Original Message -----
From: "Craig" <craig
sitedesign.net>
To: <>
Sent: Tuesday, October 29, 2002 9:19 AM
Subject: [PHP] Select values in an array???
I am trying to pass the values of a select box which can have more than one value to a page.
In the address bar of the page i have sent to, I have select=item1&select=item2select=item3&select=item4select=item5&select=item6
on the page i have echo $select
but only the last item (item6) is being displayed on the page
how do i create an array of all the items in a list on the page?
any help would be gratefully appreciated
craig
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
You don't even need the word "multiple"
----- Original Message -----
From: "John Nichel" <jnichel
by-tor.com>
To: "Craig" <craig
sitedesign.net>
Cc: <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 9:27 AM
Subject: Re: [PHP] Select values in an array???
Change the name of your select field to "select[]"
<select name="whatever[]" multiple>
Craig wrote: > I am trying to pass the values of a select box which can have more than one > value to a page. > > In the address bar of the page i have sent to, I have > select=item1&select=item2select=item3&select=item4select=item5&select=item6 > > on the page i have > echo $select > > but only the last item (item6) is being displayed on the page > > how do i create an array of all the items in a list on the page? > > any help would be gratefully appreciated > > craig > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
You do if you want to select multiple values from a select element. Otherwise, you can only select one.
Rick Emery wrote:
> You don't even need the word "multiple"
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Craig" <craig
sitedesign.net>
> Cc: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:27 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> Change the name of your select field to "select[]"
>
> <select name="whatever[]" multiple>
>
> Craig wrote:
>
>>I am trying to pass the values of a select box which can have more than one
>>value to a page.
>>
>>In the address bar of the page i have sent to, I have
>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>
>>on the page i have
>>echo $select
>>
>>but only the last item (item6) is being displayed on the page
>>
>>how do i create an array of all the items in a list on the page?
>>
>>any help would be gratefully appreciated
>>
>>craig
>>
>>
>>
>
>
>
>
attached mail follows:
I've used it without "multiple" many times
----- Original Message -----
From: "John Nichel" <jnichel
by-tor.com>
To: "Rick Emery" <remery
emeryloftus.com>
Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 9:33 AM
Subject: Re: [PHP] Select values in an array???
You do if you want to select multiple values from a select element. Otherwise, you can only select one.
Rick Emery wrote:
> You don't even need the word "multiple"
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Craig" <craig
sitedesign.net>
> Cc: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:27 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> Change the name of your select field to "select[]"
>
> <select name="whatever[]" multiple>
>
> Craig wrote:
>
>>I am trying to pass the values of a select box which can have more than one
>>value to a page.
>>
>>In the address bar of the page i have sent to, I have
>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>
>>on the page i have
>>echo $select
>>
>>but only the last item (item6) is being displayed on the page
>>
>>how do i create an array of all the items in a list on the page?
>>
>>any help would be gratefully appreciated
>>
>>craig
>>
>>
>>
>
>
>
>
attached mail follows:
I have changed the select to slect[] but the next page displays array
how do i display each individual select item in a list
ie
you have selected
item2 item4 item5 . . . .
"Rick Emery" <remery
emeryloftus.com> wrote in message
news:05e401c27f60$52399a90$0500a8c0
honeybee...
> I've used it without "multiple" many times
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:33 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> You do if you want to select multiple values from a select element.
> Otherwise, you can only select one.
>
> Rick Emery wrote:
> > You don't even need the word "multiple"
> > ----- Original Message -----
> > From: "John Nichel" <jnichel
by-tor.com>
> > To: "Craig" <craig
sitedesign.net>
> > Cc: <php-general
lists.php.net>
> > Sent: Tuesday, October 29, 2002 9:27 AM
> > Subject: Re: [PHP] Select values in an array???
> >
> >
> > Change the name of your select field to "select[]"
> >
> > <select name="whatever[]" multiple>
> >
> > Craig wrote:
> >
> >>I am trying to pass the values of a select box which can have more than
one
> >>value to a page.
> >>
> >>In the address bar of the page i have sent to, I have
>
>>select=item1&select=item2select=item3&select=item4select=item5&select=item
6
> >>
> >>on the page i have
> >>echo $select
> >>
> >>but only the last item (item6) is being displayed on the page
> >>
> >>how do i create an array of all the items in a list on the page?
> >>
> >>any help would be gratefully appreciated
> >>
> >>craig
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>
>
attached mail follows:
http://www.php.net/manual/en/ref.array.php
Craig wrote:
> I have changed the select to slect[] but the next page displays array
>
> how do i display each individual select item in a list
>
> ie
>
> you have selected
>
> item2
> item4
> item5
> .
> .
> .
> .
>
>
> "Rick Emery" <remery
emeryloftus.com> wrote in message
> news:05e401c27f60$52399a90$0500a8c0
honeybee...
>
>>I've used it without "multiple" many times
>>----- Original Message -----
>>From: "John Nichel" <jnichel
by-tor.com>
>>To: "Rick Emery" <remery
emeryloftus.com>
>>Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
>>Sent: Tuesday, October 29, 2002 9:33 AM
>>Subject: Re: [PHP] Select values in an array???
>>
>>
>>You do if you want to select multiple values from a select element.
>>Otherwise, you can only select one.
>>
>>Rick Emery wrote:
>>
>>>You don't even need the word "multiple"
>>>----- Original Message -----
>>>From: "John Nichel" <jnichel
by-tor.com>
>>>To: "Craig" <craig
sitedesign.net>
>>>Cc: <php-general
lists.php.net>
>>>Sent: Tuesday, October 29, 2002 9:27 AM
>>>Subject: Re: [PHP] Select values in an array???
>>>
>>>
>>>Change the name of your select field to "select[]"
>>>
>>><select name="whatever[]" multiple>
>>>
>>>Craig wrote:
>>>
>>>
>>>>I am trying to pass the values of a select box which can have more than
>>>
> one
>
>>>>value to a page.
>>>>
>>>>In the address bar of the page i have sent to, I have
>>>
>>>select=item1&select=item2select=item3&select=item4select=item5&select=item
>>
> 6
>
>>>>on the page i have
>>>>echo $select
>>>>
>>>>but only the last item (item6) is being displayed on the page
>>>>
>>>>how do i create an array of all the items in a list on the page?
>>>>
>>>>any help would be gratefully appreciated
>>>>
>>>>craig
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
attached mail follows:
foreach(array_expression as $value) statement
foreach(array_expression as $key => $value) statement
----- Original Message -----
From: "Craig" <craig
sitedesign.net>
To: <>
Sent: Tuesday, October 29, 2002 9:36 AM
Subject: Re: [PHP] Select values in an array???
I have changed the select to slect[] but the next page displays array
how do i display each individual select item in a list
ie
you have selected
item2 item4 item5 . . . .
"Rick Emery" <remery
emeryloftus.com> wrote in message
news:05e401c27f60$52399a90$0500a8c0
honeybee...
> I've used it without "multiple" many times
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:33 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> You do if you want to select multiple values from a select element.
> Otherwise, you can only select one.
>
> Rick Emery wrote:
> > You don't even need the word "multiple"
> > ----- Original Message -----
> > From: "John Nichel" <jnichel
by-tor.com>
> > To: "Craig" <craig
sitedesign.net>
> > Cc: <php-general
lists.php.net>
> > Sent: Tuesday, October 29, 2002 9:27 AM
> > Subject: Re: [PHP] Select values in an array???
> >
> >
> > Change the name of your select field to "select[]"
> >
> > <select name="whatever[]" multiple>
> >
> > Craig wrote:
> >
> >>I am trying to pass the values of a select box which can have more than
one
> >>value to a page.
> >>
> >>In the address bar of the page i have sent to, I have
>
>>select=item1&select=item2select=item3&select=item4select=item5&select=item
6
> >>
> >>on the page i have
> >>echo $select
> >>
> >>but only the last item (item6) is being displayed on the page
> >>
> >>how do i create an array of all the items in a list on the page?
> >>
> >>any help would be gratefully appreciated
> >>
> >>craig
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hello,
"Rick Emery" <remery
emeryloftus.com> wrote:
[snip]
> I've used it without "multiple" many times
[/snip]
Of course. But, John was correct--you can only choose one. UNLESS you use "multiple", you won't be able to select multiple values ;)
What seems to be the problem here... html? :)
- E
attached mail follows:
Then you were not able to select multiple values. If you don't include the "multiple", it will only allow you to select one value.
Rick Emery wrote:
> I've used it without "multiple" many times
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:33 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> You do if you want to select multiple values from a select element.
> Otherwise, you can only select one.
>
> Rick Emery wrote:
>
>>You don't even need the word "multiple"
>>----- Original Message -----
>>From: "John Nichel" <jnichel
by-tor.com>
>>To: "Craig" <craig
sitedesign.net>
>>Cc: <php-general
lists.php.net>
>>Sent: Tuesday, October 29, 2002 9:27 AM
>>Subject: Re: [PHP] Select values in an array???
>>
>>
>>Change the name of your select field to "select[]"
>>
>><select name="whatever[]" multiple>
>>
>>Craig wrote:
>>
>>
>>>I am trying to pass the values of a select box which can have more than one
>>>value to a page.
>>>
>>>In the address bar of the page i have sent to, I have
>>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>>
>>>on the page i have
>>>echo $select
>>>
>>>but only the last item (item6) is being displayed on the page
>>>
>>>how do i create an array of all the items in a list on the page?
>>>
>>>any help would be gratefully appreciated
>>>
>>>craig
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>
>
attached mail follows:
I HAVE selected multiple items without including MULTIPLE.
----- Original Message -----
From: "John Nichel" <jnichel
by-tor.com>
To: "Rick Emery" <remery
emeryloftus.com>
Cc: <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 9:54 AM
Subject: Re: [PHP] Select values in an array???
Then you were not able to select multiple values. If you don't include the "multiple", it will only allow you to select one value.
Rick Emery wrote:
> I've used it without "multiple" many times
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:33 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> You do if you want to select multiple values from a select element.
> Otherwise, you can only select one.
>
> Rick Emery wrote:
>
>>You don't even need the word "multiple"
>>----- Original Message -----
>>From: "John Nichel" <jnichel
by-tor.com>
>>To: "Craig" <craig
sitedesign.net>
>>Cc: <php-general
lists.php.net>
>>Sent: Tuesday, October 29, 2002 9:27 AM
>>Subject: Re: [PHP] Select values in an array???
>>
>>
>>Change the name of your select field to "select[]"
>>
>><select name="whatever[]" multiple>
>>
>>Craig wrote:
>>
>>
>>>I am trying to pass the values of a select box which can have more than one
>>>value to a page.
>>>
>>>In the address bar of the page i have sent to, I have
>>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>>
>>>on the page i have
>>>echo $select
>>>
>>>but only the last item (item6) is being displayed on the page
>>>
>>>how do i create an array of all the items in a list on the page?
>>>
>>>any help would be gratefully appreciated
>>>
>>>craig
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>
>
attached mail follows:
I HAVE selected multiple items without including MULTIPLE.
The following link displays a form in which there are multiple SELECTS with the same name. Upon processing the form on submit, I do retrieve all selected values, not just the last. To check for yourself, open the link and view source.
Yes, this page works...
http://www.preferred-pet.com/volunteer/volunteer.php
----- Original Message -----
From: "John Nichel" <jnichel
by-tor.com>
To: "Rick Emery" <remery
emeryloftus.com>
Cc: <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 9:54 AM
Subject: Re: [PHP] Select values in an array???
Then you were not able to select multiple values. If you don't include the "multiple", it will only allow you to select one value.
Rick Emery wrote:
> I've used it without "multiple" many times
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:33 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> You do if you want to select multiple values from a select element.
> Otherwise, you can only select one.
>
> Rick Emery wrote:
>
>>You don't even need the word "multiple"
>>----- Original Message -----
>>From: "John Nichel" <jnichel
by-tor.com>
>>To: "Craig" <craig
sitedesign.net>
>>Cc: <php-general
lists.php.net>
>>Sent: Tuesday, October 29, 2002 9:27 AM
>>Subject: Re: [PHP] Select values in an array???
>>
>>
>>Change the name of your select field to "select[]"
>>
>><select name="whatever[]" multiple>
>>
>>Craig wrote:
>>
>>
>>>I am trying to pass the values of a select box which can have more than one
>>>value to a page.
>>>
>>>In the address bar of the page i have sent to, I have
>>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>>
>>>on the page i have
>>>echo $select
>>>
>>>but only the last item (item6) is being displayed on the page
>>>
>>>how do i create an array of all the items in a list on the page?
>>>
>>>any help would be gratefully appreciated
>>>
>>>craig
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> -----Original Message-----
> From: Rick Emery [mailto:remery
emeryloftus.com]
> Sent: 29 October 2002 16:15
> To: php-general
lists.php.net
> Subject: Re: [PHP] Select values in an array???
>
>
> I HAVE selected multiple items without including MULTIPLE.
>
> The following link displays a form in which there are
> multiple SELECTS with the same name.
> Upon processing the form on submit, I do retrieve all
> selected values, not just the last.
> To check for yourself, open the link and view source.
>
> Yes, this page works...
>
> http://www.preferred-pet.com/volunteer/volunteer.php
I'm sure it does, but it doesn't have any SELECTs on it, never mind SELECT MULTIPLE.
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: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Hello,
"Rick Emery" <remery
emeryloftus.com> wrote:
> I HAVE selected multiple items without including MULTIPLE.
>
> The following link displays a form in which there are multiple SELECTS
with the same name.
> Upon processing the form on submit, I do retrieve all selected values, not
just the last.
> To check for yourself, open the link and view source.
>
> Yes, this page works...
>
> http://www.preferred-pet.com/volunteer/volunteer.php
>
Interesting. But I don't see any SELECTS there. Perhaps you're talking about CHECKBOXES?
CHECKBOXes are NOT SELECTs ;)
- E
attached mail follows:
Edwin, you are CORRECT. I had a brain-fart.
I stand before you all, humbled
Round of beer for everyone in the house
cheers
rick----- Original Message -----
From: "
Edwin" <copperwalls
hotmail.com>
To: "Rick Emery" <remery
emeryloftus.com>
Cc: <php-general
lists.php.net>
Sent: Tuesday, October 29, 2002 10:25 AM
Subject: Re: [PHP] Select values in an array???
Hello,
"Rick Emery" <remery
emeryloftus.com> wrote:
> I HAVE selected multiple items without including MULTIPLE.
>
> The following link displays a form in which there are multiple SELECTS
with the same name.
> Upon processing the form on submit, I do retrieve all selected values, not
just the last.
> To check for yourself, open the link and view source.
>
> Yes, this page works...
>
> http://www.preferred-pet.com/volunteer/volunteer.php
>
Interesting. But I don't see any SELECTS there. Perhaps you're talking about CHECKBOXES?
CHECKBOXes are NOT SELECTs ;)
- E
attached mail follows:
Look, I'm not trying to start a flame war or anything, but you CANNOT select MULTIPLE items from a select element without using "multiple" in the tag. I looked at your link, and it doesn't have any select elements, much less multiple select elements. Prehaps you're confusing checkbox elements with select elements. Take a look here for multiple select elements....
Rick Emery wrote:
> I HAVE selected multiple items without including MULTIPLE.
>
> The following link displays a form in which there are multiple SELECTS with the same name.
> Upon processing the form on submit, I do retrieve all selected values, not just the last.
> To check for yourself, open the link and view source.
>
> Yes, this page works...
>
> http://www.preferred-pet.com/volunteer/volunteer.php
>
> ----- Original Message -----
> From: "John Nichel" <jnichel
by-tor.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 9:54 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> Then you were not able to select multiple values. If you don't include
> the "multiple", it will only allow you to select one value.
>
> Rick Emery wrote:
>
>>I've used it without "multiple" many times
>>----- Original Message -----
>>From: "John Nichel" <jnichel
by-tor.com>
>>To: "Rick Emery" <remery
emeryloftus.com>
>>Cc: "Craig" <craig
sitedesign.net>; <php-general
lists.php.net>
>>Sent: Tuesday, October 29, 2002 9:33 AM
>>Subject: Re: [PHP] Select values in an array???
>>
>>
>>You do if you want to select multiple values from a select element.
>>Otherwise, you can only select one.
>>
>>Rick Emery wrote:
>>
>>
>>>You don't even need the word "multiple"
>>>----- Original Message -----
>>>From: "John Nichel" <jnichel
by-tor.com>
>>>To: "Craig" <craig
sitedesign.net>
>>>Cc: <php-general
lists.php.net>
>>>Sent: Tuesday, October 29, 2002 9:27 AM
>>>Subject: Re: [PHP] Select values in an array???
>>>
>>>
>>>Change the name of your select field to "select[]"
>>>
>>><select name="whatever[]" multiple>
>>>
>>>Craig wrote:
>>>
>>>
>>>
>>>>I am trying to pass the values of a select box which can have more than one
>>>>value to a page.
>>>>
>>>>In the address bar of the page i have sent to, I have
>>>>select=item1&select=item2select=item3&select=item4select=item5&select=item6
>>>>
>>>>on the page i have
>>>>echo $select
>>>>
>>>>but only the last item (item6) is being displayed on the page
>>>>
>>>>how do i create an array of all the items in a list on the page?
>>>>
>>>>any help would be gratefully appreciated
>>>>
>>>>craig
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
attached mail follows:
*raises glass*
Happens to the best of us. You should have seen my confusion on a linux mailing list last night when I was trying to figure out bind9. :)
Rick Emery wrote:
> Edwin, you are CORRECT. I had a brain-fart.
>
> I stand before you all, humbled
>
> Round of beer for everyone in the house
>
> cheers
>
> rick----- Original Message -----
> From: "
Edwin" <copperwalls
hotmail.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 10:25 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> Hello,
>
> "Rick Emery" <remery
emeryloftus.com> wrote:
>
>>I HAVE selected multiple items without including MULTIPLE.
>>
>>The following link displays a form in which there are multiple SELECTS
>
> with the same name.
>
>>Upon processing the form on submit, I do retrieve all selected values, not
>
> just the last.
>
>>To check for yourself, open the link and view source.
>>
>>Yes, this page works...
>>
>>http://www.preferred-pet.com/volunteer/volunteer.php
>>
>
>
> Interesting. But I don't see any SELECTS there. Perhaps you're talking about
> CHECKBOXES?
>
> CHECKBOXes are NOT SELECTs ;)
>
> - E
>
>
>
attached mail follows:
fish 'n chips on me :)
Good job there--volunteers are great!
- E
"Rick Emery" <remery
emeryloftus.com> wrote:
> Edwin, you are CORRECT. I had a brain-fart.
>
> I stand before you all, humbled
>
> Round of beer for everyone in the house
>
> cheers
>
> rick----- Original Message -----
> From: "
Edwin" <copperwalls
hotmail.com>
> To: "Rick Emery" <remery
emeryloftus.com>
> Cc: <php-general
lists.php.net>
> Sent: Tuesday, October 29, 2002 10:25 AM
> Subject: Re: [PHP] Select values in an array???
>
>
> Hello,
>
> "Rick Emery" <remery
emeryloftus.com> wrote:
> > I HAVE selected multiple items without including MULTIPLE.
> >
> > The following link displays a form in which there are multiple SELECTS
> with the same name.
> > Upon processing the form on submit, I do retrieve all selected values,
not
> just the last.
> > To check for yourself, open the link and view source.
> >
> > Yes, this page works...
> >
> > http://www.preferred-pet.com/volunteer/volunteer.php
> >
>
> Interesting. But I don't see any SELECTS there. Perhaps you're talking
about
> CHECKBOXES?
>
> CHECKBOXes are NOT SELECTs ;)
>
> - E
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Thanks, but I'm trying to replace ALL non alpha-numeric characters, which I'm doing with the preg_replace, however it leaves the _. Seems silly to use preg_replace and then use str_replace.
Thanks! Shawn
"John Meyer" <johnmeyer_1978
yahoo.com> wrote in message
news:<EAENLOPADLNBJJFJCEKFEEDJCCAA.johnmeyer_1978
yahoo.com>...
> i've just used str_replace for underscores and it's worked
> wonderfully.
>
> -----Original Message-----
> From: Shawn McKenzie [mailto:nospam
mckenzies.net]
> Sent: Monday, October 28, 2002 4:46 PM
> To: php-general
lists.php.net
> Subject: [PHP] preg_replace (underscore)
>
>
> Why does preg_replace("^\W^","",$str); not remove undescores _ ? Are
> they alpha-numeric?
>
> I had to do this preg_replace("^\W|_^","",$str);
>
> TIA,
> Shawn
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Thanks a lot man !! It worked perfecly !!
> Im using smarty template engine .. Id like to know if theres a way to > place php functions, specifically nl2br(), into smarty templates .. > Not in php script that calls smarty class.
Take a look at the modules/ folder in Smarty. You can create your own modifier to use in your templates.
You'd want to make a file called modifier.nl2br.php
and have it's contents something like this:
<?php
/* * Smarty plugin * ------------------------------------------------------------- * Type: modifier * Name: nl2br * Purpose: add <br /> to all newlines in string * ------------------------------------------------------------- */ function smarty_modifier_nl2br($string) { return nl2br($string); }
?>
and then you'd display your value like {$value|nl2br} in the templates.
You could just use the nl2br() function in your assign(), too:
$smarty->assign('text',nl2br($text));
---John Holmes...
attached mail follows:
Found a perfect solution to this problem. Check it out at this website,
http://bsdvault.net/sections.php?op=viewarticle&artid=85.
Enjoy!!
"Scott Fletcher" <scott
abcoa.com> wrote in message
news:20021023135230.58238.qmail
pb1.pair.com...
> I know the topic is off the point but at least, I use PHP on this
webserver.
> As you know, when you shut down Apache and later on, start it up by this
> command, "apachectl startssl". Then it will ask you for the passphrase
> (password). This is the private key password for the ssl and encryption
> purpose.
>
> The question here is when I write a bash script that will do it for me
> automatically by just executing the filename. The question is how to give
> the passphrase to Apache? I tried many different method of scripting and
> Apache doesn't received the passphrase from the user input. Anyone know?
> Or is there some reference somewhere where I can start looking into it?
>
> Thanks!
>
>
attached mail follows:
Hey Fellas!!!!
From the previous posting in the past when I posted a comment about ways to make Apache start up automatically without manually typing in the passphrase for SSL. Something that is a must have for the server reboot. Be of good cheers! I found the reference on the Apache/Mod_SSL Manual but it wasn't good enough and it doesn't work when I create a file for that. So, began the lot, lot, lot of searches and I stumpled upon this website on "How-To" and duh!!!!! How goofy of me! Here's this website that will be of a help to you all, so you'll be having an easier time!
http://bsdvault.net/sections.php?op=viewarticle&artid=85
Now I can get the server to reboot overnight and not have to manually do it anymore.
Enjoy!!!!
attached mail follows:
I have a array called $arr[], it holds integer values, I don’t know how many indexes it holds and I need to be able to find out what the hash ($arr[index]) holds the largest value, is this possable, and if so how? Regards, David
attached mail follows:
You could sort the values (ascending or descending), and select the first or last value (depending on how you sorted it).
Davíđ Örn Jóhannsson wrote: > I have a array called $arr[], it holds integer values, I don’t know how > many indexes it holds and I need to be able to find out what the hash > ($arr[index]) > holds the largest value, is this possable, and if so how? > > Regards, David > >
attached mail follows:
Hello,
Looking for this?
http://www.php.net/manual/en/function.max.php
- E
"Davíđ Örn Jóhannsson" <david
atom.is> wrote:
> I have a array called $arr[], it holds integer values, I don't know how > many indexes it holds and I need to be able to find out what the hash > ($arr[index]) > holds the largest value, is this possable, and if so how? > > Regards, David
attached mail follows:
How do I generate a uniqueid in php?
Thanks, Eddie
attached mail follows:
> How do I generate a uniqueid in php?
www.php.net/uniqid
---John Holmes...
attached mail follows:
Sorry, do not want to intrude. I am a developer like the rest of you. I underestimated and underbid a project and need some serious help.
I am a hardcore java developer (5+ years),and tried to get some java help but not finding success. While the core of my application is java, I am in need of some admin screens, these can be php.
It's a set of 14 tables, 7 core, and 7 are association tables (mysql of course). I will provide a create database script, and documentation that describe the relationships. No UI guidelines, I am willing to work with the developer to get some usable.
Let me know if you are interested. I am not able to pay top dollar consulting fees. Let me know your hourly fee, or if you prefer to work by project.
Thanks!
attached mail follows:
Are any of you subscribed to the above list? If so, do you ever see any traffic on it?
Chris
attached mail follows:
Im trying to explode a string into an array of words using -> $title = preg_split('/[^\w\']/', $title, -1, PREG_SPLIT_NO_EMPTY );
It seems to work well with words like "this" and "don't" but it doens't work with words with accents to it like "Guantánamo" Could my regex be expanded to handle non-english type characters, or any workarounds to get a string into an array of words, where the string contains non english characters??
Thanks
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/
attached mail follows:
This is really my first major PHP encounter, and I have attempted to modify a php form mail script to include a foot.inc and head.inc file, which works fine if all required fields in the form is filled out. But if there are more than 2 required fields missing I end up with what you see here:
http://komposlo.inmono.net/sendform.php
Now I can understand why that is, but how do I write a command that includes the head/foot.inc file on certain conditions, so it isn't multiplied like seen at the above mentioned site?
Again, all help is appreciated
attached mail follows:
"Tine" <thaugen
optonline.net> wrote in message
news:20021029171957.30722.qmail
pb1.pair.com...
> This is really my first major PHP encounter, and I have attempted to
modify
> a php form mail script to include a foot.inc and head.inc file, which
works
> fine if all required fields in the form is filled out. But if there are
more
> than 2 required fields missing I end up with what you see here:
>
> http://komposlo.inmono.net/sendform.php
>
> Now I can understand why that is, but how do I write a command that
includes
> the head/foot.inc file on certain conditions, so it isn't multiplied like
> seen at the above mentioned site?
>
>
> Again, all help is appreciated
Should have posted parts of the code to, so you see what I mean ;o) :
} if ($sted == ""){ include("head.inc"); echo("Du fylte ikke ut <span class=\"formfelt\">sted</span>.<br> <blockquote>» <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til skjemaet</a></blockquote>"); include("foot.inc"); $Envoi = 0; } else { $MailBody .= "Sted : $sted\n"; } if ($telefon == "0"){ include("head.inc"); echo("Du fylte ikke ut <span class=\"formfelt\">telefonnummeret</span> ditt.<br> <blockquote>» <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til skjemaet</a></blockquote>"); include("foot.inc"); $Envoi = 0; } else { $MailBody .= "Telefon : $telefon\n"; } if ($epost == ""){ include("head.inc"); echo("Du fylte ikke ut <span class=\"formfelt\">e-postaddressen</span> din.<br> <blockquote>» <a href=\"m_skap.html\" class=\"linkdot\">Tilbake til skjemaet</a></blockquote>"); include("foot.inc"); $E