php-general Digest 13 Jan 2002 19:37:23 -0000 Issue 1109

Topics (messages 80335 through 80368):

Send output before header location
        80335 by: Alawi
        80336 by: David
        80340 by: Meir Kriheli

Re: mysql_fetch_row win32 to Linux
        80337 by: sundogcurt

Re: Piping data into a select box
        80338 by: Dean Householder

Re: Time Zone Offset?
        80339 by: Jim Winstead
        80352 by: DL Neil

CSS Editors
        80341 by: Boaz Yahav
        80342 by: Maciej Uhlig

Trailing Navigation In PHP & MySQL
        80343 by: steph.philedom2k.com

Re: Redeclaring functions
        80344 by: Geoff Caplan

404 Redirection
        80345 by: FiShcAkE
        80346 by: FiShcAkE
        80355 by: mike cullerton

Re: Record Paging Using Arrays
        80347 by: Miles Thompson

include with call
        80348 by: John Cuthbert
        80356 by: CC Zona
        80366 by: John Cuthbert

php-win broke on 'OLEAUT32.DLL'
        80349 by: drobinson

Re: New to list
        80350 by: Boaz Yahav

Re: Authenticating via http
        80351 by: Boaz Yahav

Re: I'm new - one page to another
        80353 by: Boaz Yahav

Re: Maybe OT but I was wondering....
        80354 by: Boaz Yahav

4.1.1 Causes Signal 11 On FreeBSD 4.5 / Apache 1.3.22
        80357 by: Tim Gustafson
        80358 by: Rasmus Lerdorf

Setting up an XML platform/website
        80359 by: Emile Bosch

Newbie database question
        80360 by: Dean Ouellette
        80361 by: Richard Crawford
        80362 by: Dean Ouellette
        80363 by: mike cullerton
        80364 by: Richard Crawford

Decryption
        80365 by: John Cuthbert
        80368 by: Joe Conway

anyone with a usenet editor
        80367 by: Peter J. Schoenster

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 ---
How can I output before send header
I see some site some output and after that it Jump to other site !! 
Is that maked by header localtion ??
--- End Message ---
--- Begin Message ---
 >How can I output before send header 
>I see some site some output and after that it Jump to >other site
>Is that maked by header localtion ??

no, if there\'s output first, then it\'s not using header(\"Location: whatever.php\"), 
because headers MUST be sent before any other output to the browser.

there are other ways to redirect a user to another page:
for example: 

<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=http://www.yourdomain.com/index.html\";> 

you could use some javascript to do it too.
--- End Message ---
--- Begin Message ---
On Wednesday 09 January 2002 11:55, Alawi wrote:
> How can I output before send header
> I see some site some output and after that it Jump to other site !!
> Is that maked by header localtion ??

No, they're using a meta tag in the head section. Quoted from 
wdg-html-reference:

<META HTTP-EQUIV=Refresh CONTENT="10; URL=../">

tells the browser to load ../ 10 seconds after the current document has 
finished loading. Not all browsers support this, so authors should provide an 
alternate means of moving to the new page where necessary. The Refresh header 
is sometimes used for "splash screens" or when a page has moved, but the 
technique is not very effective since users may not even be looking at the 
window that is to be refreshed and since it messes up the user's history on 
many browsers. Some search engines penalize pages that use a Refresh of a few 
seconds or less.
-- 
Meir Kriheli
--- End Message ---
--- Begin Message ---
Like this....

$myquery = "SELECT * FROM xpackage";
print "<p>myquery = $myquery</p>";
$myresult = mysql_query($myquery);
while($myrowz = mysql_fetch_row($myresult)){
   print "<p>" . $myrowz[0] . "</p>";
}

[EMAIL PROTECTED] wrote:

