php-general Digest 12 May 2002 22:31:35 -0000 Issue 1341

Topics (messages 97212 through 97262):

Re: Sending Html Pages
        97212 by: Liam MacKenzie

Re: setcookie()
        97213 by: Olexandr Vynnychenko

GD (Image generator) {?!}
        97214 by: Liam MacKenzie

Re: Apache rewrite engine and $REQUEST_URI
        97215 by: Jason Morehouse

Re: Send html email
        97216 by: Thomas Seifert
        97228 by: Jason Wong

Re: preg_grep Help (Regular expresion)
        97217 by: Jason Morehouse
        97219 by: Brian C. Doyle

Raising a custom error -- how?
        97218 by: Sqlcoders.com Programming Dept
        97220 by: John Holmes

Re: MySQL and RH 7.2
        97221 by: Chris Hewitt
        97227 by: Miguel Cruz
        97257 by: Jason Morehouse

help with sort problem
        97222 by: Nick Wilson
        97226 by: Jason Wong
        97233 by: John Holmes
        97240 by: Jason Soza
        97247 by: Nick Wilson
        97248 by: Nick Wilson
        97249 by: Nick Wilson

Re: Similiar Multiple Tags With Different Data
        97223 by: Sebastian A.
        97252 by: Kjartan Mannes

random order
        97224 by: Jule
        97230 by: John Holmes
        97241 by: Jule
        97259 by: David Freeman
        97260 by: David Freeman

Your Open Source Projects wanted.
        97225 by: David Duong

Problem with new variable system in 4.2
        97229 by: andy
        97231 by: andy
        97234 by: Philip Olson
        97237 by: andy

Is This Possible? (Database - PHP)
        97232 by: r
        97235 by: Jason Wong
        97236 by: John Holmes

Re: Debugger
        97238 by: Michael Kimsal
        97251 by: Rasmus Lerdorf
        97254 by: Michael Kimsal

Re: To all who replied to :Newbie question to everybody...PHP
        97239 by: Michael Kimsal

E-mail Confirmation script?
        97242 by: Andre Dubuc
        97244 by: SP
        97245 by: Andre Dubuc
        97246 by: r
        97250 by: SP

PHP Boolean Interpreter - Need to search a mySQL database
        97243 by: SpamSucks86

php script for backlinks?
        97253 by: PeterV

Re: an sql_layer
        97255 by: M.oozzuzz ([-_-])

Re: PHP Hosting ...
        97256 by: Matthew Ward

using cookies and flash problem
        97258 by: Deadsam

Re: Search Engine With Boolean Support <--Please help
        97261 by: Matthew Ward

Stronge Session Variable Problem with PopUP windows
        97262 by: Dennis Moore

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 ---
If you read up about 10 messages you'll get the answer.
Also, RTFM.   (Don't ask what that means, because if you read up 10 messages
you'll find out)

http://www.php.net/manual/en/function.mail.php




----- Original Message -----
From: "Salman Ahmed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 12, 2002 9:25 PM
Subject: [PHP] Sending Html Pages


Hi,

I am trying to send html pages via email, that is instead of sending plain
text format to the client I am trying to send Rich Text using mail function
of PHP. At first I was sending

--------------------------
Hello Bob,

Thanks for downloading this from my site
--------------------------

BUT for Rich Text I am doing

--------------------------
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>

<html>

<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
</head>

<body>
<div align="left">
<table border="0" cellpadding="10" cellspacing="0" width="500">
<tr>
<td>
<font face="Verdana" size="2">
    Hi,
    <br>
    Thanks for downloading this from my site
</font>
</td>
</tr>
</body>
</html>
--------------------------

But what happens is instead of sending html page it sends as a text with all
code displayed as it is without being parsed.

Please tell what can I do to send rich text emails as the this one u are
reading to the clients using PHP mail function.

Kind Regards
Salman



--- End Message ---
--- Begin Message ---
Hello jtjohnston,

Saturday, May 11, 2002, 11:42:52 PM, you wrote:

j> This is a bug "Feature/Change Request" I made to:
j> http://bugs.php.net/bug.php?id=17158

j> setcookie() states "cookies must be sent before any other headers
j> are sent (this is a restriction of cookies, not PHP).

j> I argue this is a restriction of PHP, not cookies.

j> Here is my proof:

j> http://www.collegeSherbrooke.qc.ca/languesmodernes/cookie.htm

j> I can do this any time in <body> :

j> <script>
j>    setCookie("TestCookie","first time",expdate);
j>    var DisplayData = getCookie("TestCookie");
j>    document.write(DisplayData);
j>    setCookie("TestCookie","second time",expdate);
j>    var DisplayData = getCookie("TestCookie");
j>    document.write(DisplayData);
j>  </script>

j> I want to be able to setcookie() anytime I want, before and after I
j> declare any HTML.
j> This will never get changed, unless we ask for it.

j> I would appreciate your vote of support at:

j> http://bugs.php.net/bug.php?id=17158

j> before the bug people "close" this thread.

Are you kidding?



-- 
Best regards,
 Olexandr                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hi guys,

Got a little prob that's got me stumped.
This simple image generator script:
http://scripts.operationenigma.net/image_generator.php
Source: http://scripts.operationenigma.net/image_generator.phps
works, I know because it was working on my system before I recompiled PHP.
Feel free to have a play, but just clicking submit as-is should generate a
black box with the text in it.

Now, however, it doesn't work...
Here's my phpinfo():
http://scripts.operationenigma.net/phpinfo.php
It says GD's compiled in there, but it doesn't work!

Surely there's a logical explanation for this...
Any help is appreciated  :-)

Cheers,
Liam


--- End Message ---
--- Begin Message ---
$SCRIPT_URI works sweet.

-J

On Fri, 10 May 2002 02:47:39 +1200, Peterv wrote:

> Hi,
> I'm using apache rewrite and I need to get the URL that I see in the
> browser. When using $REQUEST_URI I get the page where the rewrite is
> being redirected to. How can I get my hands on the actual URL that I see
> in the browser?
> 
> Thanks for any hints. I haven't coded for a while and am a bit out of
> it... Peter
 
--
 Jason Morehouse ([EMAIL PROTECTED])
 Netconcepts LTD, Auckland, New Zealand    
 * Linux: because rebooting is for adding hardware.
--- End Message ---
--- Begin Message ---
On Sun, 12 May 2002 00:07:57 -0500 (CDT)
[EMAIL PROTECTED] (Miguel Cruz) wrote:

