php-general Digest 23 Dec 2003 09:39:16 -0000 Issue 2489
Topics (messages 173199 through 173228):
Re: progress in PHP
173199 by: Steve Murphy
173200 by: David T-G
173203 by: Chris W. Parker
173204 by: Ed Curtis
Re: sorting a mulit-dimensional array
173201 by: Matt Grimm
Re: Fetch Information Via a link
173202 by: Eric Holmstrom
post var check failing?
173205 by: Jas
Boolean Searches using PHP and using File System fgetss
173206 by: Vernon
Re: overload() problem
173207 by: Cliff Wells
PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH PHP
173208 by: Dale Hersh
173211 by: Larry Brown
173212 by: Chris W. Parker
173213 by: Larry Brown
using PDI to pull from data already read into a variable?
173209 by: Larry Brown
Re: HTTP headers, IE and downloading
173210 by: Andreas Korthaus
173214 by: Larry Brown
173221 by: Manuel Lemos
UNUSUAL PROBLEM WHEN WRITING TO THE SCREEN
173215 by: Dale Hersh
173218 by: Robert Cummings
173219 by: Jake McHenry
173220 by: Justin French
Re: File Upload on a MAC-Browser didn't work
173216 by: Chris
Can't upload file greater than 11kb
173217 by: Chris
Re: Https
173222 by: Manuel Lemos
173228 by: Homer
distinct values from a mulit-dimensional array
173223 by: Chakravarthy Cuddapah
173225 by: Greg Donald
Dilema
173224 by: Jake McHenry
phphandle form wont display data
173226 by: Jack E. Wasserstein, DDS, Inc.
pgp form handler will not display data
173227 by: Jack E. Wasserstein, DDS, Inc.
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Well its actually a pure PHP upload meter it just uses JS to open the window. You
could make PHP open the window as well with a little tweaking.
-----Original Message-----
From: David T-G [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 3:16 PM
To: [EMAIL PROTECTED]
Cc: Steve Murphy
Subject: Re: [PHP] Re: progress in php
Steve --
...and then Steve Murphy said...
%
% David,
% A window will popup with the progress meter. Obviously don't block popups and try
using a larger file if you have a high speed line, it takes a second for the meter to
start and if the upload is done it won't popup properly.
Ah. Since I don't use javascript I probably won't get a lot out of it :-)
Darn; I was hoping for something non-JS. I guess I'll stick with my
browser status window.
%
% Steve
Thanks & HAND & Happy Holidays
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
--- End Message ---
--- Begin Message ---
Steve, et al --
...and then Steve Murphy said...
%
% Well its actually a pure PHP upload meter it just uses JS to open the window. You
could make PHP open the window as well with a little tweaking.
Now that might interest me. So what has been added to the PHP codebase
that makes this work? And what tweaking would I need to do? [Can't I
just have it display in the current window? Why bother with a popup?]
Thanks & HAND & Happy Holidays
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
Steve Murphy <mailto:[EMAIL PROTECTED]>
on Monday, December 22, 2003 1:03 PM said:
> Well its actually a pure PHP upload meter it just uses JS to open the
> window. You could make PHP open the window as well with a little
> tweaking.
Unless I'm missing something here this is incorrect. PHP does not bother
the client side except to send data, i.e. html/javascript/etc.
On another note:
A possible solution might be to load the popup page in an iframe instead
of popping a new window. afaik you can't open a window with plain html
without a manual click?
chris.
--- End Message ---
--- Begin Message ---
> Now that might interest me. So what has been added to the PHP codebase
> that makes this work? And what tweaking would I need to do? [Can't I
> just have it display in the current window? Why bother with a popup?]
>From rumors I've heard on the list a future version of PHP may have a
progress bar function built in. Don't know if it's true or not but it
would be nice.
Ed
--- End Message ---
--- Begin Message ---
Your subject line raises a completely different question than your message.
Are you looking to sort a multi-dimensional array or "select distinct
values" from one?
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
----- Original Message -----
From: "Chakravarthy Cuddapah" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 7:55 AM
Subject: sorting a mulit-dimensional array
Can anyone pls tell me with an example on how to select distinct values from
a multi-dimensional array. Moving distinct values into another array is ok.
Thanks !
--- End Message ---
--- Begin Message ---
Thankyou, put me on the right track :)
"Jasper Bryant-Greene" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Eric
>
> What you need to do is make another PHP page, maybe info.php, which will
> fetch the info field from the DB and display it.
>
> So for example, assuming the eventname field is unique, you could make
> the info like something like:
>
> <a href="info.php?eventname=<?=urlencode($eventname)?>">information</a>
>
> And then make info.php fetch the info field from the DB, for example if
> you were using MySQL:
>
> // page header HTML here
> <?
> $row = mysql_fetch_assoc(mysql_query("SELECT info FROM table WHERE
> eventname='{$_GET['eventname']}'"));
> $info = $row['info'];
> print(nl2br($info));
> ?>
> // page footer HTML here
>
> Obviously you will need to change that to suit your site, and you may
> want to add some security to the $_GET variable being passed to the
> MySQL server to prevent attacks. Other than that, hope this helps.
>
> Regards
>
> Jasper Bryant-Greene
> Cabbage Promotions
> http://fatalnetwork.com/
> [EMAIL PROTECTED]
>
>
> Eric Holmstrom wrote:
>
> > Hi there,
> >
> > I have this.
> > Table Name = events
> > Fields = eventname, date, info. Example
> >
> > -------------------------------
> > EVENTS
> > -------------------------------
> > eventname | date | info
> > ------------------------------
> > event1 | 0202 | info here
> > ------------------------------
> > event2 | 0303 | info here 2
> >
> > The problem is that the field "info" has alot of text in it. When I
print
> > this out in an array it makes a huge page due to each event having alot
of
> > information. So im trying to make it so it will display the results like
> > this.
> >
> > event1 0202 infomation
> > event2 0303 infomation
> >
> > I want the word "infomation" to be hyperlinked, so if you click on it,
it
> > will display the information in the "info" field. The problem is I don't
> > know how to make a hyperlink that grabs the correct infomation for each
> > event.
> >
> > Any help at all will be very grateful for.
> >
> > Thankyou
> >
> > Eric Holmstrom
--- End Message ---
--- Begin Message ---
Not sure why it isn't checking my post vars correctly... any help is
appreciated.
Thanks in advance Jas
while($a = mysql_fetch_array($x)) {
list($_SESSION['id01'],$hn,$ma,$i,$v) = $a; }
$_SESSION['search'] = "...new form with listed vars...";
} elseif ((empty($_POST['hosts01'])) && (empty($_POST['search'])) &&
(!empty($_POST['hn'])) && (!empty($_POST['ma'])) &&
(!empty($_POST['i'])) && (!empty($_POST['v']))) {
unset($_SESSION['search']);
// FiX POST VAR CHECK !!!!!
$_SESSION['search'] = "... show posted vars as successful submission ..."
--- End Message ---
--- Begin Message ---
I'm wondering if anyone knows of a good file system script that allows some
one to do searches on files in a directory. For instance I'm storing resumes
in folder defined on upload dates and so forth and want to be able to do
searches through these files for keywords and would like to be able to do
Boolean searches and hopefully return a brief description and perhaps a
percentage relevance. What is very important is the Boolean thing as I need
to be able to do searches like "this AND that" OR "this AND NOT that"
Any ideas?
Thanks
--- End Message ---
--- Begin Message ---
Cliff Wells wrote:
I'm trying to write a class for abstracting some aspects
of database programming and am running into a problem:
http://hashphp.org/pastebin.php?pid=567
Well, I kept hacking at it and changing the describe() method from this:
// get a description of a table
function describe($table)
{
$db = $this->db;
$q = $db->prepare("SELECT * FROM $table LIMIT 0");
$result = $db->execute($q);
foreach ($result->tableInfo() as $c)
$this->columns[$c['name']] = NULL;
}
to this:
// get a description of a table
function describe($table)
{
$db = $this->db;
$columns = array();
$q = $db->prepare("SELECT * FROM $table LIMIT 0");
$result = $db->execute($q);
foreach ($result->tableInfo() as $c)
$columns[$c['name']] = NULL;
$this->columns = $columns;
}
seems to fix it. I can't see any reason why other than what appears to
be general PHP brokenness.
If anyone has a rational explanation as to why this is so I'd be
grateful to hear it.
Regards,
Cliff
--- End Message ---
--- Begin Message ---
I am having a really unusual problem. In my database, I currently have
string such as:
"I went to the store and bought some food. I then decided to go to the
movies and I saw
Bad Boy II."
When I extract the data out of the database, the data always seems to get
cutoff. In other words, I will only get the follow:
"I went to the store and bought some food. I then decided to go to the
movies and"
Is there some type of variable I need to set in the php.in that control how
long of a string you can have. It only seems to happen when I am storing
long strings in my database.
I am using a mssql database. I don't think it is a database issue because I
am able to update the database just fine. When I check the database it
contains all of the text. When I try to extract the data using php,
everything seems to get cut off.
Any ideas?
Thanks,
Dale
--- End Message ---
--- Begin Message ---
Is your field too small? MySQL doesn't complain when you give it a string
longer than it can accept based on the field's size. It just cuts off what
doesn't fit :-)
-----Original Message-----
From: Dale Hersh [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 6:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH PHP
I am having a really unusual problem. In my database, I currently have
string such as:
"I went to the store and bought some food. I then decided to go to the
movies and I saw
Bad Boy II."
When I extract the data out of the database, the data always seems to get
cutoff. In other words, I will only get the follow:
"I went to the store and bought some food. I then decided to go to the
movies and"
Is there some type of variable I need to set in the php.in that control how
long of a string you can have. It only seems to happen when I am storing
long strings in my database.
I am using a mssql database. I don't think it is a database issue because I
am able to update the database just fine. When I check the database it
contains all of the text. When I try to extract the data using php,
everything seems to get cut off.
Any ideas?
Thanks,
Dale
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Larry Brown <mailto:[EMAIL PROTECTED]>
on Monday, December 22, 2003 3:59 PM said:
> Is your field too small? MySQL doesn't complain when you give it a
> string longer than it can accept based on the field's size. It just
> cuts off what doesn't fit :-)
Uhh... he stated in his original email that he's using MSSQL (not MySQL)
and that the data is being INSERTed completely and without error.
--- End Message ---
--- Begin Message ---
My bad, didn't read far enough...
-----Original Message-----
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 7:04 PM
To: Larry Brown; Dale Hersh; PHP List
Subject: RE: [PHP] PROBLEMS WHEN EXTRACING DATA FROM MSSQL DATABASE WITH
PHP
Larry Brown <mailto:[EMAIL PROTECTED]>
on Monday, December 22, 2003 3:59 PM said:
> Is your field too small? MySQL doesn't complain when you give it a
> string longer than it can accept based on the field's size. It just
> cuts off what doesn't fit :-)
Uhh... he stated in his original email that he's using MSSQL (not MySQL)
and that the data is being INSERTed completely and without error.
--- End Message ---
--- Begin Message ---
I have written scripts to upload pdf files into mysql. I have the scripts
created to access those files and produce them for the user on the fly. All
well and good. Now I have a need to access one of those files and insert
its contents into a new pdf report. I have purchased the PDFlib+PDI and
want to pull the data from the variable returned from mysql. However, the
function for openning the pdf document to be inserted is looking for a file
on disk to access. Has anyone done this without writing the document to
disk first and then openning it from there? It seems that pulling it from
the db in a query and then "handing" it to the PDI functions would be less
intensive than writing it out, parsing it, and then ultimately deleting it
from disk again.
Any help would be greatly appreciated...
TIA
Larry
--- End Message ---
--- Begin Message ---
Hi!
Andreas Magnusson wrote:
>> Have a look at: http://pear.php.net/package/HTTP_Download
> I looked at it and it's hard to see what it does differently from
> what I do...
Use Ethereal or your own tracer to find out! And compare to a direct request
to a real file!
AFAIK the headers sent here are:
'Content-Type' => 'application/x-octetstream', (perhaps other)
'Cache-Control' => 'public',
'Accept-Ranges' => 'bytes',
'Connection' => 'close'
>> And the first comment of:
>> http://www.php.net/manual/en/function.session-cache-limiter.php
> Thanks, I've read that and I'm not using output compression.
Did you try something like this:
<?php
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=foo.pdf");
header("Accept-Ranges: bytes");
header("Content-Length: $len");
header("Expires: 0");
header("Cache-Control: private");
// header("Pragma: no-cache");//don't send this header!!
?>
What headers are sent at this moment? Could you post them?
>> Perhaps you should not use ouput-compression, and look at the headers
>> generated by PHP
>>
>> What headers are sent? Do you use sessions?
>
> I use sessions, and I've tried to send the same headers as the
> webserver sends if I download a file directly (rather than through
> PHP).
> It doesn't work... Maybe I should just create a temporary file and
> relocate the browser to it in case the browser is IE...
If you send the same headers and the same data - there _can_not_ be any
difference. How should your client recognize any difference? There _must_ be
a difference! Use a very small file to test it, so you can compare the whole
HTTP-Header + Body easily.
>> you can see this using Mozilla + Live Headers, Ethereal,
>> http://schroepl.net/cgi-bin/http_trace.pl ...
>
> Thanks, I've written my own HTTP header tracer in C++, but it hasn't
> been able to help me since the headers looks good to me...
Oh, I could not know ;-)
Kind Regards,
Andreas
--- End Message ---
--- Begin Message ---
In hopes that this may be of help to you...I had a hell of a time getting IE
to download pdfs that I create on the fly and finally with the help of a
couple people I got the magic code which was...
$len = strlen($buf); //buf was holding the pdf doc.
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=".$filename.".pdf");
header("Content-Transfer-Encoding: binary");
and in addition had to set the link as <a
href=http://mysite.com/myphpPDFscript.php?pdf=anything.pdf
and after all of that it worked. Which ones you may need is beyond me. I
do not know enough about how the different browsers handle headers and
really only needed to get that one functionality working for me. I hope
examining it can help...
Larry
-----Original Message-----
From: Andreas Magnusson [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 1:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: HTTP headers, IE and downloading
Thanks for your reply!
> Have a look at: http://pear.php.net/package/HTTP_Download
I looked at it and it's hard to see what it does differently from what I
do...
> And the first comment of:
> http://www.php.net/manual/en/function.session-cache-limiter.php
Thanks, I've read that and I'm not using output compression.
> Perhaps you should not use ouput-compression, and look at the headers
> generated by PHP
>
> What headers are sent? Do you use sessions?
I use sessions, and I've tried to send the same headers as the webserver
sends if I download a file directly (rather than through PHP).
It doesn't work... Maybe I should just create a temporary file and relocate
the browser to it in case the browser is IE...
> you can see this using Mozilla + Live Headers, Ethereal,
> http://schroepl.net/cgi-bin/http_trace.pl ...
Thanks, I've written my own HTTP header tracer in C++, but it hasn't been
able to help me since the headers looks good to me...
/Andreas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi!
Andreas Magnusson wrote:
I'm writing a script to view/download an email-attachment. If the file
happens to be an MS Word document and the browser IE (only tried with
6.0), then the download fails.
If I choose to download (Content-Disposition: attachment;
filename="whatever.doc") then only a part of the file (2/3) is saved
to disk. Of course viewing the file doesn't work either. It doesn't
seem to matter what I set the Content-Type to since IE seems to
ignore that anyway, however I've tried application/msword,
application/octet-stream and some others. I've tried all the things
said in the comments to the header-function in the online-docs at
php.net.
I know my Content-Length header is correct and the whole procedure
works great with Netscape 7.0 and if the attachment is a zip-file or
a jpeg-image it also works in both IE and Netscape.
Once a user of the PHP Classes site reported a similar problem when
downloading zip versions of the class archives.
I report a problem to Winzip support people and sent me the following reply.
Notice, in the PHP Classes site, downloads support byte range requests,
which are used by download managers to fetch files in many chunks.
It looks to me that the problem is due to a bug in IE as reported in the
address below.
We typically see this behaviour when the temporary internet files folder
is full; you might try clearing some files from this location, either
manually or via your browser's options.
There's also a known issue with the internet explorer program; you might
check the information available at the URL:
http://support.microsoft.com/default.aspx?scid=kb;en-us;308090
Another possible explanation is that an Anti Virus product is involved;
if the 'scan' of the archive is not completed when the browser 'passes'
the file to WinZip, the result is a 'blank' WinZip window. I'd suggest
temporarily disabling or reconfiguring your Anti virus software to avoid
the behaviour.
Regards,
Andreas
--- End Message ---
--- Begin Message ---
For some reason when I echo data from my database, I can't display anything
longer than 255 chars. As far as I can see, tt has nothing to do with my
database. Is there something in the php.ini that limits how many chars you
can write to the screen per variable.
--- End Message ---
--- Begin Message ---
On Mon, 2003-12-22 at 20:34, Dale Hersh wrote:
> For some reason when I echo data from my database, I can't display anything
> longer than 255 chars. As far as I can see, tt has nothing to do with my
> database. Is there something in the php.ini that limits how many chars you
> can write to the screen per variable.
Your database field is probably varchar instead of text.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Dale Hersh [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 22, 2003 8:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] UNUSUAL PROBLEM WHEN WRITING TO THE SCREEN
>
>
> For some reason when I echo data from my database, I can't
> display anything longer than 255 chars. As far as I can see,
> tt has nothing to do with my database. Is there something in
> the php.ini that limits how many chars you can write to the
> screen per variable.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
It has to be the field length of your database. PHP has no limitations
like this that I have heard of or encountered. If it's a mysql
database, check to see what type of field it is: TINYTEXT, TEXT,
MEDIUMTEXT, or LONGTEXT; or perhaps TINYBLOB, BLOB, MEDIUMBLOB, or
LONGBLOB. The limits on the field sizes are as follows:
TINYTEXT maximum length of 255
TEXT maximum length of 65535
MEDIUMTEXT maximum length of 16777215
LONGTEXT maximum length of 4294967295
Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
--- End Message ---
--- Begin Message ---
On Tuesday, December 23, 2003, at 12:34 PM, Dale Hersh wrote:
For some reason when I echo data from my database, I can't display
anything
longer than 255 chars. As far as I can see, tt has nothing to do with
my
database. Is there something in the php.ini that limits how many chars
you
can write to the screen per variable.
Sounds more like the mysql field is a varchar255, rather than maybe a
mediumtext, and only the first 255 chars are getting inserted into the
DB?
But I could be horribly wrong :)
Justin French
--- End Message ---
--- Begin Message ---
I had a similar problem, but never found an answer. In my situation, the
browser hung when I uploaded a file greater than 800 records. I found a post
that said I should echo something to the browser on a regular basis during
the upload, but that didn't work.
This is still of interest to me to solve. Perhaps we can together find a
solution
Chris
"Volker DċHn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
The following script works on any browser on windows xp. But not on a mac
(osx)
It simply shows the temp-directoryname.
Is anybody out there who could help me to fix this problem?
How will the upload work with Safari?
Thanks for your help.
This is the form for the upload:
<form enctype="multipart/form-data" method="POST" name="NAForm"
action="IA.php?<?=SID?>">
<input type="file" name="BildDatei" maxlength="128" size="36" value="<? echo
$Bild; ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="20480">
The following site checks the uplad and copies the file to a specific
folder:
// if the Picture was uploaded
if ($BildDatei!="" AND
is_uploaded_file($_FILES['BildDatei']['tmp_name'])) {
// Check for JPG
if ($_FILES['BildDatei']['type']=='image/pjpeg') {
// Move File
$TestFile=$UserCoverDir.$ISBNFeld.".jpg";
move_uploaded_file($_FILES['BildDatei']['tmp_name'], "$TestFile");
}
} else {
echo "Save unsuccesfull";
}
--- End Message ---
--- Begin Message ---
I've got a situation where I want to upload a file to a server then enter
the data in that file into mysql. I have used this well documented upload
form
<form enctype="multipart/form-data" action="_URL_" method="POST">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
script on many php servers. However I am on one now which is not allowing me
to upload a file greater than 12kb.
I know the upload_max_filesize is 2M but something else is stopping the
upload and I don't have a clue what it is. I know you should include <input
type="hidden" name="MAX_FILE_SIZE" value="30000"> in the above form but that
is only a convenience for the user.
This particular server is running php as a cgi module.
Thanks
Chris
--- End Message ---
--- Begin Message ---
Hello,
On 12/22/2003 05:26 AM, Homer wrote:
Notice: fopen(): Unable to find the wrapper "https" - did you forget to
enable it when you configured PHP? in
C:\Inetpub\PostNuke-0.726\mpValidar.php on line 62
The line above says it all. I think the right scheme name is ssl, not
https .
Alternatively you may want to use the Curl library. It is a bit more
complicated but using this HTTP client class it becomes much simpler and
you can make more complex request like posting forms and handling cookies.
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Sorry, but not.
I have changed it to ssl and the message is the same:
Notice: fopen(): Unable to find the wrapper "ssl" - did you forget to enable
it when you configured PHP?
I can use nothing that is out of the standard php package, because I'm doing
a script for other users that can't change their php installation.
"Manuel Lemos" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Hello,
>
> On 12/22/2003 05:26 AM, Homer wrote:
> > Notice: fopen(): Unable to find the wrapper "https" - did you forget to
> > enable it when you configured PHP? in
> > C:\Inetpub\PostNuke-0.726\mpValidar.php on line 62
>
> The line above says it all. I think the right scheme name is ssl, not
> https .
>
> Alternatively you may want to use the Curl library. It is a bit more
> complicated but using this HTTP client class it becomes much simpler and
> you can make more complex request like posting forms and handling cookies.
>
> http://www.phpclasses.org/httpclient
>
>
> --
>
> Regards,
> Manuel Lemos
>
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Can anyone pls tell me with an example on how to select distinct values from a
multi-dimensional array. Moving distinct values into another array is ok.
Thanks !
--- End Message ---
--- Begin Message ---
array_unique perhaps?
http://php.net/array_unique
--
Greg Donald
http://destiney.com/
----- Original Message -----
From: "Chakravarthy Cuddapah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 11:22 PM
Subject: [PHP] distinct values from a mulit-dimensional array
Can anyone pls tell me with an example on how to select distinct values from
a multi-dimensional array. Moving distinct values into another array is ok.
Thanks !
--- End Message ---
--- Begin Message ---
Hi everyone. Hopefully someone can help me out.
Here is what I have:
The user enters traveler names on page 1. blah blah on next couple.
Page 7 shows hotel information. I have the array of travelers names
being outputed into a select field on the page, all fine and dandy.
Where I'm having a problem is, the user can enter as many hotels as
they want, meaning the list of travelers will be displayed for each
hotel added. In the array being transferred into my script via POST,
they are all in one array.
How can I separate each hotel into it's own array, or somehow separate
the traveler names in the single array?
I was thinking of making a 2 dimentional array, but not sure how I
could do this.
I know how to create the arrays, but not sure how I can do it in my
situation.
If anyone needs any more info, ask away.
Thanks,
Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com
--- End Message ---
--- Begin Message ---
This must be obvious, but I am having trouble displaying the results of a
form in the php handler.
Here is the php code in the handler:
<?php
print " the referring doctor is $referringdr .<br>\n";
print " the referral date is $dateofreferral .<br>\n";
print " the patients first name is $pfirst .<br>\n";
print " the patients last name is $plast .<br>\n";
print " the patients telephone number is $telephone .<br>\n";
print " the referring doctor email is $refdremail .<br>\n";
print " the upload is $imageupload <br>\n";
?>
I am using the get action on the actual form and I can see all of the values
being passed to the script. The spellings of the
--- End Message ---
--- Begin Message ---
There must be something obvious that I am missing but I cant get the php
form handler with the script below to display the vairables. The form which
sends this data has the correct field names. I am also using the get action,
so I can see the variables and values so I know that they are being passed
correctly to the form. On submit, the form below displays as follows below.
<?php
print " the referring doctor is $referringdr .<br>\n";
print " the referral date is $dateofreferral .<br>\n";
print " the patients first name is $pfirst .<br>\n";
print " the patients last name is $plast .<br>\n";
print " the patients telephone number is $telephone .<br>\n";
print " the referring doctor email is $refdremail .<br>\n";
print " the upload is $imageupload <br>\n";
?>
output from
patreferhandler.php?%24referringdr=sample+person&[EMAIL PROTECTED]
.com&dateofreferral=12%2F03%2F03&pfirst=clientfirst&plast=clientlast&telepho
ne=555-5555&imageupload=&Submit=Submit
the referring doctor is .
the referral date is .
the patients first name is .
the patients last name is .
the patients telephone number is .
the referring doctor email is .
the upload is
Thanks,
Jack
--- End Message ---