>on 1/12/02 11:45 AM, sundogcurt at [EMAIL PROTECTED] wrote:
>
>>myquery = SELECT * FROM xpackage
>>Warning: Supplied argument is not a valid MySQL result resource in /path
>>to page with error/default.php on line 5
>>
>>Line 5 is this part
>>while($myrowz = mysql_fetch_row($myresult)){
>>
>
>this tells me that $myresult is not a valid mysql result resource
>identifier. how do you obtain $myresult?
>
>
> -- mike cullerton 
>
>
>

--- End Message ---
--- Begin Message ---
Thank's for the help!
Dean

----- Original Message -----
From: "Jimmy" <[EMAIL PROTECTED]>
To: "Dean Householder" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, January 13, 2002 12:33 AM
Subject: Re: [PHP] Piping data into a select box


> Hi Dean,
>
> > Does anyone know how to give a select pulldown box a default value
> > from a PHP variable?
>
> <?
> function generate_option_list ($key_value,$set) {
> // This function will return option list and set the selected attribute
> // $key_value : the associative array which contain the key and the value
for each option
> // $set : the value to be selected by deafult
> //
> // Usage: for example we want to have a dropdown list of month, and set
February as selected
> //
> //   $key_value=array("01"=>"January","02"=>"February",...);
> //   $option_list=generate_option_list($key_value,"02");
> //   //$option_list now contain text <option value='01'>January</option>
> //   //                              <option value='02'
selected>February</option>
> //
> // NOTE: This will only create the <OPTION> tag, without the <SELECT> tag
> //
>
>   while ( list($key,$value) = each($key_value) ) {
>     if ($key==$set) {$var.="<option value='$key'
selected>$value</option>";}
>     else {$var.="<option value='$key'>$value</option>";}
>   }
>   return $var;
> }
>
> ?>
>
> --
> Jimmy
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Leave loved ones with loving words, it may be the last time you see them
>
>
>

--- End Message ---
--- Begin Message ---
Marvin Sanders <[EMAIL PROTECTED]> wrote:
> I'm using the PHP date() function on my site, but since my hosting company
> (Pair Networks) is on the East Coast and I'm on the West Coast, everything
> shows as three hours later (for most of my visitors, anyway). Pair tells me
> there's no setting I can make on my account to change the server time zone.
> 
> Can anyone recommend a way to set an offset for the date() function in PHP?
> (I searched on php.net and couldn't find anything.)

putenv("TZ=PST8PDT");

jim
--- End Message ---
--- Begin Message ---
Marvin,

> I'm using the PHP date() function on my site, but since my hosting company
> (Pair Networks) is on the East Coast and I'm on the West Coast, everything
> shows as three hours later (for most of my visitors, anyway). Pair tells me
> there's no setting I can make on my account to change the server time zone.

=not competent to comment. Recommend a review of the php.ini file commands and even if 
you can't gain access to
that file on the server, the function which allows you to make a change to the PHP 
environment for the life of
the current script.

> Can anyone recommend a way to set an offset for the date() function in PHP?
> (I searched on php.net and couldn't find anything.)

=I run an international service, and would have had a massive headache if each client 
was to see things stated
in their own timezone. We agreed that each would make specifications in their own 
timezone (and language...) but
that all system output would be in GMT.

=To your question: read up on the time/date functions for GMT, convert all input and 
store all date/times as
GMT; and at retrieval time convert time/dates from GMT to whichever time zone you want 
to use. PS also takes
care of bi-annual summer time discontinuities too (should they apply to you).

=Regards,
=dn


--- End Message ---
--- Begin Message ---
Are there any good CSS Editors.
Something that will tell you to which browsers you are compatible while
you write the CSS and such?

berber
--- End Message ---
--- Begin Message ---
TopStyle - http://www.bradsoft.com

Maciek

> -----Original Message-----
> From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 13, 2002 12:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] CSS Editors
> 
> 
> Are there any good CSS Editors.
> Something that will tell you to which browsers you are compatible while
> you write the CSS and such?

--- End Message ---
--- Begin Message ---
Im relatively new to PHP, and for one section of my site - I am creating a review 
database. Im working on designing how I want the navigation. I think the most  
effective way would be a trailing Navigation (ie Top > Category 1 >SubCategory 2). 
I've set up my MySQL Database with names of categories and and associative IDs. Can 
anyone help me to get jumpstarted?

Thanks.

Steph
--- End Message ---
--- Begin Message ---
Arve

PHP has variable function names:

$myfunc = "this_is_a_func" ;

$foo = $myfunc( ) ;

This way, you can make a single function call access a number of different
functions at run time. You can't change the declaration, but you can change
the call...

You don't really say what you are planning to do, but I would have thought
this approach should meet most requirements. I find it very useful.

Also, as I am sure you know, there are a number of ways of making the number
of parameters dynamic - probably the simplest is to standardise on a single
array as a param, and stick any values you need inside that.

I find that PHP is great for very late binding - there is usually a way if
you look for it...

Geoff Caplan
Advantae Ltd

> As a small, personal, "enjoy-myself"-project I'd like to run a
> perpetual-running socket server. Problem is; I also want it to be
> self-modifying so I can insert, remove and change functions as the
> server is running.
>
> The problem is; under normal circumstances, PHP won't let the script
> redeclare functions. Is there any way to circumvent this.
>


--- End Message ---
--- Begin Message ---
Hey people,

Probably a quick and simple question, but if I have the usuall in my script:



--- End Message ---
--- Begin Message ---
Try that again, without pressing ctrl-enter this time!!

As I said, I have got the usual script:

<?
if(isset($action))
{
    $include = $action;
} else {
    $include = "home";
}
include($include. ".inc");
?>

but, how do I put in a custom error page instead of seeing: 

Warning: Unable to access anyotherpage.inc in 
/var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70

Warning: Failed opening 'anyotherpage.inc' for inclusion (include_path='') in 
/var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70

I have got an error page for any other url i.e.   apagenotfound.php  but I dont know 
how to overcome the above.

Thanks in advance

Lee
--- End Message ---
--- Begin Message ---
on 1/13/02 6:07 AM, FiShcAkE at [EMAIL PROTECTED] wrote:

> Try that again, without pressing ctrl-enter this time!!
> 
> As I said, I have got the usual script:
> 
> <?
> if(isset($action))
> {
> $include = $action;
> } else {
> $include = "home";
> }
> include($include. ".inc");
> ?>
> 
> but, how do I put in a custom error page instead of seeing:

if i understand what you are asking, you might try something like

 if (is_file($include. ".inc")) {
   include($include. ".inc");
 } else {
   include(custom_error.inc);
 }

you may need to execute is_file($include. ".inc") inside a loop so that it
checks in all your inlude_directories.

 foreach($dirs as $dir) {
  if (is_file($dir.'/'.$include. ".inc")) {
   blahblahblah
  }


otherwise, if you know 'all' the valid files, you could create an array of
filenames and compare $include to elements of the array.

> 
> Warning: Unable to access anyotherpage.inc in
> /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70
> 
> Warning: Failed opening 'anyotherpage.inc' for inclusion (include_path='') in
> /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70
> 
> I have got an error page for any other url i.e.   apagenotfound.php  but I
> dont know how to overcome the above.
> 
> Thanks in advance
> 
> Lee
> 


 -- mike cullerton   michaelc at cullerton dot com


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

Why don't you ask the question on a SQL Server list? This isn't a put down, 
or an attempt to shove you away, but if you can do this in MSFT's 
TRANSACT-SQL you will be offloading the work to the database engine which 
is designed to do it.

Alternately, can you use two queries, the first which uses TOP, and a 
second which also uses top and fetches greater than previous result. That 
would also have the advantage of returning small data sets, faster.

Regards - Miles Thompson

At 03:24 PM 1/12/2002 -0400, Joe Van Meer wrote:
>Hi there, I have a small php/data driven website and would like to
>incorporate record paing. Unfortunately I'm working with sql Server
>temporarily, but I'm still required to do this. So since I wasn't allowed to
>use the handy LIMIT in my sql statement I figured I'd dump my results into a
>mulitdiensional array and navigate through the records that way. I know this
>propbabbly isn't the best method, but it's the way I have to do it for now.
>I've managed to display my records out of the array, but would now like to
>incorporate a "next' and a 'previous' button to navigate through the array.
>Can someone take a look at my code below and tell me how I'm to go about
>doing this? I thought maybe by having 2 functions that would advance my
>array pointer and another to retreat the pointer would do the trick. I'm
>unsure how to incorporate it. I've added two functions within the
>************ below, not sure if they are appropriate or not though.
>
>Thx Joe :)
>
>
>
>
>
>
>Code:
>if(!isset($consultantarray)){
>
>
>//connect to db
>$connectionToDB = odbc_connect("cdxcffcoltant", "jo7gecon", "josje7con");
>
>//create query statement
>$sqls = "SELECT consultantid, firstname, lastname, city, stateprovince,
>country, category, yearsexp FROM CONSULTANT WHERE category ='$category'
>ORDER BY yearsexp DESC" ;
>
>//execute the sql statement (query) on the connection made
>$resultset = odbc_do($connectionToDB, $sqls);
>
>
>
>
>//initialize the consultant arrays
>$consultantdetailsarray[] = array();
>$consultantarray[] = array();
>
>//initialize a variable to zero for start of array below in while loop
>$x = 0;
>
>// while there is still results fetch the data from the database --- while
>loop
>while(odbc_fetch_row($resultset)){
>
>   $consultantdetailsarray[0] = odbc_result($resultset, 1);
>   $consultantdetailsarray[1] = odbc_result($resultset, 2);
>   $consultantdetailsarray[2] = odbc_result($resultset, 3);
>   $consultantdetailsarray[3] = odbc_result($resultset, 4);
>   $consultantdetailsarray[4] = odbc_result($resultset, 5);
>   $consultantdetailsarray[5] = odbc_result($resultset, 6);
>   $consultantdetailsarray[6] = odbc_result($resultset, 7);
>   $consultantdetailsarray[7] = odbc_result($resultset, 8);
>
>
>
>
>//dump each consultant into the new array called $consultantarray
>   $consultantarray[$x] = $consultantdetailsarray;
>
>  //increment to next element of array
>   $x++;
>}
>
>}
>
>
>****************************************************************************
>*
>function nextFive(&$array, $number){
>for ($counter = 0; $counter < $number; $counter++){
>next($array);
>
>}
>}
>
>
>
>
>function previousFive(&$array, $number){
>for ($counter = 0; $counter < $number; $counter++){
>prev($array);
>}
>}
>
>
>****************************************************************************
>*
>
>//loop through the elements of retrieved array (2nd one holding the
>consultant details)
>
>  //second loop to grab through $consultant details array elements
>  foreach($consultantarray as $y){
>
>  list($cid, $firstname, $lastname, $city, $stateprovince, $country,
>$category, $yearsexp) = $y;
>
>  print "<tr><td align=left><font color='#663399' face='verdana' size=2><a
>href='consultantdetails.php?cid=" . $cid . "'>"  . $firstname . " " .
>$lastname . "</a></font></td><td align=left><font color='#663399'
>face='verdana' size=2>" . $city . "</font></td><td align=left><font
>color='#663399' face='verdana' size=2>" . $stateprovince . "</font></td><td
>align=left><font color='#663399' face='verdana' size=2>" . $country .
>"</font></td><td align=left><font color='#663399' face='verdana' size=2>" .
>$category . "</font></td><td align=left><font color='#663399' face='verdana'
>size=2>" . $yearsexp . "</font></td></tr>";
>
>
>  }
>
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello,
I have a file which does several different things depending on how its
called Ie
file?mode=show is to show it etc

But I want to include the output from the show so  I tried
<?php include("file.php?mode=show"); ?> but this causes errors. It goes away
with including as only file.php but doing that also causes problems because
mode isnt set yet.

Anyone know how to get around this?


--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (John Cuthbert) wrote:

> I have a file which does several different things depending on how its
> called Ie
> file?mode=show is to show it etc
> 
> But I want to include the output from the show so  I tried
> <?php include("file.php?mode=show"); ?> but this causes errors. It goes away
> with including as only file.php but doing that also causes problems because
> mode isnt set yet.

$mode='show';
include("file.php");

Include() brings in the content of a file just as if you'd copy/pasted it 
there.  It's not an HTTP GET request.

-- 
CC
--- End Message ---
--- Begin Message ---
Thanks :)
"Cc Zona" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (John Cuthbert) wrote:
>
> > I have a file which does several different things depending on how its
> > called Ie
> > file?mode=show is to show it etc
> >
> > But I want to include the output from the show so  I tried
> > <?php include("file.php?mode=show"); ?> but this causes errors. It goes
away
> > with including as only file.php but doing that also causes problems
because
> > mode isnt set yet.
>
> $mode='show';
> include("file.php");
>
> Include() brings in the content of a file just as if you'd copy/pasted it
> there.  It's not an HTTP GET request.
>
> --
> CC


--- End Message ---
--- Begin Message ---
Hi all,

I had my php4 working with apache 1.3x on my Windows2000 box. However, I
installed software for my Kodak DC215 digital camera and it overwrote some
files in the WINNT/system32 directory. Php suddenly became unusable.

I'm getting an error 'unable to find dynamic link node...in file
'WINNT\system32\OLEAUT32.DLL'. I've tried removing all my php files and
re-installing them, but it produces the same error.

Any ideas how to fix this?

Dennis


--- End Message ---
--- Begin Message ---
Check out : 

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=279

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-----Original Message-----
From: Andrew [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 2:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] New to list


Hello to you all!
I am new to this list and I have a question that maybe someone can help
with

In a script I  am working on I have a math's equation :

((0.416 / $time) * 60) * 60)