> On Sat, 11 May 2002, Alex Shi wrote:
> > Thanks for all of you who answered my question. But another of
> > my stupid question is: what is RTFM?
> 
> RTFM == Read The Flurking Manual

Or Read the fine manual 

(or replace fine with every word which begins with f ;-)
--- End Message ---
--- Begin Message ---
On Sunday 12 May 2002 08:45, Michael Geier wrote:
> While I understand the necessity in not answering every question that a
> newbie may post, a more pleasant approach would have been:
>
> "the following is documented at
> http://www.php.net/manual/en/function.mail.php"; or
> "see the Content-Type: header for instructions on how to do this".
>
> Do you think someone who won't read the docs, or search the archives, prior
> to the question understands what RTFM means?

One has to draw the line somewhere. We can't assume everytime that a newbie 
know absolutely nothing. I hope we can at least assume they know how to use a 
(THE) search engine:

google -> rtfm

 RTFM
   ... RTFM /RTFM/ imp. [Unix] Abbreviation for `Read The Fucking
   Manual'. 1. Used by gurus to brush off questions they consider
   trivial or annoying. Compare Don't do ...

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Some circumstantial evidence is very strong, as when you find a trout in
the milk.
                -- Thoreau
*/

--- End Message ---
--- Begin Message ---
$file needs to be an array:

        $file = file("myfile.txt");

On Sun, 12 May 2002 12:56:08 +1200, Brian C. Doyle wrote:

> Hello all,
> 
> I have a file that has ip address in it.. I need to pull those ip
> addresses out.
> Currently I am trying:
> 
> $ips=preg_grep("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/",$file);
> print_r(array_values ($ips));
> 
> And well i am getting nothing!
> 
> Anyone?
 

-- 
 Jason Morehouse ([EMAIL PROTECTED])  
 Netconcepts LTD, Auckland, New Zealand    
 - Linux: because rebooting is for adding hardware.
--- End Message ---
--- Begin Message ---
Hello all,

I did foget to mention that I had $file as
$file=file("Status.htm");
and it reads the file as 1 line it seams.


At 11:31 PM 5/12/02 +1200, Jason Morehouse wrote:
>$file needs to be an array:
>
>         $file = file("myfile.txt");
>
>On Sun, 12 May 2002 12:56:08 +1200, Brian C. Doyle wrote:
>
> > Hello all,
> >
> > I have a file that has ip address in it.. I need to pull those ip
> > addresses out.
> > Currently I am trying:
> >
> > $ips=preg_grep("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/",$file);
> > print_r(array_values ($ips));
> >
> > And well i am getting nothing!
> >
> > Anyone?
>
>
>--
>  Jason Morehouse ([EMAIL PROTECTED])
>  Netconcepts LTD, Auckland, New Zealand
>  - Linux: because rebooting is for adding hardware.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hiya,
I want to be able to raise an error in some code I'm creating for reuse,
most parts of this code deals with errors and just uses defaults as
appropriate,
but I need to be able to raise an error that will stop the PHP script
interpreter and throw an error back to the developer.

I've tried searching the manual for "user defined error", "throw error",
"raise error" etc,
but I guess it's just one of those functions that it's hard to find without
already knowing where to find it.

Any help would be appreciated!,
Dw.

--- End Message ---
--- Begin Message ---
How about looking through the table of contents... ??

XXVII: Error Handling and Logging Functions

http://www.php.net/manual/en/ref.errorfunc.php

---John Holmes...

> -----Original Message-----
> From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 5:55 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Raising a custom error -- how?
> 
> Hiya,
> I want to be able to raise an error in some code I'm creating for
reuse,
> most parts of this code deals with errors and just uses defaults as
> appropriate,
> but I need to be able to raise an error that will stop the PHP script
> interpreter and throw an error back to the developer.
> 
> I've tried searching the manual for "user defined error", "throw
error",
> "raise error" etc,
> but I guess it's just one of those functions that it's hard to find
> without
> already knowing where to find it.
> 
> Any help would be appreciated!,
> Dw.
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Todd,

/usr/bin/mysqladmin

HTH
Chris

Todd Cary wrote:

>I tried "locate" and "find" and both come up empty for mysqladmin.
>
>Am I missing something stupid here?
>
>Todd
>
>--
>Todd Cary
>Ariste Software
>2200 D Street Extension
>Petaluma, CA 94952
>707-773-4523
>[EMAIL PROTECTED]
>
>
>


--- End Message ---
--- Begin Message ---
Also, try locate again now that it's been a day. The locate database 
usually gets updated overnight, so it doesn't immediately reflect new 
additions.

miguel

On Sun, 12 May 2002, Chris Hewitt wrote:
> Todd,
> 
> /usr/bin/mysqladmin
> 
> HTH
> Chris
> 
> Todd Cary wrote:
> 
> >I tried "locate" and "find" and both come up empty for mysqladmin.
> >
> >Am I missing something stupid here?
> >
> >Todd
> >
> >--
> >Todd Cary
> >Ariste Software
> >2200 D Street Extension
> >Petaluma, CA 94952
> >707-773-4523
> >[EMAIL PROTECTED]
> >
> >
> >
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---
Check to see that you have the mysql client package installed:

`rpm -q MySQL-client`

If not, grab it!
-J

On Sun, 12 May 2002, Chris Hewitt wrote:

> Todd,
> 
> /usr/bin/mysqladmin
> 
> HTH
> Chris
> 
> Todd Cary wrote:
> 
> >I tried "locate" and "find" and both come up empty for mysqladmin.
> >
> >Am I missing something stupid here?
> >
> >Todd
> >
> >--
> >Todd Cary
> >Ariste Software
> >2200 D Street Extension
> >Petaluma, CA 94952
> >707-773-4523
> >[EMAIL PROTECTED]
> >
> >
> >
> 
> 
> 
> 

-- 

.--- .- ... --- -. /  -- --- .-. . .... --- ..- ... .

 Jason Morehouse
 [EMAIL PROTECTED]
 
 Netconcepts LTD
 Auckland, New Zealand

 - Linux: free your mind and your OS will follow

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all, 
I hope someone might help me with a little puzzle...

I have bunch of db results and one of the fields is 'name', 
I want to see if there are 2 parts to it like FirstName LastName and if
so order by the last name.

I can see explode() being the php function I need here but am a little
lost as to what will happen if there is only one word in the name var.

If someone can suggest what I might do that would be great! 
many thanks...
- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE83pbjHpvrrTa6L5oRAv5XAJsFAXLb0puFyeknXoaGL7rYUHGxVACdHxt8
ej2/Y56p75z5jZ43DvSbDzo=
=8rzj
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
On Monday 13 May 2002 00:23, Nick Wilson wrote:
> Hi all,
> I hope someone might help me with a little puzzle...
>
> I have bunch of db results and one of the fields is 'name',
> I want to see if there are 2 parts to it like FirstName LastName and if
> so order by the last name.
>
> I can see explode() being the php function I need here but am a little
> lost as to what will happen if there is only one word in the name var.
>
> If someone can suggest what I might do that would be great!
> many thanks...

Not knowing exactly what it is you want I'm assuming the following: if there 
is a lastname use that in the sort, otherwise use the firstname. Thus your 
sorted list will look something like:

  Bryan Adams (Adams, Bryan)
  Arnold
  Brian
  John Butcher (Butcher, John)

If that is what you want then:
while (names) {
  explode the name
  if there is more than one element swap it, then join
  add this processed name onto a new array
}

use one of the array sort functions to sort the new array.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Wagner's music is better than it sounds.
                -- Mark Twain
*/

--- End Message ---
--- Begin Message ---
You really want to handle this in your database. If you need data to be
in two fields, first name and last name, then put it in your database
that way. Save yourself some time. How easy is it to just add another
text field in your form, and insert one more variable into the
database??? 

Whatever kind of "hack" you come up with in PHP is going to be a waste
of time and memory. 

---John Holmes...

> -----Original Message-----
> From: Nick Wilson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 9:23 AM
> To: php-general
> Subject: [PHP] help with sort problem
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> I hope someone might help me with a little puzzle...
> 
> I have bunch of db results and one of the fields is 'name',
> I want to see if there are 2 parts to it like FirstName LastName and
if
> so order by the last name.
> 
> I can see explode() being the php function I need here but am a little
> lost as to what will happen if there is only one word in the name var.
> 
> If someone can suggest what I might do that would be great!
> many thanks...
> - --
> Nick Wilson     //  www.explodingnet.com
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE83pbjHpvrrTa6L5oRAv5XAJsFAXLb0puFyeknXoaGL7rYUHGxVACdHxt8
> ej2/Y56p75z5jZ43DvSbDzo=
> =8rzj
> -----END PGP SIGNATURE-----
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I actually asked this same type of question not too long ago. Just separate
the name field into first_name and last_name - it'll be better in the long
run. It's not as hard as it sounds - dump your table, use some program that
will read comma delimited stuff and export as tab-delimited (I used Excel),
separate the first and last names, modify your table to have the correct
columns, clear it, add the data back in (LOAD DATA...)

It may require some modification of your scripts you already have, but
really it's just much cleaner this way. I didn't want to do it simply
because I was lazy and using PHP to do this for me seemed to be the easier
choice. It's not, and doing it that way is far from efficient.

HTH,

Jason Soza

-----Original Message-----
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 1:26 PM
To: 'PHP-General'
Subject: RE: [PHP] help with sort problem


You really want to handle this in your database. If you need data to be
in two fields, first name and last name, then put it in your database
that way. Save yourself some time. How easy is it to just add another
text field in your form, and insert one more variable into the
database???

Whatever kind of "hack" you come up with in PHP is going to be a waste
of time and memory.

---John Holmes...

> -----Original Message-----
> From: Nick Wilson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 9:23 AM
> To: php-general
> Subject: [PHP] help with sort problem
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> I hope someone might help me with a little puzzle...
>
> I have bunch of db results and one of the fields is 'name',
> I want to see if there are 2 parts to it like FirstName LastName and
if
> so order by the last name.
>
> I can see explode() being the php function I need here but am a little
> lost as to what will happen if there is only one word in the name var.
>
> If someone can suggest what I might do that would be great!
> many thanks...
> - --
> Nick Wilson     //  www.explodingnet.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE83pbjHpvrrTa6L5oRAv5XAJsFAXLb0puFyeknXoaGL7rYUHGxVACdHxt8
> ej2/Y56p75z5jZ43DvSbDzo=
> =8rzj
> -----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then John Holmes declared....
> Whatever kind of "hack" you come up with in PHP is going to be a waste
> of time and memory. 

Depends on your view point, the client was happy with one field for the
name and now wants the records returned sorted by last name. Bastard.
There is loads of stuff to edit in the 'admin' program and it's
interaction with other tables and processes in the site so the PHP fix
was actually simpler.

Cheers...
- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE83tmtHpvrrTa6L5oRAlgcAKCu8NX7YxiCR7TNpOjJH7zoN6cuZQCfU4X/
UQL3OADFu+TALFr+FOnpdEE=
=QbVn
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then John Holmes declared....
> Whatever kind of "hack" you come up with in PHP is going to be a waste
> of time and memory. 

Depends on your view point, the client was happy with one field for the
name and now wants the records returned sorted by last name. Bastard.
There is loads of stuff to edit in the 'admin' program and it's
interaction with other tables and processes in the site so the PHP fix
was actually simpler.

Cheers...
- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE83tmkHpvrrTa6L5oRAjKHAJ9FlA6DENYNP3OA/ZgX80kEoQ2j1ACghSJP
HqCl4VPGOK9+hn1zPa3yNME=
=4mDz
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Jason Wong declared....
> If that is what you want then:
> while (names) {
>   explode the name
>   if there is more than one element swap it, then join
>   add this processed name onto a new array
> }
> 
> use one of the array sort functions to sort the new array.

Yep, cheers Jason, here's what I came up with 

function sort_teachers() {

    global $teach;

    $array_2_sort=array();

    foreach($teach->list_teachers() as $key => $val) {
        $split=explode(" ", $val["name"]);
        $array_2_sort[$key]=end($split);
    }
    asort($array_2_sort);
    return($array_2_sort);
}
- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE83toJHpvrrTa6L5oRApkiAJ0YwgusbS4uBaJWOo2eory16FnM7ACfcPS0
JXjm2JXTWeN22KTs7dJwrWI=
=Z7zE
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hello
 I have recently been trying to parse an XML document that has different
content in the same tags. Here is an example:

<LIST_ITEM>1</LIST_ITEM>
<LIST_ITEM>2</LIST_ITEM>
<LIST_ITEM>3</LIST_ITEM>
...

I am trying to get the content from <LIST_ITEM> into an array. I want the
content of the first <LIST_ITEM> to go into $p->ART_ID[0] and the next to go
into $p->ART_ID[1] and so on. Here is what my Element Content Function looks
like:

-------------------------------------------------------------

function elementContent($parser, $data, $attrs='') {
        global $tag, $data, $test;
        global $p;

        $ti = sizeof( $tag ) - 1;


                if ( $tag[$ti] == 'LIST_ITEM' ) {

                $p->ART_ID[] .= $data;
        }


}

------------------------------------------------------------

When I type in echo $p->ART_ID[0]  I should get 1 however I get 1 2 3. For
some reason all the content goes only into one section of the array. Does
anyone know how I can fix this?


Thanks.

--- End Message ---
--- Begin Message ---
Sunday, May 12, 2002, 6:39:31 PM, Sebastian A. wrote:
> Hello
>  I have recently been trying to parse an XML document that has different
> content in the same tags. Here is an example:

> <LIST_ITEM>1</LIST_ITEM>
> <LIST_ITEM>2</LIST_ITEM>
> <LIST_ITEM>3</LIST_ITEM>
> ...

> I am trying to get the content from <LIST_ITEM> into an array. I want the
> content of the first <LIST_ITEM> to go into $p->ART_ID[0] and the next to go
> into $p->ART_ID[1] and so on. Here is what my Element Content Function looks
> like:

Without the rest of the code I would suspect this to work:

function elementContent($parser, $data, $attrs='') {
        global $tag, $p;

        $ti = sizeof( $tag ) - 1;

        if ( $tag[$ti] == 'LIST_ITEM' ) {
                $p->ART_ID[] = $data;
        }
}

Basically when you are assigning content to a new part of the array you
don't use .= but just =

-- 
Kjartan <[EMAIL PROTECTED]> (http://natrak.net/)
:: "A program is a spell cast over a computer, turning input
    into error messages."
:: Drupal (www.drupal.org)


--- End Message ---
--- Begin Message ---
Hey guys and gals,
I have a problem: 
I have a mysql databse with 4 rows, and each row (row1, row2, row3, and row4) 
contains a sentence. now i want these sentences to appear in random order:
instance: 1     2    etc.
         row2  row4
         row4  row2
         row1  row1
         row3  row3

how do i go about that??
any ideas apreciated.
thanks

Jule
-- 
|\/\__________________________/\/|
|   Jule Slootbeek               |
|   [EMAIL PROTECTED]        |
|   http://blindtheory.cjb.net   |
|   __________________________   |
|/\/                          \/\|
--- End Message ---
--- Begin Message ---
Nothing to do with PHP...

SELECT * FROM table ORDER BY RAND();

---John Holmes...

> -----Original Message-----
> From: Jule [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] random order
> 
> Hey guys and gals,
> I have a problem:
> I have a mysql databse with 4 rows, and each row (row1, row2, row3,
and
> row4)
> contains a sentence. now i want these sentences to appear in random
order:
> instance: 1     2    etc.
>        row2  row4
>        row4  row2
>        row1  row1
>        row3  row3
> 
> how do i go about that??
> any ideas apreciated.
> thanks
> 
> Jule
> --
> |\/\__________________________/\/|
> |   Jule Slootbeek             |
> |   [EMAIL PROTECTED]      |
> |   http://blindtheory.cjb.net         |
> |   __________________________         |
> |/\/                        \/\|
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
hmm it got a little more complicated now,
i have a table with: id title question answer1 answer2 answer3 answer4.
how can i use all of those in a php page but only randomize the answers?

so i get

title           title

question        question

answer3         answer4
answer2         answer1
answer4         answer3
answer1         answer2

any ideas?
thanks,

Jule
On Sunday 12 May 2002 17:30, you wrote:
> Add on a LIMIT to restrict it to return a certain number of rows.
>
> If you had a table of say, 100 rows, and you wanted four random ones out
> of the 100, then you'd use this:
>
> SELECT * FROM table ORDER BY RAND() LIMIT 4;
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Jule [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, May 12, 2002 11:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] random order
> >
> > Thanks John,
> > I thought that that command only selected a random row..
> > must've read wrong.
> > thanks.
> >
> > Jule
> >
> > On Sunday 12 May 2002 17:21, you wrote:
> > > Nothing to do with PHP...
> > >
> > > SELECT * FROM table ORDER BY RAND();
> > >
> > > ---John Holmes...
> > >
> > > > -----Original Message-----
> > > > From: Jule [mailto:[EMAIL PROTECTED]]
> > > > Sent: Sunday, May 12, 2002 9:49 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] random order
> > > >
> > > > Hey guys and gals,
> > > > I have a problem:
> > > > I have a mysql databse with 4 rows, and each row (row1, row2,
>
> row3,
>
> > > and
> > >
> > > > row4)
> > > > contains a sentence. now i want these sentences to appear in
>
> random
>
> > > order:
> > > > instance: 1     2    etc.
> > > >          row2  row4
> > > >          row4  row2
> > > >          row1  row1
> > > >          row3  row3
> > > >
> > > > how do i go about that??
> > > > any ideas apreciated.
> > > > thanks
> > > >
> > > > Jule
> > > > --
> > > >
> > > > |\/\__________________________/\/|
> > > > |   Jule Slootbeek               |
> > > > |   [EMAIL PROTECTED]        |
> > > > |   http://blindtheory.cjb.net   |
> > > > |   __________________________   |
> > > > |/\/                          \/\|
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> >
> > |\/\__________________________/\/|
> > |   Jule Slootbeek           |
> > |   [EMAIL PROTECTED]    |
> > |   http://blindtheory.cjb.net       |
> > |   __________________________       |
> > |/\/                              \/\|

-- 
|\/\__________________________/\/|
|   Jule Slootbeek               |
|   [EMAIL PROTECTED]        |
|   http://blindtheory.cjb.net   |
|   __________________________   |
|/\/                          \/\|
--- End Message ---
--- Begin Message ---

 > hmm it got a little more complicated now,
 > i have a table with: id title question answer1 answer2 
 > answer3 answer4. how can i use all of those in a php page 
 > but only randomize the answers?

You have multiple questions with the same answers?  Then split your
table into two tables and put all your answers in one and your questions
in the other.  Then include another table that contains question and
answer id equivalents.

CYA, Dave


--- End Message ---
--- Begin Message ---

 > I have a mysql databse with 4 rows, and each row (row1, 
 > row2, row3, and row4) 
 > contains a sentence. now i want these sentences to appear in 
 > random order:

I've always found mysql's RAND() function to be of use.  Specifically:

SELECT * FROM MyTable WHERE Some='Condition' ORDER BY RAND() LIMIT 4

CYA, Dave


--- End Message ---
--- Begin Message ---
Hello,

I'm David Duong of the CGI open source Foundry.  We are looking for a script
to produce.  If you have a good script an would like some programmers to
help develop it I invite you to visit http://cosf.sourceforge.net.


--- End Message ---
--- Begin Message ---
Hi there,

I did upgrade to 4.2 and now I am "recoding" :-(  my whole application.

So I did get behind the basic idea, but there is one case, where I just dont
know how to solve it:

Im a doing something similar like on php.net when you type in
php.net/functionname. In my .htaccess file I do redirect in case of a 404 to
a php page where I do redirect to a page called /profiles/80000001.html
In the file profiles (which is a php file not a dir) I do grab the
80000001.html and extract the 80000001 to explode it into parameters. Then I
do grab the functionname (or in my case user name) to redirect him to the
propper site.

In php4.1.1 it worked fine. Now I changed the first function to:
 $PATH_INFO = $_SERVER[REQUEST_URI];  (was $PATH_INFO in 4.1.1)

The username was fetched in 4.1.1 with ( I know I have to change this as
well):
$parameter = explode('/', $REQUEST_URI);
$user_name = $parameter[1];

So now I do get as $PATH_INFO the username which is mixing up my whole idea!
How can I get both parameters like in good old former times :-)

Do u see my trouble?

I appreciate every help on that,

Thanx, Andy


--- End Message ---
--- Begin Message ---
basicly this problem seems to result of the new way I do get the string from
the url

I used to get it with $PATH_INFO
Now I do a  $PATH_INFO = $_SERVER[REQUEST_URI];

which is not the same result.

Does anybody know a equal command for $PHP_INFO ?

ANdy


"Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> I did upgrade to 4.2 and now I am "recoding" :-(  my whole application.
>
> So I did get behind the basic idea, but there is one case, where I just
dont
> know how to solve it:
>
> Im a doing something similar like on php.net when you type in
> php.net/functionname. In my .htaccess file I do redirect in case of a 404
to
> a php page where I do redirect to a page called /profiles/80000001.html
> In the file profiles (which is a php file not a dir) I do grab the
> 80000001.html and extract the 80000001 to explode it into parameters. Then
I
> do grab the functionname (or in my case user name) to redirect him to the
> propper site.
>
> In php4.1.1 it worked fine. Now I changed the first function to:
>  $PATH_INFO = $_SERVER[REQUEST_URI];  (was $PATH_INFO in 4.1.1)
>
> The username was fetched in 4.1.1 with ( I know I have to change this as
> well):
> $parameter = explode('/', $REQUEST_URI);
> $user_name = $parameter[1];
>
> So now I do get as $PATH_INFO the username which is mixing up my whole
idea!
> How can I get both parameters like in good old former times :-)
>
> Do u see my trouble?
>
> I appreciate every help on that,
>
> Thanx, Andy
>
>


--- End Message ---
--- Begin Message ---

> In php4.1.1 it worked fine. Now I changed the first function to:
>  $PATH_INFO = $_SERVER[REQUEST_URI];  (was $PATH_INFO in 4.1.1)

$PATH_INFO worked fine because register_globals was on 
which essentially created $PHP_INFO from $_SERVER['PHP_INFO'] 
so how about you do this:

  if (!ini_get('register_globals')) {
    extract($HTTP_SERVER_VARS);
  }

So if register_globals = off, $PHP_INFO will exist as will 
all web server predefined variables, like $DOCUMENT_ROOT.

If you are unsure what predefined variable to use, make 
a call to phpinfo() and it'll show you exactly what is 
available to the script.  And print_r() will also be helpful 
for various activities too.

Regards,
Philip Olson

--- End Message ---
--- Begin Message ---
thanx, this worked

Andy
"Philip Olson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
Pine.BSF.4.10.10205121820290.61243-100000@localhost">news:Pine.BSF.4.10.10205121820290.61243-100000@localhost...
>
> > In php4.1.1 it worked fine. Now I changed the first function to:
> >  $PATH_INFO = $_SERVER[REQUEST_URI];  (was $PATH_INFO in 4.1.1)
>
> $PATH_INFO worked fine because register_globals was on
> which essentially created $PHP_INFO from $_SERVER['PHP_INFO']
> so how about you do this:
>
>   if (!ini_get('register_globals')) {
>     extract($HTTP_SERVER_VARS);
>   }
>
> So if register_globals = off, $PHP_INFO will exist as will
> all web server predefined variables, like $DOCUMENT_ROOT.
>
> If you are unsure what predefined variable to use, make
> a call to phpinfo() and it'll show you exactly what is
> available to the script.  And print_r() will also be helpful
> for various activities too.
>
> Regards,
> Philip Olson
>


--- End Message ---
--- Begin Message ---
Hey there guys,
I have a slight problem which i could not solve via Java servlets and now
that I am migrating to PHP I was wondering if its possible...

I am hosting with a company that has given me a database (MySql) I am using
the database for all my apps which are only being accessed via my
servlets....... I want to change that and convert all my servlets to PHP.
Being new to PHP i am sure to make a lot of mistakes and instead of
uploading my PHP page, getting errors/ redoing it, uploading etc I was kinda
hoping i could connect to the remote database via my local machine?
I already have PHP installed on my machine..... on the remote host the
details are

Localhost
jimmy*** (Username)
gunsand***** (Password)
umace_com (Database name)

Is this possible?
Any help and comments appreciated.
Cheers,
-Ryan

/* Whats the difference between the pope and your boss? The pope only wants
you to kiss his ring! */


--- End Message ---
--- Begin Message ---
On Monday 13 May 2002 15:05, r wrote:
> Hey there guys,
> I have a slight problem which i could not solve via Java servlets and now
> that I am migrating to PHP I was wondering if its possible...
>
> I am hosting with a company that has given me a database (MySql) I am using
> the database for all my apps which are only being accessed via my
> servlets....... I want to change that and convert all my servlets to PHP.
> Being new to PHP i am sure to make a lot of mistakes and instead of
> uploading my PHP page, getting errors/ redoing it, uploading etc I was
> kinda hoping i could connect to the remote database via my local machine? I
> already have PHP installed on my machine..... on the remote host the
> details are
>
> Localhost
> jimmy*** (Username)
> gunsand***** (Password)
> umace_com (Database name)
>
> Is this possible?

It depends on whether your hosting company allows remote connections to the 
mysql server. Speak to them.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You can tell how far we have to go, when FORTRAN is the language of
supercomputers.
                -- Steven Feiner
*/

--- End Message ---
--- Begin Message ---
Yes, it's certainly possible. You will have to talk your host into
giving you remote access though, which could be hard. 

How permissions work in MySQL is that your username is given permission
to connect from a specific host. Generally, the host is listed as
'localhost' meaning the script has to be on the same server as MySQL.
You can also have '%' as your host, meaning you can connect from
anywhere. Or, when your ISP assigns you an IP, the first 2 or 3 octets
are generally the same. So you could put something like '123.123.%' or
'123.123.123.%' in your host. 

You hosting provider, if they're any good, will know all about this.
It's hard to talk people into giving you access, though, because they
are generally pretty paranoid. 

---John Holmes...

> -----Original Message-----
> From: r [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 13, 2002 12:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Is This Possible? (Database - PHP)
> 
> Hey there guys,
> I have a slight problem which i could not solve via Java servlets and
now
> that I am migrating to PHP I was wondering if its possible...
> 
> I am hosting with a company that has given me a database (MySql) I am
> using
> the database for all my apps which are only being accessed via my
> servlets....... I want to change that and convert all my servlets to
PHP.
> Being new to PHP i am sure to make a lot of mistakes and instead of
> uploading my PHP page, getting errors/ redoing it, uploading etc I was
> kinda
> hoping i could connect to the remote database via my local machine?
> I already have PHP installed on my machine..... on the remote host the
> details are
> 
> Localhost
> jimmy*** (Username)
> gunsand***** (Password)
> umace_com (Database name)
> 
> Is this possible?
> Any help and comments appreciated.
> Cheers,
> -Ryan
> 
> /* Whats the difference between the pope and your boss? The pope only
> wants
> you to kiss his ring! */
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Jose Leon wrote:

> 
> It would be nice that php itself incoporates a system to debug php 
> programs, like in PHP 3, in that way a development tool for php would 
> be enabled to debug modifying the php.ini with debug.enabled=true and 
> listening to a port. The system will work on any php distribution 
> because will be part of php itself. Why the debugger was removed from 
> PHP 3?


I think it's pretty obvious it was removed during the PHP4
development so that Zend would have a 'value add' to sell later.

That's the cynical part of me answering, obviously, and I've
never heard an answer one way or another why it was removed,
but the timing seems pretty remarkable.

Michael Kimsal
http://www.logicreate.com
734-480-9961

--- End Message ---
--- Begin Message ---
That's just not the case.  The debugger in PHP 3 would not work at all in
PHP 4 and would need a complete rewrite.  So, being cynical you might say
that someone should have written a debugger for PHP 4 and the fact that
nobody did was the conspiracy, but it makes no sense to say it was removed
for conspiracy reasons.  I mean if the PHP 3 debugging code worked with
PHP 4, then you could just take the code from PHP 3 and use it.  It's not
like it is deleted from CVS.

-Rasmus

On Sun, 12 May 2002, Michael Kimsal wrote:

> Jose Leon wrote:
>
> >
> > It would be nice that php itself incoporates a system to debug php
> > programs, like in PHP 3, in that way a development tool for php would
> > be enabled to debug modifying the php.ini with debug.enabled=true and
> > listening to a port. The system will work on any php distribution
> > because will be part of php itself. Why the debugger was removed from
> > PHP 3?
>
>
> I think it's pretty obvious it was removed during the PHP4
> development so that Zend would have a 'value add' to sell later.
>
> That's the cynical part of me answering, obviously, and I've
> never heard an answer one way or another why it was removed,
> but the timing seems pretty remarkable.
>
> Michael Kimsal
> http://www.logicreate.com
> 734-480-9961
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Rasmus Lerdorf wrote:
> That's just not the case.  The debugger in PHP 3 would not work at all in
> PHP 4 and would need a complete rewrite.  So, being cynical you might say
> that someone should have written a debugger for PHP 4 and the fact that
> nobody did was the conspiracy, but it makes no sense to say it was removed
> for conspiracy reasons.  I mean if the PHP 3 debugging code worked with
> PHP 4, then you could just take the code from PHP 3 and use it.  It's not
> like it is deleted from CVS.
> 


I'll stand corrected on that.  I'd not looked at the code closely enough 
to know if there were major compatibility problems.

Are there any movements to get things like the stack trace module and 
the Russian dbg debugger module into the standard PHP distribution?

If there was at least some links on the PHP.net site, that would help
people to know they're available.






--- End Message ---
--- Begin Message ---
R wrote:
> Hey Guys,
> I thank each and everyone one of you who replied, yeah, i got flamed a
> couple of times from some of you for the "sleep" bit but need i remind you
> that i am a newbie?


You didn't get flamed because you're a newbie, you got flamed
because it appeared you didn't do ANY research at all - you have
a book but didn't seem to read it (I'd guess there's at least a mention
of it there) but more importantly you didn't seem to even hit a basic
search engine.  Search google.com or the php.net site for 'sleep' and 
you'd have gotten exactly what you were looking for. You may have well 
asked if PHP has a way to do something "if" a condition is true.

Abstract issues about arrays are a bit harder to get across in a search 
engine, because you're not looking for syntax but perhaps more a 
tutorial (I'd guess searching for 'php array tutorial' would net you 
exactly what you want though too).

Use search engines first - you're bounch to find exactly what you're 
looking for in a fraction of a time it takes people multiple people to 
read and respond, then for you to get those responses.



Michael Kimsal
http://www.logicreate.com
734-480-9961



--- End Message ---
--- Begin Message ---
I've looked about for an 'Email Confirmation' script that many sites use for 
verifcation of wannabee new members. That is, the person subscribes, is sent 
a 'confirmation' number to which they must have in the 'Subject' area of 
their reply. 

I would like to implement this on my site, but I haven't discovered a source 
for a script, or how to go about doing it. That is, how do you retrieve items 
from an incoming e-mail, and is it possible to parse the same?

If anyone who has seen such a script could point me to where I could find 
one, I would greatly appreciate it, or in the Manual, what it would be listed 
under. The 'mail()' function doesn't seem to include how to access received 
e-mails, and to parse individual copmponents of a message.

Btw, does anyone know what's up with the 'Search' function of the PHP-general 
lst? It always seems to be 'offline'. Rather hard to search the archives for 
previously asked questions.

Tia, 
Andre


-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/
--- End Message ---
--- Begin Message ---
I would suggest just sending them an email with a
link like this and telling them to click on it to
confirm their membership.

http://www.mysite.com/confirm.php?uniqueid=2i3k238
s9sd0s99d

The confirm.php page would look up the uniqueid
and try to find it in your database.  If it's
there then that means the email address they gave
you exists and they have access to that email
account cuz they know that uniqueid.

After confirming, you could send a "welcome user"
email and include another link that they can use
for all other account management like
unsubscribing, changing password, changing
personal info ...

http://www.mysite.com/account.php




-----Original Message-----
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: May 12, 2002 4:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] E-mail Confirmation script?


I've looked about for an 'Email Confirmation'
script that many sites use for
verifcation of wannabee new members. That is, the
person subscribes, is sent
a 'confirmation' number to which they must have in
the 'Subject' area of
their reply.

I would like to implement this on my site, but I
haven't discovered a source
for a script, or how to go about doing it. That
is, how do you retrieve items
from an incoming e-mail, and is it possible to
parse the same?

If anyone who has seen such a script could point
me to where I could find
one, I would greatly appreciate it, or in the
Manual, what it would be listed
under. The 'mail()' function doesn't seem to
include how to access received
e-mails, and to parse individual copmponents of a
message.

Btw, does anyone know what's up with the 'Search'
function of the PHP-general
lst? It always seems to be 'offline'. Rather hard
to search the archives for
previously asked questions.

Tia,
Andre


--
Please pray the Holy Rosary to end the holocaust
of abortion.
Remember in your prayers the Holy Souls in
Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet:
http://www.webhart.net/csrb/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Thanks,

Now why didn't that ever occur to me? It's simple and very effective.
Thanks for the idea! 

Regards,
Andre


On Sunday 12 May 2002 04:51 pm, you wrote:
> I would suggest just sending them an email with a
> link like this and telling them to click on it to
> confirm their membership.
>
> http://www.mysite.com/confirm.php?uniqueid=2i3k238
> s9sd0s99d
>
> The confirm.php page would look up the uniqueid
> and try to find it in your database.  If it's
> there then that means the email address they gave
> you exists and they have access to that email
> account cuz they know that uniqueid.
>
> After confirming, you could send a "welcome user"
> email and include another link that they can use
> for all other account management like
> unsubscribing, changing password, changing
> personal info ...
>
> http://www.mysite.com/account.php
>
>
>
>
> -----Original Message-----
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: May 12, 2002 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] E-mail Confirmation script?
>
>
> I've looked about for an 'Email Confirmation'
> script that many sites use for
> verifcation of wannabee new members. That is, the
> person subscribes, is sent
> a 'confirmation' number to which they must have in
> the 'Subject' area of
> their reply.
>
> I would like to implement this on my site, but I
> haven't discovered a source
> for a script, or how to go about doing it. That
> is, how do you retrieve items
> from an incoming e-mail, and is it possible to
> parse the same?
>
> If anyone who has seen such a script could point
> me to where I could find
> one, I would greatly appreciate it, or in the
> Manual, what it would be listed
> under. The 'mail()' function doesn't seem to
> include how to access received
> e-mails, and to parse individual copmponents of a
> message.
>
> Btw, does anyone know what's up with the 'Search'
> function of the PHP-general
> lst? It always seems to be 'offline'. Rather hard
> to search the archives for
> previously asked questions.
>
> Tia,
> Andre

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/
--- End Message ---
--- Begin Message ---
Hey,
Why dont you just add a link to a script and validate it like that?
eg:
Click below to confirm you email id
**********************************************
http://yoursite.tld/confirm.php?[EMAIL PROTECTED]&confirmno=5675678
**********************************************

Once you get the confirm id and no just check it within your database and
flag it as true.
Simple.

I have been using the above example for years....though not in PHP, but i'm
sure it will work.

Cheers,
-Ryan

/*A conclusion is the place where you got tired of thinking.*/








----- Original Message -----
From: "Andre Dubuc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 12, 2002 1:36 PM
Subject: [PHP] E-mail Confirmation script?


> I've looked about for an 'Email Confirmation' script that many sites use
for
> verifcation of wannabee new members. That is, the person subscribes, is
sent
> a 'confirmation' number to which they must have in the 'Subject' area of
> their reply.
>
> I would like to implement this on my site, but I haven't discovered a
source
> for a script, or how to go about doing it. That is, how do you retrieve
items
> from an incoming e-mail, and is it possible to parse the same?
>
> If anyone who has seen such a script could point me to where I could find
> one, I would greatly appreciate it, or in the Manual, what it would be
listed
> under. The 'mail()' function doesn't seem to include how to access
received
> e-mails, and to parse individual copmponents of a message.
>
> Btw, does anyone know what's up with the 'Search' function of the
PHP-general
> lst? It always seems to be 'offline'. Rather hard to search the archives
for
> previously asked questions.
>
> Tia,
> Andre
>
>
> --
> Please pray the Holy Rosary to end the holocaust of abortion.
> Remember in your prayers the Holy Souls in Purgatory.
>
> May God bless you abundantly in His love!
> For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Just make sure the url fits on one line in the
email which mine doesn't.

-----Original Message-----
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: May 12, 2002 5:06 PM
To: SP
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] E-mail Confirmation script?


Thanks,

Now why didn't that ever occur to me? It's simple
and very effective.
Thanks for the idea!

Regards,
Andre


On Sunday 12 May 2002 04:51 pm, you wrote:
> I would suggest just sending them an email with
a
> link like this and telling them to click on it
to
> confirm their membership.
>
>
http://www.mysite.com/confirm.php?uniqueid=2i3k238
> s9sd0s99d
>
> The confirm.php page would look up the uniqueid
> and try to find it in your database.  If it's
> there then that means the email address they
gave
> you exists and they have access to that email
> account cuz they know that uniqueid.
>
> After confirming, you could send a "welcome
user"
> email and include another link that they can use
> for all other account management like
> unsubscribing, changing password, changing
> personal info ...
>
> http://www.mysite.com/account.php
>
>
>
>
> -----Original Message-----
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: May 12, 2002 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] E-mail Confirmation script?
>
>
> I've looked about for an 'Email Confirmation'
> script that many sites use for
> verifcation of wannabee new members. That is,
the
> person subscribes, is sent
> a 'confirmation' number to which they must have
in
> the 'Subject' area of
> their reply.
>
> I would like to implement this on my site, but I
> haven't discovered a source
> for a script, or how to go about doing it. That
> is, how do you retrieve items
> from an incoming e-mail, and is it possible to
> parse the same?
>
> If anyone who has seen such a script could point
> me to where I could find
> one, I would greatly appreciate it, or in the
> Manual, what it would be listed
> under. The 'mail()' function doesn't seem to
> include how to access received
> e-mails, and to parse individual copmponents of
a
> message.
>
> Btw, does anyone know what's up with the
'Search'
> function of the PHP-general
> lst? It always seems to be 'offline'. Rather
hard
> to search the archives for
> previously asked questions.
>
> Tia,
> Andre

--
Please pray the Holy Rosary to end the holocaust
of abortion.
Remember in your prayers the Holy Souls in
Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet:
http://www.webhart.net/csrb/

--- End Message ---
--- Begin Message ---
I was wondering if anyone knew of any good Boolean interpreters (NOT,
AND, OR, +, -, |," ")? I've found three, but they're VERY buggy and I
wouldn't put them into production. Frankly, I don't have the time,
patience, or ability to write a good one from scratch. Here are the
three I've found in case anyone's interested:
 
http://www.evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_MyS
QL/18/15665/index.html
http://www.phpbuilder.com/snippet/detail.php?type=snippet
<http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=474>
&id=474
http://sourceforge.net/projects/phpsqlbool/
 
Thanks to anyone and everyone! =)
--- End Message ---
--- Begin Message ---
http://www.iawiki.net/ReferrerLinking
I'm looking for existing PHP scripts that generate a list of pages linking 
to your page. Anything already written out there?
Thanks,
Peter


--- End Message ---
--- Begin Message ---
tnx for the response,

it was the query which caused the errors ("wrong result-link").

grtzz,
me.
       [ProMoozz signature script initiated]
                     [Sharon equalzz Hitler]
                    [msg written - msg read]
      [ProMoozz signature script terminated]
http://www.kotbelasting.be - http://www.kotbelasting.be
----- Oorspronkelijk bericht -----
Van: "Austin Marshall" <[EMAIL PROTECTED]>
Aan: "Http://Www.Promoozz.Org"; <[EMAIL PROTECTED]>
CC: <[EMAIL PROTECTED]>
Verzonden: zaterdag 11 mei 2002 23:41
Onderwerp: Re: an sql_layer


Http://Www.Promoozz.Org wrote:
> i'm sweating on this one :
>
> function sql_fetch_row($res, $nr)
> {
> global $dbtype;
> switch ($dbtype) {
>
>     case "MySQL":
>         $row = mysql_fetch_row($res);
>         return $row;
>     break;;
> ...
> }
>
> it iz used in a php_layer.php from phpnuke, but somehow it gives errors... if
i put a "@" like this:
>
>         $row = @mysql_fetch_row($res);
>
> i get no errors, but no result either. Where stands the @ for? I can't find
any info on thizz, what's wrong?
>
>        [ProMoozz signature script initiated]
>                      [Sharon equalzz Hitler]
>                     [msg written - msg read]
>       [ProMoozz signature script terminated]
> http://www.kotbelasting.be - http://www.kotbelasting.be
>

First off, anyone using phpnuke is on their own, try phpnuke.org for
help.  But an @ before a function suppresses error messages, it doesn't
make errors go away, so it's doing precisely what it is supposed to.  I
also see two ;'s in a row, perhaps that is the problem, or perhaps the
query was bad and that renders fetch_row useless.

We or anyone would have a far better chance of helping out if you
explained what the error is... it will be alot easier than debunking the
  code of phpnuke on our own.






--- End Message ---
--- Begin Message ---
Instead of switching hosting companies, why don't you just install
phpMyAdmin on your webspace, that way you can control your mySQL databases
in a far more user-friendly way than SSH will let you do

"Tim Thorburn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I've about had it with my current hosting company as they've turned off
SSH
> for the past month due to "security reasons" which means I can no longer
> add/remove tables from my MySQL database.  Looking at two other hosting
> companies - SBC Webhosting - www.webhosting.com and Verio - www.verio.com
>
> Does anyone here use either of these companies?  If so, could you please
> let me know your opinions of each?
>
> Thanks
> -Tim
>
>


--- End Message ---
--- Begin Message ---
I'm having a problem with using cookies and flash, I'm new to php so it's
more then likely my coding, I have a forum made from flash/php/mysql, and
I'm trying to use cookies for the username and password so they dont have to
log in, I have manage to create the cookies no problem, its the rest thats
wrong, I'll post the code to read the cookies:
<?
$time = (time() + 3600 * 24 * 30 * 12);
$cookiepath = "/";
$cookiedomain = "www.deadsam.com";
$cookiesecure = false;
setcookie("username", $username, $time, $cookiepath, $cookiedomain,
$cookiesecure);
setcookie("password", $password, $time, $cookiepath, $cookiedomain,
$cookiesecure);


//get number of set cookies
$cookieCount = count($HTTP_COOKIE_VARS);

//if more than 1 cookie
if ($cookieCount > 0) {
//Loop through all the cookies...
foreach($HTTP_COOKIE_VARS as $cookieName => $cookieValue){
//output name and value
print "$cookiename=$cookieValue&";
}
} else {
//otherwise out no cookies
print "&userStatus=you are not logged in";
}
?>

In flash I used a loadVariableNum("http://www.deadsam.com/cookiescript.php";,
this, "POST");

I keep getting errors with this.
If anyone has an answer to this I'd appreciate it very much.
Thank you in advance
Deadsam


--- End Message ---
--- Begin Message ---
This is a bit of a tricky one, as a search engine isn't just some 10 line
code you can quickly type and expect to work. It'd be quite complex, because
you have to run several queries for each of the boolean types, and you also
have to account somehow for case-sensitivity.

I'm currently working on a search engine to incorporate into my Content
Management System (more info at http://www.inspirationstudios.co.uk/dot/cms)
that incorporates all your requirements so I'll get back to you with some
more coding info once I've worked on it there.

"Spamsucks86" <[EMAIL PROTECTED]> wrote in message
000001c1f924$1b35bcd0$ea553944@cc1966780a">news:000001c1f924$1b35bcd0$ea553944@cc1966780a...
> I don't want to use a module though. I just want to take what a person
> types and parse it so I can put it into a mysql query and search my
> database of data. I share the server and I can't get mnoGoSearch
> compiled in with PHP, so unless there's PHP code I can borrow from it, I
> don't think it will help me.


--- End Message ---
--- Begin Message ---
I am running mod PHP 4.0.6 with Apache 1.3x.
 
I am using session variables to pass various access information.  Everything works like a charm until I popup a new window using Javascript.   The session variable is set but to the wrong value. 
 
Has anyone else run into this issue or have any ideas?
 
TIA
/dkm
 
--- End Message ---

Reply via email to