this out but a figure at goes to a about 10 decimal places  I only want
2
decimal places and just can not figure out how to do this

Any ideas would be great


Thanks

Andrew
Web Harper Graphics
www.webharpergraphics.com



--- End Message ---
--- Begin Message ---
Check this out :

http://www.weberdev.com/index.php3?GoTo=search.php3%3Fsearch%3Dauthentic
ation%26searchtype%3Dtitle

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 




-----Original Message-----
From: Paul [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Authenticating via http


Here's a really quick question.  I can't figure out how to try to get
user
authentication more than once.  For instance, supposed I get this log on
screen that asks for my username and password.  If I type in something
wrong
that variable gets stuck in $PHP_AUTH_USER, and there is no way to unset
it,
so the user would be prompted again.  Please help.  Thanks

<?php
  if (!isset($PHP_AUTH_USER)) {
    header("WWW-Authenticate: Basic realm=\"My Realm\"");
    header("HTTP/1.0 401 Unauthorized");
    echo "Text to send if user hits Cancel button\n";
    exit;
  } else {
     //Check the database for user/password combination.  Oh, not right?
let's try again
      unset($PHP_AUTH_USER); //Doesn't work
  }
?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
You can start checking out examples on WeberDev.com :)

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-----Original Message-----
From: universal2001 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] I'm new - one page to another


Hi!

I'm new to PHP and I have tried to find the answer to my questions but I
still have no luck.

I'm trying to make a page which is based on the data that I retrieved
from
my database. now, I want to make a link (text) to a new page but I want
to
pass my variable also. I don't have any form at all so .. how do I pass
avariable through a text link which is being clicked.

thanks for reviewing my email

any answer is greatly appriciated.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
in Apache you can set this in the httpd.conf or in any .htaccess file :

ErrorDocument 404 http://www.weberdev.com/404.php3


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-----Original Message-----
From: Ben Turner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 10:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Maybe OT but I was wondering....


I am trying to set up a completely dynamic site using php and a mysql
backend.  I am trying to find somewhere that I can identify a custom 404
error page and then pull the page based on the document directory.
Problem
is, is this even possible in PHP?  I haven't found too much related to
custom 404 pages done in php.

So I was thinking, if anyone knows some information on this topic, might
you
have a url or maybe a book title that I could check out to research this
a
bit further?

thanks for your help
Ben

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

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

I am experiencing a lot of Signal 11's when I compile PHP 4.1.1 into my
Apache server on my FreeBSD 4.5-RC machine.  If I compile the -exact- same
Apache configuration with PHP 4.0.6, it works fine.  As soon as I switch to
4.1.1, it causes Signal 11's (and sometimes 10's) when I load certain pages.
It seems that it crashes when the pages have mySQL database access on them
and are fairly complex (I was thinking perhaps a memory problem?)

The machine that it runs on is, hardware wise, very stable - it's been using
the same memory, processor, hard drive and motherboard for almost a year
with no problems, and no other daemons crash or cause any signals at all.

Has anyone else experienced this problem?  Any ideas on what may be the
cause?

Here's the line that I used to configure PHP (so you can see what modules
I'm installing):

./configure --with-apache=../apache_1.3.22 --enable-safe-mode --with-exec-di
r=/usr/local/bin --enable-bcmath --enable-calendar --with-jpeg-dir=/usr/loca
l --with-ftp --with-gd=/usr/local --with-png-dir=/usr/local --with-ttf=/usr/
local --with-mysql=/usr/local --with-curl=/usr/local --with-zlib-dir=/usr/lo
cal --with-freetype-dir=/usr/local --with-pear --with-mcrypt --with-dom=/usr
/local --with-pcre

Any help is greatly appreciated.

Thanks.

Tim

Attachment: smime.p7s
Description: application/pkcs7-signature

--- End Message ---
--- Begin Message ---
> I am experiencing a lot of Signal 11's when I compile PHP 4.1.1 into my
> Apache server on my FreeBSD 4.5-RC machine.  If I compile the -exact- same
> Apache configuration with PHP 4.0.6, it works fine.  As soon as I switch to
> 4.1.1, it causes Signal 11's (and sometimes 10's) when I load certain pages.
> It seems that it crashes when the pages have mySQL database access on them
> and are fairly complex (I was thinking perhaps a memory problem?)

You somtimes get 10's?  That's a SIGUSR1 and not something that will take
down your server.  It would actually cause a graceful restart of Apache,
but I don't see how anything we do in PHP could cause spurious sig10's.
Get a backtrace of one of the sig11's.  Without that there isn't much hope
of us tracking this down.

-Rasmus

--- End Message ---
--- Begin Message ---
Is anyone interested in setting up an XML platform for PHP, where the use of
XML is explained, with sample PHP/XML applications and in-depth real live
tutorials? Since lot's of people underestimate the power of XML. Maybe, it's
nice to be ready when Microsoft's dotNet crashes in and launches an new XML
era.

Anyone wants to help building such an platform/website?

Sincerly,
Emile


--- End Message ---
--- Begin Message ---
I am entering info from form into database, is there a way to check say 
firstname, lastname and address to see if it is a duplicate to what is 
already in database and if it is then just enter any new information they 
may enter and not create a new entry 

--- End Message ---
--- Begin Message ---
Which database are you using?


Dean Ouellette wrote:

> I am entering info from form into database, is there a way to check say 
> firstname, lastname and address to see if it is a duplicate to what is 
> already in database and if it is then just enter any new information 
> they may enter and not create a new entry
> 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
        http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

"When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight." --Clarence Darrow

"Push the button, Max!"


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


At 10:10 AM 1/13/2002 -0800, Richard Crawford wrote:
>Which database are you using?
>
>
>Dean Ouellette wrote:
>
>>I am entering info from form into database, is there a way to check say 
>>firstname, lastname and address to see if it is a duplicate to what is 
>>already in database and if it is then just enter any new information they 
>>may enter and not create a new entry
>
>
>
>--
>Sliante,
>Richard S. Crawford
>
>mailto:[EMAIL PROTECTED]  http://www.mossroot.com
>AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
>MSN:  [EMAIL PROTECTED]
>
>"When you have lost the ability to laugh at yourself, you have lost the 
>ability to think straight." --Clarence Darrow
>
>"Push the button, Max!"
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
on 1/13/02 10:51 AM, Dean Ouellette at [EMAIL PROTECTED] wrote:

> I am entering info from form into database, is there a way to check say
> firstname, lastname and address to see if it is a duplicate to what is
> already in database and if it is then just enter any new information they
> may enter and not create a new entry

i'm definitely not an expert on this stuff, but here are some things to
think about...

on way to keep duplicates from being entered, is to make every (firstname,
lastname, address) triplet unique in your database. in mysql, this would be
something like

 ALTER TABLE table_name ADD UNIQUE some_unique_name(firstname, lastname,
address);

this may not be a good thing though. there may be instances where two folks
exist with the same firstname,lastname, address. father/son and
mother/daughter perhaps.

if you just want to check, you can do something like

 SELECT id FROM table WHERE firstname = '$firstname' and lastname =
'$lastname' and address = '$address';

if you get an id, then a record already exists. the problem with this, is
data entry. depending on who is typing the stuff in a form, they may not
type/spell it exactly the same each time.

you may need to figure out some other unique identifier to determine if it's
the 'same' person.

hope this helps,
mike

 -- mike cullerton 


--- End Message ---
--- Begin Message ---
I don't think that there's an easy way to do it in MySQL.  I usually use 
some hack along the lines of, "select x from t where x = $y", and if 
there are any results returned, return a message of some sort ("That 
value already exists in the database!").

Bear in mind that sometimes people have very similar contact 
information.  At the university where I used to work, there were two 
employees who shared the same first, middle, and last names, as well as 
birth dates, and their social security numbers differed by exactly one 
digit.  A rare circumstance, to be sure, but not impossible.

Dean Ouellette wrote:

> MySql
> 
> 
> At 10:10 AM 1/13/2002 -0800, Richard Crawford wrote:
> 
>> Which database are you using?
>>
>>
>> Dean Ouellette wrote:
>>
>>> I am entering info from form into database, is there a way to check 
>>> say firstname, lastname and address to see if it is a duplicate to 
>>> what is already in database and if it is then just enter any new 
>>> information they may enter and not create a new entry
>>
>>
>>
>>
>> -- 
>> Sliante,
>> Richard S. Crawford
>>
>> mailto:[EMAIL PROTECTED]  http://www.mossroot.com
>> AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
>> MSN:  [EMAIL PROTECTED]
>>
>> "When you have lost the ability to laugh at yourself, you have lost 
>> the ability to think straight." --Clarence Darrow
>>
>> "Push the button, Max!"
>>
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
        http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

"When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight." --Clarence Darrow

"Push the button, Max!"


--- End Message ---
--- Begin Message ---
Is there a method for decrypting encrypted things by md5?


--- End Message ---
--- Begin Message ---
John Cuthbert wrote:

> 
> Is there a method for decrypting encrypted things by md5?

No. MD5 is a one-way hash, *not* a form of encryption. A hash is 
specifically designed so that it is impractical to find the input 
string, given the output string.

If you need to encrypt/decrypt, look at the mcrypt extension and use 
3DES or one of the other symmetrical encryption algorithms.

HTH,

--Joe

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

I'm building a database of usenet postings for soc.culture.brazil. 
This was easy enough (with exception of handling mime in the 
postings); I'm just dumping the body of the message into the 
database.

I plan to allow a person to select a thread, perhaps a user or 
whatever and then get all relevant/selected posts and enter them 
into a textarea box for insertion into another table which I'm 
thinking to organize by question/answer.  I imagine the heavy use 
of a frames and javascript to make this as easy to use as possible. 

I'm wondering if anyone who reads the above might say "hey .. this 
sounds like ..". 

You can see my beginning of this here:

http://www.readbrazil.com/

Thanks,

Peter

---------------------------
"Reality is that which, when you stop believing in it, doesn't go
away".
                -- Philip K. Dick
--- End Message ---

Reply via email to