php-general Digest 21 Mar 2001 15:58:26 -0000 Issue 580

Topics (messages 44867 through 44963):

Re: Cache
        44867 by: Matt Stone
        44868 by: Tyrone Mills
        44869 by: Matt Stone

PDF reading via IE5.5
        44870 by: Dennis Moore
        44902 by: Stewart Taylor

PHP/MySQL & Control Structures -> if (mysql_query())
        44871 by: Mike Gifford
        44874 by: David Robley
        44879 by: Mike Gifford
        44886 by: Don Read
        44887 by: David Robley

Email validation
        44872 by: Mike Gifford
        44873 by: Jason Murray

Professional Selling SkillMap(tm)
        44875 by: Frontline Learning

session.gc_maxlifetime
        44876 by: Peter Houchin
        44937 by: Yasuo Ohgaki

banner exchange, how to?
        44877 by: Ed Lazor
        44878 by: Gfunk
        44908 by: Mark Maggelet

Booking with Date/Time in mySQL : My Code!!
        44880 by: Thomas Edison Jr.

Re: Booking by Date/Time in mySQL
        44881 by: Thomas Edison Jr.
        44882 by: Thomas Edison Jr.

header redirection
        44883 by: dean.aaddesign.com
        44885 by: Jason Murray
        44946 by: Jason Stechschulte
        44948 by: Yasuo Ohgaki

Booking by Date/Time in mySQL : my CoDe!!
        44884 by: Thomas Edison Jr.

Re: Create a Bulletin Board
        44888 by: mwaples.waples.net
        44956 by: John Huggins

Re: update two frames at once?
        44889 by: Kathleen A. Ferraro

Newsletter kindaa thing
        44890 by: Dhaval Desai
        44891 by: John LYC
        44892 by: David Robley

Re: email an ms-word attachment (please)
        44893 by: php3.developersdesk.com
        44953 by: Jen Hall
        44962 by: Grant Walters

PHP post
        44894 by: Paul Juliano
        44895 by: David Robley
        44906 by: Dezider Góra
        44932 by: Tobias Talltorp

Perl and PHP
        44896 by: Calin Rotaru
        44935 by: Yasuo Ohgaki

Re: presentation software used by Rasmus Lerdorf
        44897 by: php3.developersdesk.com

Header Problem
        44898 by: KPortsmout.aol.com
        44899 by: Rasmus Lerdorf
        44939 by: Pierre-Yves Lemaire

Re: fatal: Symbol referencing errors.
        44900 by: Jimmy Lantz

Re: Problems connecting to remote mySQL server
        44901 by: almir
        44907 by: Floyd Piedad

Date solved! And now TIME problems : Booking by Date/Time
        44903 by: Thomas Edison Jr.

Optional Parameter ?
        44904 by: Jack Sasportas
        44905 by: Stewart Taylor
        44912 by: Neil Kimber
        44919 by: Rudolf Visagie

sorri- Non-php question
        44909 by: John LYC

Re: Dynamically build a form from mySQL table
        44910 by: Tim Ward

Finding every even 100
        44911 by: Nicklas af Ekenstam
        44913 by: Stewart Taylor
        44959 by: Rick St Jean

Post -vs- Get
        44914 by: Jack Sasportas
        44916 by: Stewart Taylor
        44926 by: Michael Hall
        44949 by: Yasuo Ohgaki

can you have two sql statements on the same page.
        44915 by: Matt Davis
        44918 by: Jack Sasportas
        44921 by: Jeff Armstrong

Re: Editing Variables from another script.
        44917 by: techzeus.pacific.net.sg

function mail()
        44920 by: Eric Tonicello
        44931 by: Tobias Talltorp

apache problem on startup w/ libmhash
        44922 by: Dean Hall
        44934 by: Yasuo Ohgaki
        44940 by: Dean Hall
        44942 by: Dean Hall
        44943 by: Dean Hall

Re: Attachment problem with web based mail - CODE SAMPLE
        44923 by: Grant Walters

Re: Attachment problem with web based mail
        44924 by: Grant Walters

Response.Write [OK]
        44925 by: AJDIN BRANDIC
        44927 by: Jon Haworth
        44928 by: AJDIN BRANDIC
        44930 by: techzeus.pacific.net.sg
        44933 by: Matt Williams
        44938 by: AJDIN BRANDIC

Lostpassword script Error
        44929 by: techzeus.pacific.net.sg

Sessions help please
        44936 by: KPortsmout.aol.com
        44945 by: Hardy Merrill
        44947 by: Jeff Armstrong

file height and width
        44941 by: george

Re: [PHP-DB] Transmitting Arrays
        44944 by: Rudolf Visagie

Re: Setting up mail() for WinXX
        44950 by: Yasuo Ohgaki

OCI8 server errors -> client
        44951 by: Hardy Merrill

Re: Status on ISAPI PHP
        44952 by: Yasuo Ohgaki

Session Help for newbie plz
        44954 by: insight

New Site for PHP Beginners
        44955 by: Jeff Oien

Re: [Q] Parser behavior in a string
        44957 by: Tim Ward
        44958 by: Tim Ward

PHP Verbindung zu mysql
        44960 by: denis mettler
        44961 by: denis mettler
        44963 by: Julie Meloni

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]


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


That goes in the PHP code no?

-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 1:56 PM
To: Matt Stone; PHPlist
Subject: RE: [PHP] Cache


Hi Matt,

For a very extensive solution, check this out:

http://www.zend.com/codex.php?id=435&single=1

Or, if you just want all your pages to be forced to load all the time
regardless...

        header("Cache-Control: no-cache, must-revalidate");
        header("Pragma: no-cache");
        header("Expires: Mon,26 Jul 1997 05:00:00 GMT");


-----Original Message-----
From: Matt Stone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 7:39 PM
To: PHPlist
Subject: [PHP] Cache


Hi,
This might be a little of topic...
I am having real trouble with cached PHP pages, they just never seem to
refresh... I have dissabled my local cache (IE5.5 Win2k) to the best of my
knowledge (suggestions on how to do this properly welcome) but are still
having trouble.
I am not sure whether it is my local cache my ISP's cache. Anyhow, can
anyone suggest a tag or something for me to put in my page so it refreshes
and bypasses the cache? It is getting _REALLY_ annoying :\
Thanks,

Matt Stone


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



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






Yup, at the beginning of your PHP script. Sorry, I should have mentioned
that... :)

-----Original Message-----
From: Matt Stone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 8:04 PM
To: Tyrone Mills; PHPlist
Subject: RE: [PHP] Cache


That goes in the PHP code no?

-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 1:56 PM
To: Matt Stone; PHPlist
Subject: RE: [PHP] Cache


Hi Matt,

For a very extensive solution, check this out:

http://www.zend.com/codex.php?id=435&single=1

Or, if you just want all your pages to be forced to load all the time
regardless...

        header("Cache-Control: no-cache, must-revalidate");
        header("Pragma: no-cache");
        header("Expires: Mon,26 Jul 1997 05:00:00 GMT");


-----Original Message-----
From: Matt Stone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 7:39 PM
To: PHPlist
Subject: [PHP] Cache


Hi,
This might be a little of topic...
I am having real trouble with cached PHP pages, they just never seem to
refresh... I have dissabled my local cache (IE5.5 Win2k) to the best of my
knowledge (suggestions on how to do this properly welcome) but are still
having trouble.
I am not sure whether it is my local cache my ISP's cache. Anyhow, can
anyone suggest a tag or something for me to put in my page so it refreshes
and bypasses the cache? It is getting _REALLY_ annoying :\
Thanks,

Matt Stone


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



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



--
PHP 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]






No prob, that works fine. Thanks so much :)

-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 2:04 PM
To: Matt Stone; PHPlist
Subject: RE: [PHP] Cache


Yup, at the beginning of your PHP script. Sorry, I should have mentioned
that... :)

-----Original Message-----
From: Matt Stone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 8:04 PM
To: Tyrone Mills; PHPlist
Subject: RE: [PHP] Cache


That goes in the PHP code no?

-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 1:56 PM
To: Matt Stone; PHPlist
Subject: RE: [PHP] Cache


Hi Matt,

For a very extensive solution, check this out:

http://www.zend.com/codex.php?id=435&single=1

Or, if you just want all your pages to be forced to load all the time
regardless...

        header("Cache-Control: no-cache, must-revalidate");
        header("Pragma: no-cache");
        header("Expires: Mon,26 Jul 1997 05:00:00 GMT");


-----Original Message-----
From: Matt Stone [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 7:39 PM
To: PHPlist
Subject: [PHP] Cache


Hi,
This might be a little of topic...
I am having real trouble with cached PHP pages, they just never seem to
refresh... I have dissabled my local cache (IE5.5 Win2k) to the best of my
knowledge (suggestions on how to do this properly welcome) but are still
having trouble.
I am not sure whether it is my local cache my ISP's cache. Anyhow, can
anyone suggest a tag or something for me to put in my page so it refreshes
and bypasses the cache? It is getting _REALLY_ annoying :\
Thanks,

Matt Stone


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



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



--
PHP 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]







I have searched long and hard to resolve this issue.  I've tried many
variations for the header tag.  However, I cannot seem to get it to work
with IE5.5.

I am trying to read an Acrobat created PDF file that I uploaded into my
MySQL database.

The problem occurs when I print the data via IE5.5.

<?php


    header("Content-type: application/pdf");
    header("Content-Disposition: attachment; filename=$name");

    print $data;

?>

All I get is echoing of the binary to the browser.

Any ideas or suggestions?

/dkm







Try,

header("Content-type: application/pdf");
header("Location:$filename");

-Stewart


-----Original Message-----
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 04:14
To: [EMAIL PROTECTED]
Subject: [PHP] PDF reading via IE5.5


I have searched long and hard to resolve this issue.  I've tried many
variations for the header tag.  However, I cannot seem to get it to work
with IE5.5.

I am trying to read an Acrobat created PDF file that I uploaded into my
MySQL database.

The problem occurs when I print the data via IE5.5.

<?php


    header("Content-type: application/pdf");
    header("Content-Disposition: attachment; filename=$name");

    print $data;

?>

All I get is echoing of the binary to the browser.

Any ideas or suggestions?

/dkm




-- 
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]




Hello,

I'd like the presense or absense of information within a database to be involved
in an if statement, however I'm having trouble getting it to work.  I've set up
the following:

$same_Email_query = mysql_query("SELECT Email FROM phPetition WHERE Email='" .
$Email  . "'");
if($same_Email_query){
$error = 1;
$error_html .= "This email \"" . $Email . "\" has already been used to sign the
petition.<br><br>\n";
}       

In this case, I'd like the mysql_query to search the database for the instance
of the submitted $Email and if there is a duplicate entry in the database, then
I'd like the if() statement to return an error (as lised above).

Any idea what I'm doing wrong?


In a similar way I'm trying to query the database for instances of the same
IPAddress:

$sameIP_query = mysql_query("SELECT FirstName,LastName,CityState,IPAddress FROM
phPetition WHERE IPAddress='" . getenv('REMOTE_ADDR')  . "' ORDER BY LastName");
  if ($sameIP_query) {
  
echo "The following individuals have signed this petition from the same IP: " .
getenv('REMOTE_ADDR');
    while ($sameIP_array = mysql_fetch_array($sameIP_query)) {
    echo "<LI>" . stripslashes($individuals_array["FirstName"]) . " " .
stripslashes($individuals_array["LastName"]) . " from " .
stripslashes($individuals_array["CityState"]);
  }
}

If the database already has entries which have been submitted from the same
IPAddress, I'd like to have those names and numbers listed.

The previous version of this code is published and available here:
        http://openconcept.ca/guide-petition.phtml

Thanks.

Mike
--
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Latest Featured Site: http://www.lornenystrom.org/
No problem can be solved with the same thinking that created it - A.Einstein




On Wed, 21 Mar 2001 14:58, Mike Gifford wrote:
> Hello,
>
> I'd like the presense or absense of information within a database to be
> involved in an if statement, however I'm having trouble getting it to
> work.  I've set up the following:
>
> $same_Email_query = mysql_query("SELECT Email FROM phPetition WHERE
> Email='" . $Email  . "'");
> if($same_Email_query){
> $error = 1;
> $error_html .= "This email \"" . $Email . "\" has already been used to
> sign the petition.<br><br>\n";
> }
>
> In this case, I'd like the mysql_query to search the database for the
> instance of the submitted $Email and if there is a duplicate entry in
> the database, then I'd like the if() statement to return an error (as
> lised above).
>
> Any idea what I'm doing wrong?

$same_Email_query is a pointer to a result set from the query and will 
always be true if the query succeeded - where succeeded means something 
like 'returned 0 or more matching rows'

What you need to do is check how many matching rows are returned by your 
query; if there are zero rows, the value doesn't exist in the database.

> In a similar way I'm trying to query the database for instances of the
> same IPAddress:
>
> $sameIP_query = mysql_query("SELECT
> FirstName,LastName,CityState,IPAddress FROM phPetition WHERE
> IPAddress='" . getenv('REMOTE_ADDR')  . "' ORDER BY LastName"); if
> ($sameIP_query) {
>
> echo "The following individuals have signed this petition from the same
> IP: " . getenv('REMOTE_ADDR');
>     while ($sameIP_array = mysql_fetch_array($sameIP_query)) {
>     echo "<LI>" . stripslashes($individuals_array["FirstName"]) . " " .
> stripslashes($individuals_array["LastName"]) . " from " .
> stripslashes($individuals_array["CityState"]);
>   }
> }

Shouldn't $individuals_array[ be $sameIP_array[ ? Consider using extract; 
if nothing else it makes code easier to read :-)

> If the database already has entries which have been submitted from the
> same IPAddress, I'd like to have those names and numbers listed.
>
> The previous version of this code is published and available here:
>       http://openconcept.ca/guide-petition.phtml
>
> Thanks.
>
> Mike

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi David,

I counted the number of rows using mysql_numrows(), but I've been told that
count() is way faster.  Unfortunately, I can't seem to get count working..  Any
ideas?

<?php 
echo mysql_numrows(mysql_query("select * FROM phPetition",$db)); 

// This should be faster, but doesn't seem to work
// echo count(mysql_query("select * FROM phPetition",$db)); 
?>

David Robley wrote:
> $same_Email_query is a pointer to a result set from the query and will
> always be true if the query succeeded - where succeeded means something
> like 'returned 0 or more matching rows'
> What you need to do is check how many matching rows are returned by your
> query; if there are zero rows, the value doesn't exist in the database.

Great advice.  This worked, therefore eliminating duplicates:

$same_Email_query = mysql_numrows(mysql_query("SELECT Email FROM phPetition
WHERE Email='" . $Email  . "'"));
if($same_Email_query!=0){
  $error = 1;
  $error_html .= "This email \"" . $Email . "\" has already been used to sign
the petition.<br><br>\n";
}       

> Shouldn't $individuals_array[ be $sameIP_array[ ? Consider using extract;
> if nothing else it makes code easier to read :-)

This was a neat little solution with the extract code.  I found that it started
to mess up my existing scripts so I threw it in a function to keep the variables
from getting mixed up.

<?
function recent_signatures () {
$individuals_query = mysql_query("SELECT * FROM phPetition ORDER BY ID DESC
LIMIT 0,5");
while ($individuals_array = mysql_fetch_array($individuals_query)) {
echo "<LI>" . stripslashes($individuals_array["FirstName"]) . " " .
stripslashes($individuals_array["LastName"]) . " from " .
stripslashes($individuals_array["CityState"]);
$last_email=$individuals_array["Email"];
}

$sameIP_query = mysql_query("SELECT FirstName,LastName,CityState,IPAddress FROM
phPetition WHERE IPAddress='" . getenv('REMOTE_ADDR')  . "' ORDER BY LastName");
  
  if (mysql_numrows($sameIP_query) != 0) {
  
  echo "<p>The following individuals have signed this petition from the same IP:
" . getenv('REMOTE_ADDR') . "<br>";
    while ($sameIP_array = mysql_fetch_array($sameIP_query)) {
    extract ($sameIP_array);
    echo "<LI>" . stripslashes($FirstName) . " " . stripslashes($LastName) . "
from " . stripslashes($CityState);
// echo "<LI>" . stripslashes($sameIP_array["FirstName"]) . " " .
stripslashes($sameIP_array["LastName"]) . " from " .
stripslashes($sameIP_array["CityState"]);
  }
}
}
recent_signatures ();
?>


Thanks Again.

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Latest Featured Site: http://www.lornenystrom.org/
No problem can be solved with the same thinking that created it - A.Einstein





On 21-Mar-01 Mike Gifford wrote:
> Hi David,
> 
> I counted the number of rows using mysql_numrows(), but I've been told that
> count() is way faster.  Unfortunately, I can't seem to get count working.. 
> Any
> ideas?
> 
> <?php 
> echo mysql_numrows(mysql_query("select * FROM phPetition",$db)); 
> 
> // This should be faster, but doesn't seem to work
> // echo count(mysql_query("select * FROM phPetition",$db)); 
> ?>
> 

;)

$result= mysql_query("select count(*) as cnt FROM phPetition",$db)); 
if ($result) {
   $row = mysql_fetch_object($result);
  echo 'count: ', $row->cnt, '<br>';
}

Regards,
-- 
Don Read                                         [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy. 
                  God will forgive you but the bureaucrats won't. 




On Wed, 21 Mar 2001 16:15, Mike Gifford wrote:
> Hi David,
>
> I counted the number of rows using mysql_numrows(), but I've been told
> that count() is way faster.  Unfortunately, I can't seem to get count
> working..  Any ideas?
>
> <?php
> echo mysql_numrows(mysql_query("select * FROM phPetition",$db));
>
> // This should be faster, but doesn't seem to work
> // echo count(mysql_query("select * FROM phPetition",$db));
> ?>

Who told you that? Refer them to the manual which will tell them that 
count will 'count the elements in a variable' or in other words tell you 
how many elements an array has. mysql_numrows is the way to go here.

Oh, hang on, maybe they mean the SQL count - "SELECT COUNT(*) as numrows 
FROM phPetition" and then look at the value of numrows

Yes, this can be quicker (for varying values of quicker) depending on the 
number of rows in the table, the way the table is indexed etc etc. But if 
it would mean another call to the database over and above another query 
then you may be offsetting any savings you get. For the case of one or 
zero rows, it's probably insignificant. Unless you are running this on an 
old Altos 8086 or somesuch?

In a nutshell, if something is giving you a noticable slowdown, it 
probably isn't that difference.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hello Again,

Can anyone tell me what the best form of Email validation there is?  It needs to
be quick & as open to - and . as possible.

I've seen the following:

<?
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",
$Email)) {
$error = 1;
$error_html .= "This email address is invalid: " . $Email;
echo  $error_html;
}
?>


But this one looks quite impressive too:

<?
           function checkaddress($mail) {
               if ( !ereg( "^([0-9,a-z,A-Z]+) ([.,_]
([0-9,a-z,A-Z]+))*[@] ([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]
           +))*[.]([0-9,a-z,A-Z]){2}([0-9,a-z,A-Z])?$", $mail ) ) {
                   return false;
               }
               else
               {
                   return true;
               }
           } 
?>

Not sure which is the best.

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Latest Featured Site: http://www.lornenystrom.org/
No problem can be solved with the same thinking that created it - A.Einstein




> Can anyone tell me what the best form of Email validation 
> there is?  It needs to be quick & as open to - and . as possible.

We use this one on www.inww.com:

<?
   Function validEmail($emailaddress)
   { 
     // Decides if the email address is valid. Checks syntax and MX records,
     // for total smartass value. Returns "valid", "invalid-mx" or 
     // "invalid-form".
   
     // Validates the email address. I guess it works. *shrug*
     if
(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",
$emailaddress, $check))
     {
       //if ( getmxrr(substr(strstr($check[0], '@'), 1),
$validate_email_temp) ) 
       if ( checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY") ) 
       { return "valid"; }
       else
       { return "invalid-mx"; } 
     }
     else
     {
       return "invalid-form"; 
     }
   }
?>

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!





You and I have not met, but because you’re a respected business professional with an 
interest in improving employee productivity, I would like to offer you a free preview 
of the Professional Selling SkillMap(tm). This new assessment and skill development 
resource from Frontline Learning can help you bring added value to your current sales 
training initiatives by targeting each salesperson's individual development needs.

This is a truly unique approach to sales training, and if you're open to learning 
more, please read on. If this is NOT an area of interest for you, I won't take up any 
more of your time, and I wish you continued success.

Please note - upon receipt of this message you have automatically been removed from 
our email marketing list. You will not receive further communication from Frontline 
Learning unless your proactively respond to the message that follows. 

Kindest regards,

David Kirkeby
VP, Business Development
Frontline Learning


MORE ABOUT THE PROFESSIONAL SELLING SKILLMAP™...

The Professional Selling SkillMap™ Assessment and Development Guidebook helps 
salespeople, sales managers and trainers pinpoint the specific selling skills, habits 
and attitudes they should focus on for improved performance. It includes an assessment 
of selling skills in 20 categories, providing a graphical representation of each 
individual’s unique selling strengths and growth opportunities.

(Please note: Additional SkillMap titles are available on the following topics: 
Emotional Intelligence, Customer Service, Team Building and Professional 
Communication) 

The Professional Selling SkillMap can be easily integrated into your existing sales 
training program or used as a stand-alone training tool for facilitated group training 
sessions, self-paced individual learning and one-on-one coaching.

Based upon extensive research and field validation, the assessment measures strengths 
and growth opportunities in the following skill categories:

·       Product Knowledge
·       Time Management
·       Building Rapport
·       Active Listening
·       Presenting Benefits
·       Handling Objections
·       Prospecting
·       Handling Adversity
·       Gaining Commitment
·       Confirming Needs
·       Handling Rejection
·       Self-Motivation
·       Self-Coaching
·       Integrity
·       Reducing Buyer’s Remorse
·       Sales Cycle Management
·       Asking Tactical Questions
·       Asking Strategic Questions
·       Territory Management
·       Continuous Learning

Upon completion of the Assessment, a Development Guidebook provides helpful sales 
tips, methods and strategies focused on each respondent’s specific development needs.

A Facilitation and Coaching Guide provides detailed instructions for administering the 
Assessment along with 20 fully scripted 1-hour workshops (one for each skill category) 
including handouts, overhead masters and PowerPoint® presentations. Audio programs are 
available for each skill category to provide post-training skill reinforcement or 
enhance the effectiveness of self-paced learning and one-on-one coaching. 

SkillMaps and other learning resources are available exclusively through our network 
of Affiliates - you can visit www.frontlinelearning.com for more information on the 
Professional Selling SkillMap and our Affiliate program. You can request a free 
preview at: http://www.frontlinelearning.com/contactus1.htm

I appreciate the time you've taken to read through this, and again, wish you continued 
success.

Sincerely,

David Kirkeby
[EMAIL PROTECTED]
763-404-9555

Please note - upon receipt of this message you have automatically been removed from 
our email marketing list. You will not receive further communication from Frontline 
Learning unless you proactively respond to this  message.





what is the standard with setting the amount of time in
session.gc_maxlifetime it has defaulted to 1440 (24 mins) is that considered
long enough?

Peter Houchin
[EMAIL PROTECTED]
=========================================================
     _____                              __   /\
    /_/_/_\                            /  |_/  \
   /_/_/_    __  __  __   __          /         \
   \_/_/_\  /_/ /_/ /_/  /_/          \   _     /
 ___\_\_\/ /_/_/_/ /_//\/_/            \_/ \/\_/
 \_//_/_/ /_/_/_/ /_/ \/_/                    v
     ________   ________________________________________
    /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   /_/_ _/_/ ______  __   __  /_/ ____      __     ______
  /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\    /_/    /_/_/_/
 /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
/_/    \_\/_/_/_/ /_/ \/_/ /_/ /_/    \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
************* We rent the dot in .COM!  **************






It depends on your requirement. For me 1440 sec is too short.
I'll set it to little over 1 hour because login timeout is 1 hour.

If you have login/logout system using session, the value better to be
larger than login timeout.

Regards,

PS: You might want to set gc probability around 10%. Depends on your
requirement, though.

--
Yasuo Ohgaki


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> what is the standard with setting the amount of time in
> session.gc_maxlifetime it has defaulted to 1440 (24 mins) is that considered
> long enough?
>
> Peter Houchin
> [EMAIL PROTECTED]
> =========================================================
>      _____                              __   /\
>     /_/_/_\                            /  |_/  \
>    /_/_/_    __  __  __   __          /         \
>    \_/_/_\  /_/ /_/ /_/  /_/          \   _     /
>  ___\_\_\/ /_/_/_/ /_//\/_/            \_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/                    v
>      ________   ________________________________________
>     /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>    /_/_ _/_/ ______  __   __  /_/ ____      __     ______
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\    /_/    /_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
> /_/    \_\/_/_/_/ /_/ \/_/ /_/ /_/    \_\/_/_/_//_/_/_/
> =========================================================
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> ************* We rent the dot in .COM!  **************
>
>
>
> --
> 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]
>





Hi =)

I'd like to setup a banner exchange with some friends.  Some of them don't 
have PHP access, so I'm trying to come up with something that will work for 
everyone.  I checked one site that's running a banner exchange and saw them 
using a cgi script like this:

<a href="http://www.site.com/exchange.cgi?ad=NonSSI&page=XX">
<img src="http://www.site.com/exchange.cgi?id=siteB&page=XX">
</a>

Looking at that, it suggests the cgi script is some how sending image data 
to be used for displaying the banner ad.  Then, on top of that, it's some 
how routing the visitor to the correct location when they click on the 
ad.  I don't see how they are doing it and figured I'd ask here to see if 
anyone has any ideas.

If you're not sure of how they did it, any ideas on how to accomplish what 
I'm after?

I came across another site that had the following code and some how they 
have it working as well.  It would be cool to figure out how they did it.

<IFRAME SRC="http://www.lemnet.com/banners/show/?user=qatlantis" 
HEIGHT="77" WIDTH="470" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" 
FRAMEBORDER="0"></IFRAME>
<ILAYER SRC="http://www.lemnet.com/banners/show/?user=qatlantis" 
HEIGHT="77" WIDTH="470"></ILAYER> <br> <br>





you can use a cookie that's sent with the image, or better yet put the whole
thing in an <iframe>

Well that's how i'd do it at least.

----------------------------------------------------------------------------
                                  Gfunk - [EMAIL PROTECTED]
                                    http://www.gfunk007.com/
----------------------------------------------------------------------------


----- Original Message -----
From: "Ed Lazor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 4:27 PM
Subject: [PHP] banner exchange, how to?


> Hi =)
>
> I'd like to setup a banner exchange with some friends.  Some of them don't
> have PHP access, so I'm trying to come up with something that will work
for
> everyone.  I checked one site that's running a banner exchange and saw
them
> using a cgi script like this:
>
> <a href="http://www.site.com/exchange.cgi?ad=NonSSI&page=XX">
> <img src="http://www.site.com/exchange.cgi?id=siteB&page=XX">
> </a>
>
> Looking at that, it suggests the cgi script is some how sending image data
> to be used for displaying the banner ad.  Then, on top of that, it's some
> how routing the visitor to the correct location when they click on the
> ad.  I don't see how they are doing it and figured I'd ask here to see if
> anyone has any ideas.
>
> If you're not sure of how they did it, any ideas on how to accomplish what
> I'm after?
>
> I came across another site that had the following code and some how they
> have it working as well.  It would be cool to figure out how they did it.
>
> <IFRAME SRC="http://www.lemnet.com/banners/show/?user=qatlantis"
> HEIGHT="77" WIDTH="470" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0"
> FRAMEBORDER="0"></IFRAME>
> <ILAYER SRC="http://www.lemnet.com/banners/show/?user=qatlantis"
> HEIGHT="77" WIDTH="470"></ILAYER> <br> <br>
>
>
> --
> 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]
>





On Tue, 20 Mar 2001 21:27:14 -0800, Ed Lazor ([EMAIL PROTECTED])
wrote:
>Hi =)
>
>I'd like to setup a banner exchange with some friends.  Some of them
>don't
>have PHP access, so I'm trying to come up with something that will
>work for
>everyone.  I checked one site that's running a banner exchange and
>saw them
>using a cgi script like this:
>
><a href="http://www.site.com/exchange.cgi?ad=NonSSI&page=XX">

this script logs the clickthrough and redirects to the page using
header("Location: $url")

><img src="http://www.site.com/exchange.cgi?id=siteB&page=XX">

this script logs the impression and redirects (or passes thru) to the
banner

it's really not very hard you can do the whole thing in about 20
lines of code.

></a>
>
>Looking at that, it suggests the cgi script is some how sending
>image data
>to be used for displaying the banner ad.  Then, on top of that, it's
>some
>how routing the visitor to the correct location when they click on
>the
>ad.  I don't see how they are doing it and figured I'd ask here to
>see if
>anyone has any ideas.
>
>If you're not sure of how they did it, any ideas on how to
>accomplish what
>I'm after?
>
>I came across another site that had the following code and some how
>they
>have it working as well.  It would be cool to figure out how they
>did it.
>
><IFRAME SRC="http://www.lemnet.com/banners/show/?user=qatlantis"
>HEIGHT="77" WIDTH="470" SCROLLING="no" MARGINHEIGHT="0"
>MARGINWIDTH="0"
>FRAMEBORDER="0"></IFRAME>
><ILAYER SRC="http://www.lemnet.com/banners/show/?user=qatlantis"
>HEIGHT="77" WIDTH="470"></ILAYER> <br> <br>
>
>
>--
>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: php-list-
>[EMAIL PROTECTED]






Jeff, following is the code as it comes out in my
page...can u tell me what i'm doin wrong, besides the
fact that i have to replace that famous "uh ohh i got
a row back()" with an actual snippet :

  <?php
    $db = mysql_connect("localhost","root");
    mysql_select_db("nidc_intranet",$db);
    
    $realsdate="$syear"."-"."$smonth"."-"."$stdate";
    $realedate="$eyear"."-"."$emonth"."-"."$endate";
    $realstime="$shh".":"."$smm"." "."$sttime";
    $realetime="$ehh".":"."$emm"." "."$entime";

    $result = mysql_query("select * from booking where
('$realsdate'>=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);

  if (uh_ohh_I_got_a_row_back()) {
  echo "Someone else is sleeping in the bed! No can
do!";
}
else {
    $sql = "INSERT INTO booking
(room,sdate,edate,stime,etime,purpose,reserved) VALUES
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$res')";
    $result = mysql_query($sql) or Die ("An unexpected
error occured. Please go back and book again.");
    echo "<font face=helvetica size=2
color=#140057><b>Thank you! <font
color=#ff0000>$rooms</font>, has been booked from
<font color=#ff0000>$realsdate</font> to <font
color=#ff0000>$realedate</font>.
    <br><br>
    ** Entries will be deleted 2 weeks after the End
Date.
    ";
}
      ?>

Cheers,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Mr. Armstrong, i'm trying hard to get the message, and
i've got most of it and i'm gonna give it a whirl...

only place where i'm seeing a dizzy question mark is
this :
 if (uh_ohh_I_got_a_row_back())

right, now what exactly do i put in here that tells me
uh ohh, i got a row back!!!! The logic is neat and
pretty understandable. i'm only having problem in raw
codin. but i'm tryin. 

I think i'm gonna suff in a code and see if it works,
and i'll share the stuff with you....

cheers n thanks,
T. Edison jr. 

--- Jeff Armstrong <[EMAIL PROTECTED]> wrote:
> the logic goes:
> 
> $start = some_start_date_a_keen_punter_entered();
> $end   = the_date_he_wants_to_leave();
> 
> select * from booking where
>     ('$start'>=startdate and '$start'<=enddate) or
>     ('$end'>=startdate and '$end'<=enddate)
> 
> if (uh_ohh_I_got_a_row_back())
>   echo "Someone else is sleeping in the bed! No can
> do!",
>        "Cheap discounts for those willing to share a
> bed!",
>        "Are you gorgeous??";
> else
>   print "You got it!"
>   insert good bits into database here
> 
> 
> Of course this is not guaranteed safe, as you can
> end up
> with double bookings in the pico seconds between the
> select
> and the insert - but hey, how many hits a second do
> you expect.
> 
> 
> Regards
> Jeff's Granny
> 
> 
> -----Original Message-----
> From: Thomas Edison Jr.
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 5:08 PM
> To: Jeff Armstrong
> Cc: [EMAIL PROTECTED]
> Subject: RE: SV: [PHP] Booking by Date/Time in mySQL
> 
> 
> I do get your message Jeff, but tell me, after
> having
> used the following code ..
> 
> select * from booking where
>     ('$start'>=startdate and '$start'<=enddate) or
>     ('$end'>=startdate and '$end'<=enddate)
> 
> what code should be written to actually insert
> booking
> data into the table? Because this is basically
> picking
> up data or booking from the Table that fall in this
> period. What i want to do is to check if any booking
> has been made for this period that i'm inserting
> now....
> 
> T. Edison jr.
> 
> --- Jeff Armstrong <[EMAIL PROTECTED]> wrote:
> > One problem is that you are only checking the
> first
> > booking.
> >   select * from booking where room='room'
> > gives ALL bookings, and you look like you are just
> > testing
> > the FIRST one.
> >
> > why not turn it round and do:
> >   select * from booking where
> >     ('$start'>=startdate and '$start'<=enddate) or
> >     ('$end'>=startdate and '$end'<=enddate)
> >
> > This lets mySQL do the test for you.
> > If it returns a row you already have a booking.
> >
> >
> > -----Original Message-----
> > From: Thomas Edison Jr.
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 20, 2001 11:50 AM
> > To: Peter Chr. Hansen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: SV: [PHP] Booking by Date/Time in
> mySQL
> >
> >
> > Peter,
> >
> > what do you mean by Newdate between date1 &
> date2??
> > the logic i'm using is that i'm checkin if the new
> > Start Date & End date lies between the old Start
> > Date
> > & End Date or not. If it does, than entry is
> denied,
> > else booking is succesfull. But things are not
> > running, following is the code i'm using ...
> > ----------
> > <?php
> >     $db = mysql_connect("localhost","root");
> >     mysql_select_db("nidc_intranet",$db);
> >
> >    
> $realsdate="$syear"."-"."$smonth"."-"."$stdate";
> >    
> $realedate="$eyear"."-"."$emonth"."-"."$endate";
> >     $realstime="$shh".":"."$smm"." "."$sttime";
> >     $realetime="$ehh".":"."$emm"." "."$entime";
> >
> > $result = mysql_query("SELECT * FROM booking where
> > room='$rooms',$db);
> > if ($myrow = mysql_fetch_array($result)) {
> >   do {
> > if ($realsdate>=$myrow[sdate]) &&
> > ($realsdate<=$myrow[edate]) &&
> > ($realedate>=$myrow[sdate]) &&
> > ($realedate<=$myrow[edate]) {
> > echo "Sorry";
> > }
> > else {
> >
> >     $sql = "INSERT INTO booking
> > (room,sdate,edate,stime,etime,purpose,reserved)
> > VALUES
> >
>
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
> > es')";
> >     $result = mysql_query($sql) or Die ("An
> > unexpected
> > error occured. Please go back and book again.");
> >     echo "<font face=helvetica size=2
> > color=#140057><b>Thank you! <font
> > color=#ff0000>$rooms</font>, has been booked from
> > <font color=#ff0000>$realsdate</font> to <font
> > color=#ff0000>$realedate</font>.
> >     <br><br>
> >     ** Entries will be deleted 2 weeks after the
> End
> > Date.
> >     ";
> > }
> >   } while ($myrow = mysql_fetch_array($result));
> > }
> >      ?>
> > ------------
> >
> > Regards,
> > T. Edison jr.
> >
> > --- "Peter Chr. Hansen" <[EMAIL PROTECTED]> wrote:
> > > Can't you use "
> > >   Newdate between date1 and date2
> > >
> > >
> > > -----Oprindelig meddelelse-----
> > > Fra: Thomas Edison Jr.
> > > [mailto:[EMAIL PROTECTED]]
> > > Sendt: 20. marts 2001 12:25
> > > Til: [EMAIL PROTECTED]
> > > Emne: [PHP] Booking by Date/Time in mySQL
> > >
> > >
> > > I'm facing this problem.
> > > I have made a room booking application.
> > > There is a Start Date & Time and End Date & Time
> > of
> > > Booking a room.
> > >
> > > Problem is that once booked, you can't book a
> room
> > > with a date or time that falls between an
> Already
> > > booked  Date & Time.
> > >
> > > For example, if someone's booked a room from 3rd
> > > March
> > > to 10th March between 4:00 p.m. to 12:00 p.m. ,
> > you
> > > can't book the same room for the any date
> between
> > > 3rd
> > > March to 10th March and between 4 pm & 12 pm.
> > >
> > > How do i do that?
> > >
> > > Regards,
> > > T. Edison jr.
> > >
> > >
> > > =====
> > > Rahul S. Johari (Director)
> > > ******************************************
> > > Abraxas Technologies Inc.
> > > Homepage : http://www.abraxastech.com
> > > Email : [EMAIL PROTECTED]
> > > Tel : 91-4546512/4522124
> > > *******************************************
> > >
> > >
> __________________________________________________
> 
=== message truncated ===


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Mr. Armstrong, i'm trying hard to get the message, and
i've got most of it and i'm gonna give it a whirl...

only place where i'm seeing a dizzy question mark is
this :
 if (uh_ohh_I_got_a_row_back())

right, now what exactly do i put in here that tells me
uh ohh, i got a row back!!!! The logic is neat and
pretty understandable. i'm only having problem in raw
codin. but i'm tryin. 

I think i'm gonna suff in a code and see if it works,
and i'll share the stuff with you....

cheers n thanks,
T. Edison jr. 

--- Jeff Armstrong <[EMAIL PROTECTED]> wrote:
> the logic goes:
> 
> $start = some_start_date_a_keen_punter_entered();
> $end   = the_date_he_wants_to_leave();
> 
> select * from booking where
>     ('$start'>=startdate and '$start'<=enddate) or
>     ('$end'>=startdate and '$end'<=enddate)
> 
> if (uh_ohh_I_got_a_row_back())
>   echo "Someone else is sleeping in the bed! No can
> do!",
>        "Cheap discounts for those willing to share a
> bed!",
>        "Are you gorgeous??";
> else
>   print "You got it!"
>   insert good bits into database here
> 
> 
> Of course this is not guaranteed safe, as you can
> end up
> with double bookings in the pico seconds between the
> select
> and the insert - but hey, how many hits a second do
> you expect.
> 
> 
> Regards
> Jeff's Granny
> 
> 
> -----Original Message-----
> From: Thomas Edison Jr.
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 5:08 PM
> To: Jeff Armstrong
> Cc: [EMAIL PROTECTED]
> Subject: RE: SV: [PHP] Booking by Date/Time in mySQL
> 
> 
> I do get your message Jeff, but tell me, after
> having
> used the following code ..
> 
> select * from booking where
>     ('$start'>=startdate and '$start'<=enddate) or
>     ('$end'>=startdate and '$end'<=enddate)
> 
> what code should be written to actually insert
> booking
> data into the table? Because this is basically
> picking
> up data or booking from the Table that fall in this
> period. What i want to do is to check if any booking
> has been made for this period that i'm inserting
> now....
> 
> T. Edison jr.
> 
> --- Jeff Armstrong <[EMAIL PROTECTED]> wrote:
> > One problem is that you are only checking the
> first
> > booking.
> >   select * from booking where room='room'
> > gives ALL bookings, and you look like you are just
> > testing
> > the FIRST one.
> >
> > why not turn it round and do:
> >   select * from booking where
> >     ('$start'>=startdate and '$start'<=enddate) or
> >     ('$end'>=startdate and '$end'<=enddate)
> >
> > This lets mySQL do the test for you.
> > If it returns a row you already have a booking.
> >
> >
> > -----Original Message-----
> > From: Thomas Edison Jr.
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 20, 2001 11:50 AM
> > To: Peter Chr. Hansen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: SV: [PHP] Booking by Date/Time in
> mySQL
> >
> >
> > Peter,
> >
> > what do you mean by Newdate between date1 &
> date2??
> > the logic i'm using is that i'm checkin if the new
> > Start Date & End date lies between the old Start
> > Date
> > & End Date or not. If it does, than entry is
> denied,
> > else booking is succesfull. But things are not
> > running, following is the code i'm using ...
> > ----------
> > <?php
> >     $db = mysql_connect("localhost","root");
> >     mysql_select_db("nidc_intranet",$db);
> >
> >    
> $realsdate="$syear"."-"."$smonth"."-"."$stdate";
> >    
> $realedate="$eyear"."-"."$emonth"."-"."$endate";
> >     $realstime="$shh".":"."$smm"." "."$sttime";
> >     $realetime="$ehh".":"."$emm"." "."$entime";
> >
> > $result = mysql_query("SELECT * FROM booking where
> > room='$rooms',$db);
> > if ($myrow = mysql_fetch_array($result)) {
> >   do {
> > if ($realsdate>=$myrow[sdate]) &&
> > ($realsdate<=$myrow[edate]) &&
> > ($realedate>=$myrow[sdate]) &&
> > ($realedate<=$myrow[edate]) {
> > echo "Sorry";
> > }
> > else {
> >
> >     $sql = "INSERT INTO booking
> > (room,sdate,edate,stime,etime,purpose,reserved)
> > VALUES
> >
>
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
> > es')";
> >     $result = mysql_query($sql) or Die ("An
> > unexpected
> > error occured. Please go back and book again.");
> >     echo "<font face=helvetica size=2
> > color=#140057><b>Thank you! <font
> > color=#ff0000>$rooms</font>, has been booked from
> > <font color=#ff0000>$realsdate</font> to <font
> > color=#ff0000>$realedate</font>.
> >     <br><br>
> >     ** Entries will be deleted 2 weeks after the
> End
> > Date.
> >     ";
> > }
> >   } while ($myrow = mysql_fetch_array($result));
> > }
> >      ?>
> > ------------
> >
> > Regards,
> > T. Edison jr.
> >
> > --- "Peter Chr. Hansen" <[EMAIL PROTECTED]> wrote:
> > > Can't you use "
> > >   Newdate between date1 and date2
> > >
> > >
> > > -----Oprindelig meddelelse-----
> > > Fra: Thomas Edison Jr.
> > > [mailto:[EMAIL PROTECTED]]
> > > Sendt: 20. marts 2001 12:25
> > > Til: [EMAIL PROTECTED]
> > > Emne: [PHP] Booking by Date/Time in mySQL
> > >
> > >
> > > I'm facing this problem.
> > > I have made a room booking application.
> > > There is a Start Date & Time and End Date & Time
> > of
> > > Booking a room.
> > >
> > > Problem is that once booked, you can't book a
> room
> > > with a date or time that falls between an
> Already
> > > booked  Date & Time.
> > >
> > > For example, if someone's booked a room from 3rd
> > > March
> > > to 10th March between 4:00 p.m. to 12:00 p.m. ,
> > you
> > > can't book the same room for the any date
> between
> > > 3rd
> > > March to 10th March and between 4 pm & 12 pm.
> > >
> > > How do i do that?
> > >
> > > Regards,
> > > T. Edison jr.
> > >
> > >
> > > =====
> > > Rahul S. Johari (Director)
> > > ******************************************
> > > Abraxas Technologies Inc.
> > > Homepage : http://www.abraxastech.com
> > > Email : [EMAIL PROTECTED]
> > > Tel : 91-4546512/4522124
> > > *******************************************
> > >
> > >
> __________________________________________________
> 
=== message truncated ===

=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Why wouldn't this redirect?  The query works, but the page won't redirect. I
have used the same two lines successfully on other pages.  I'm very tired,
it's probably obvious.

<?php
// assuming $uid, $itemid, $week, $cur_wk in querystring

//connect to db
$db = mysql_connect ("localhost","user","password");
mysql_select_db("mydb",$db);

//update item - weekX to Taken and record buyer
$sql = "update items set week" . $week . " = 'T', buyerID = " . $uid .
                 " where itemID = " . $itemid;
$result = mysql_query($sql);

$redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid;
header ($redirurl);
?>

G'Night
 Dean





> Why wouldn't this redirect?

Because you need to do this:

<?
   header ("Location: $redirurl");
?>

Jason




On Tue, Mar 20, 2001 at 10:05:06PM -0800, [EMAIL PROTECTED] wrote:
> Why wouldn't this redirect?  The query works, but the page won't redirect. I
> have used the same two lines successfully on other pages.  I'm very tired,
> it's probably obvious.
> 
> <?php
> // assuming $uid, $itemid, $week, $cur_wk in querystring
> 
> //connect to db
> $db = mysql_connect ("localhost","user","password");
> mysql_select_db("mydb",$db);
> 
> //update item - weekX to Taken and record buyer
> $sql = "update items set week" . $week . " = 'T', buyerID = " . $uid .
>                " where itemID = " . $itemid;
> $result = mysql_query($sql);
> 
> $redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid;
> header ($redirurl);
> ?>

It appears your code is missing the "Location: " part of the header.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
It's getting harder and harder to think out loud.  One of these days
someone's gonna go off and kill Thomas a'Becket for me...
             -- Larry Wall in <[EMAIL PROTECTED]>




"Jason Stechschulte" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tue, Mar 20, 2001 at 10:05:06PM -0800, [EMAIL PROTECTED] wrote:
SNIP
> >
> > $redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid;
> > header ($redirurl);
> > ?>
>
> It appears your code is missing the "Location: " part of the header.

In addition to this, you probably better off using absolute URI. (Unless you are
using Apache)
Refer to RFC for details.

--
Yasuo Ohgaki






Mr. Jeff, following is the code i'm using in my page,
could you tell me what i'm doing wrong, besides of
course the famous "uh ohh i got a row back()" code
that needs to be replaced....

<?php
    $db = mysql_connect("localhost","root");
    mysql_select_db("nidc_intranet",$db);
    
    $realsdate="$syear"."-"."$smonth"."-"."$stdate";
    $realedate="$eyear"."-"."$emonth"."-"."$endate";
    $realstime="$shh".":"."$smm"." "."$sttime";
    $realetime="$ehh".":"."$emm"." "."$entime";

    $result = mysql_query("select * from booking where
('$realsdate'>=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);

  if (uh_ohh_I_got_a_row_back()) {
  echo "Someone else is sleeping in the bed! No can
do!";
}
else {
    $sql = "INSERT INTO booking
(room,sdate,edate,stime,etime,purpose,reserved) VALUES
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$res')";
    $result = mysql_query($sql) or Die ("An unexpected
error occured. Please go back and book again.");
    echo "<font face=helvetica size=2
color=#140057><b>Thank you! <font
color=#ff0000>$rooms</font>, has been booked from
<font color=#ff0000>$realsdate</font> to <font
color=#ff0000>$realedate</font>.
    <br><br>
    ** Entries will be deleted 2 weeks after the End
Date.
    ";
}
 
     ?>

cheers,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Jimmy Bäckström wrote:
> 
> Yo!
> I'm thinking of writing a bulletin board and I wonder about threads. I want the 
>board to be built on threads but I don't know how to do it. I want it to look 
>something like this:
> 
> subject 1
>    |
>    |__ reply1 to 'subject 1'
>    |       |
>    |       |__ reply1 to 'reply1 to subject 1'
>    |       |
>    |       |__ reply2 to 'reply1 to subject 1'
>    |
>    |__ reply2 to 'subject 1'
> 
> This is important to me so I'm thankful for any help I can get!
> 
> //Broder


I did it this way for a vbulletin/ubb style board which also does
threading

thread table has in it a coloumn
thread_counter

messages table has a column thread_order

So say there is thread 1
thread counter goes to 1
order is 1

2nd post someone replies to 1

order is 1.2 (2 comes from thread counter)

3rd post - a reply to 2nd post

order is 1.2.3

4th post - someone replies to 2nd post

order is 1.2.4

and so on and so on 
so you can get a threaded view in one sql call.
Im using postggresql., interbase and sybase and to do the creation of
thread orders I use triggers. Working out the ordering directly in php
would really suck - you could get problems with concurrent updates.
I never considered MYsql because of it's lack of triggers, stored
procedures etc etc People say these are uneccessary but I tend to
disagree. They save you a ton of clunky php and help  speed things up.




You mean something like this:

http://www.astronomy.net/forums/



> -----Original Message-----
> From: Jimmy Bäckström [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 4:54 PM
> To: PHP General List
> Subject: [PHP] Create a Bulletin Board
>
>
> Yo!
> I'm thinking of writing a bulletin board and I wonder about
> threads. I want the board to be built on threads but I don't know
> how to do it. I want it to look something like this:
>
> subject 1
>    |
>    |__ reply1 to 'subject 1'
>    |       |
>    |       |__ reply1 to 'reply1 to subject 1'
>    |       |
>    |       |__ reply2 to 'reply1 to subject 1'
>    |
>    |__ reply2 to 'subject 1'
>
> This is important to me so I'm thankful for any help I can get!
>
> //Broder
>






Jeanne,

Your script example looks very promising. I have spent two solid days
trying to solve this problem. I think what you have provided will be a big
help. I am having trouble getting the navigation frame to update, though. 
I'm not sure what I'm missing. Do you have a working example?

Best,

Kathie

------------------------------
Kathleen A. Ferraro
Senior Curriculum Specialist
Office of Medical Education
Scaife M211
University of Pittsburgh
Pittsburgh, PA 15261 USA





Hi@

I have a database in whih I have a lot of emails. What
I want to do is basically a small newsletter kindaa
thing which is to be mailed to all the emails which I
am goingto pick from the database.

If I use

while($r=mysql_fetch_array($result)
{
$email = $r['email'];
}
and then use the mail() function to email. It will
just go to one person . I want it to go to all the ppl
in the list. 



Thank YOu
Dhaval Desai

Thank yOu

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




while($r=mysql_fetch_array($result)
    $to .=$r['email'].",";


mail($to,....);




Dhaval Desai wrote:

> Hi@
>
> I have a database in whih I have a lot of emails. What
> I want to do is basically a small newsletter kindaa
> thing which is to be mailed to all the emails which I
> am goingto pick from the database.
>
> If I use
>
> while($r=mysql_fetch_array($result)
> {
> $email = $r['email'];
> }
> and then use the mail() function to email. It will
> just go to one person . I want it to go to all the ppl
> in the list.
>
> Thank YOu
> Dhaval Desai
>
> Thank yOu
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> --
> 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]





On Wed, 21 Mar 2001 17:01, Dhaval Desai wrote:
> Hi@
>
> I have a database in whih I have a lot of emails. What
> I want to do is basically a small newsletter kindaa
> thing which is to be mailed to all the emails which I
> am goingto pick from the database.
>
> If I use
>
> while($r=mysql_fetch_array($result)
> {
> $email = $r['email'];
> }
> and then use the mail() function to email. It will
> just go to one person . I want it to go to all the ppl
> in the list.
>

Well, doing it that way you would end up sending an email to each person 
on the list. Altenatively you could loop through the email addresses and 
build a cc or bcc to use in the mail() function. Either way, things might 
slow down a bit if you have a significant number of addresses. Somewhere 
out there is an email class that might help.

Alternatively you could use your database to build a 'subscription list' 
for something like majordomo.


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Addressed to: Jen Hall <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from Jen Hall <[EMAIL PROTECTED]> Tue, 20 Mar 2001 19:59:26 
-0500
>
> Hi there
> I am trying to build an application where a user can use an
> HTML form, fill out some fields, select a file from their
> hard drive, and have it emailed as an attachment with the
> contents of the form.  (essentially, fill in your name and
> address, use my module to attach ms-word file of your
> resume, send email of all).


> I am able to make it work with an image as the attachment,
> but when I select an MS-WORD document, which is the goal of
> this application, it still thinks it's an image, and doesn't
> work properly.


Emailing a .doc file is a VERY BAD idea.  VB for applications which is
embedded in word is very powerful.  What happens when some hacker
decides to use your page to send a vba script like the naked wife virus
thru your program?

   Oh, here is a resume...  lets take a look.

   Open the attachemnt.

   A burst of network activity while the vb script sends a
   copy of itself to everyone in the victim's address book.

   Then the hard drive light comes on as the program deletes
   a bunch of important files from the \windows\system directory.

   Finally the computer crashes because windows can't run
   without the missing files.  Even though the machine won't
   boot, the computer forensics people recover the email, and
   trace it back to you.

   The victim's lawyers come knocking on your door asking for
   damages because you let some hacker release a virus thru
   your program that wiped out several computers at the victim's
   company, some of their customers, as well as several of
   his friends.

   You are forced out of business because the damages are more
   than the value of your entire company.


Not good.


Don't believe me?  How about one of them:

   http://www.gcn.com/state/vol5_no11/enterprise/491-1.html

   http://members.door.net/kls/virusinfo.htm

   http://venus.soci.niu.edu/~cudigest/CUDS11/cud1120.html

   http://www.jwolsen.com/wtip035.htm


Want more? - search for 'macro virus' on your favorite search engine.


NEVER send .doc, .exe, .com, .bat or .vbs files as attachments, and
never - ever open them if one is sent to you.  Not even from someone you
trust. Melissa, Anna and Naked Wife all depend on the fact that the
virus often comes from a trusted individual as part of their tactics,
and it works!  Are you sure your anti-virus software is up to date?




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Hi Rick
I have advised my client of all of the risk you mention.
They still want to go ahead.  They feel that the bulk of their website visitors are
trustworthy (huge assumption on their part), and they tell me they will assume all
responsibility for virus checking, etc.

I still need to know how to do it - technically - to allow an attachment of the kind 
they
desire....

thanks
-jen
.

[EMAIL PROTECTED] wrote:

> Addressed to: Jen Hall <[EMAIL PROTECTED]>
>               [EMAIL PROTECTED]
>
> ** Reply to note from Jen Hall <[EMAIL PROTECTED]> Tue, 20 Mar 2001 19:59:26 
>-0500
> >
> > Hi there
> > I am trying to build an application where a user can use an
> > HTML form, fill out some fields, select a file from their
> > hard drive, and have it emailed as an attachment with the
> > contents of the form.  (essentially, fill in your name and
> > address, use my module to attach ms-word file of your
> > resume, send email of all).
>
>
> > I am able to make it work with an image as the attachment,
> > but when I select an MS-WORD document, which is the goal of
> > this application, it still thinks it's an image, and doesn't
> > work properly.
>
> Emailing a .doc file is a VERY BAD idea.  VB for applications which is
> embedded in word is very powerful.  What happens when some hacker
> decides to use your page to send a vba script like the naked wife virus
> thru your program?
>
>    Oh, here is a resume...  lets take a look.
>
>    Open the attachemnt.
>
>    A burst of network activity while the vb script sends a
>    copy of itself to everyone in the victim's address book.
>
>    Then the hard drive light comes on as the program deletes
>    a bunch of important files from the \windows\system directory.
>
>    Finally the computer crashes because windows can't run
>    without the missing files.  Even though the machine won't
>    boot, the computer forensics people recover the email, and
>    trace it back to you.
>
>    The victim's lawyers come knocking on your door asking for
>    damages because you let some hacker release a virus thru
>    your program that wiped out several computers at the victim's
>    company, some of their customers, as well as several of
>    his friends.
>
>    You are forced out of business because the damages are more
>    than the value of your entire company.
>
> Not good.
>
> Don't believe me?  How about one of them:
>
>    http://www.gcn.com/state/vol5_no11/enterprise/491-1.html
>
>    http://members.door.net/kls/virusinfo.htm
>
>    http://venus.soci.niu.edu/~cudigest/CUDS11/cud1120.html
>
>    http://www.jwolsen.com/wtip035.htm
>
> Want more? - search for 'macro virus' on your favorite search engine.
>
> NEVER send .doc, .exe, .com, .bat or .vbs files as attachments, and
> never - ever open them if one is sent to you.  Not even from someone you
> trust. Melissa, Anna and Naked Wife all depend on the fact that the
> virus often comes from a trusted individual as part of their tactics,
> and it works!  Are you sure your anti-virus software is up to date?
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com





> [EMAIL PROTECTED] wrote:
>
> > Addressed to: Jen Hall <[EMAIL PROTECTED]>
> >               [EMAIL PROTECTED]
> >
> > ** Reply to note from Jen Hall <[EMAIL PROTECTED]> Tue,
> 20 Mar 2001 19:59:26 -0500
> > >
> > > Hi there
> > > I am trying to build an application where a user can use an
> > > HTML form, fill out some fields, select a file from their
> > > hard drive, and have it emailed as an attachment with the
> > > contents of the form.  (essentially, fill in your name and
> > > address, use my module to attach ms-word file of your
> > > resume, send email of all).
> >
> >
> > > I am able to make it work with an image as the attachment,
> > > but when I select an MS-WORD document, which is the goal of
> > > this application, it still thinks it's an image, and doesn't
> > > work properly.
> >
> > Emailing a .doc file is a VERY BAD idea.  VB for applications which is
> > embedded in word is very powerful.  What happens when some hacker
> > decides to use your page to send a vba script like the naked wife virus
> > thru your program?
> >
> >    Oh, here is a resume...  lets take a look.
> >
> >    Open the attachemnt.
> >
> >    A burst of network activity while the vb script sends a
> >    copy of itself to everyone in the victim's address book.
> >
> >    Then the hard drive light comes on as the program deletes
> >    a bunch of important files from the \windows\system directory.
> >
> >    Finally the computer crashes because windows can't run
> >    without the missing files.  Even though the machine won't
> >    boot, the computer forensics people recover the email, and
> >    trace it back to you.
> >
> >    The victim's lawyers come knocking on your door asking for
> >    damages because you let some hacker release a virus thru
> >    your program that wiped out several computers at the victim's
> >    company, some of their customers, as well as several of
> >    his friends.
> >
> >    You are forced out of business because the damages are more
> >    than the value of your entire company.
> >
> > Not good.
> >
> > Don't believe me?  How about one of them:
> >
> >    http://www.gcn.com/state/vol5_no11/enterprise/491-1.html
> >
> >    http://members.door.net/kls/virusinfo.htm
> >
> >    http://venus.soci.niu.edu/~cudigest/CUDS11/cud1120.html
> >
> >    http://www.jwolsen.com/wtip035.htm
> >
> > Want more? - search for 'macro virus' on your favorite search engine.
> >
> > NEVER send .doc, .exe, .com, .bat or .vbs files as attachments, and
> > never - ever open them if one is sent to you.  Not even from someone you
> > trust. Melissa, Anna and Naked Wife all depend on the fact that the
> > virus often comes from a trusted individual as part of their tactics,
> > and it works!  Are you sure your anti-virus software is up to date?
> >
> > Rick Widmer
> > Internet Marketing Specialists
> > http://www.developersdesk.com
>
> Hi Rick
> I have advised my client of all of the risk you mention.
> They still want to go ahead.  They feel that the bulk of their
> website visitors are
> trustworthy (huge assumption on their part), and they tell me
> they will assume all
> responsibility for virus checking, etc.
>
> I still need to know how to do it - technically - to allow an
> attachment of the kind they
> desire....
>

If you check my post on RE: [PHP] Attachment problem with web based mail -
CODE SAMPLE from earlier today you will find the code that will send the
file.  You can always virus scanners the document before you send it (even
on a Unix box).

Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989






Hello,

How would I simulate an http post in PHP.  Something like the equivalent
of this:

<form action="process.php" method=POST>
<input type=submit><br>
<textarea name=data>
<?= $some_values =>
</textarea>
</form>

And how would I be able to read the resulting page.

__________________________________
www.edsamail.com




On Wed, 21 Mar 2001 17:45, Paul Juliano wrote:
> Hello,
>
> How would I simulate an http post in PHP.  Something like the
> equivalent of this:
>
> <form action="process.php" method=POST>
> <input type=submit><br>
> <textarea name=data>
> <?= $some_values =>
> </textarea>
> </form>
>
> And how would I be able to read the resulting page.


You might find more info here:

http://marc.theaimsgroup.com/?l=php-general&m=97813345106366&w=2

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




You could use curl functions to do this. Search the manual for curl
functions, and enable curl extension in php.
hth
    Dezider

David Robley wrote:

> On Wed, 21 Mar 2001 17:45, Paul Juliano wrote:
> > Hello,
> >
> > How would I simulate an http post in PHP.  Something like the
> > equivalent of this:
> >
> > <form action="process.php" method=POST>
> > <input type=submit><br>
> > <textarea name=data>
> > <?= $some_values =>
> > </textarea>
> > </form>
> >
> > And how would I be able to read the resulting page.
>
> You might find more info here:
>
> http://marc.theaimsgroup.com/?l=php-general&m=97813345106366&w=2
>
> --
> David Robley                        | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet                            | http://auseinet.flinders.edu.au/
>             Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





No can do...

You can send a post to another page, but not go to that page.

In order to go to the page the form was was posted, the information must
come from the client. You can use javascript for this, but it is not a very
stable solution.

// Tobias

""Paul Juliano"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello,
>
> How would I simulate an http post in PHP.  Something like the equivalent
> of this:
>
> <form action="process.php" method=POST>
> <input type=submit><br>
> <textarea name=data>
> <?= $some_values =>
> </textarea>
> </form>
>
> And how would I be able to read the resulting page.
>
> __________________________________
> www.edsamail.com
>
> --
> 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]
>






Hello

Is possible to execute a file which was write in Perl from inside a PHP file?
If yes, how can I do that?




I'm not sure what you really want to do, but you can use system() (or others) to
execute something on your web server. (You may not be able to do that. It
depends on server config)

Regards,

--
Yasuo Ohgaki


"Calin Rotaru" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
>
> Is possible to execute a file which was write in Perl from inside a PHP file?
> If yes, how can I do that?
>
> --
> 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]
>





Addressed to: "Henkie" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Henkie" <[EMAIL PROTECTED]> Tue, 20 Mar 2001 09:37:22 
-0000
>
> Hi,
>
> Recently, I saw a presentation by Rasmus Lerdorf about php.  He used
> netscape and php scripts as presentation software and it looked really cool.
> Does someone know if this is somewhere available ?


Try here:

   http://conf.php.net/




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Hi,

I`m having whats probably a very basic problem but just can`t get my head 
around it this late in the day, anyone have any idea why this won`t work?

$URL="domain.com";

header ("Location: Http://www.$URL/members/index.php");

$URL changes so I can`t write it directly into the header line, anyone?




Should work just fine.

On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:

> Hi,
>
> I`m having whats probably a very basic problem but just can`t get my head
> around it this late in the day, anyone have any idea why this won`t work?
>
> $URL="domain.com";
>
> header ("Location: Http://www.$URL/members/index.php");
>
> $URL changes so I can`t write it directly into the header line, anyone?
>
> --
> 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]
>





Hello,
Yes this should work, but if like me, you still have no redirection and
you are working with IE 4.0, put exit; after header.
$URL="domain.com";
header ("Location: Http://www.$URL/members/index.php");
exit;

I have not seen this anywhere, but putting exit; after a redirection
was the only way to get my redirection with header to work.

py

----- Original Message -----
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 7:45 AM
Subject: Re: [PHP] Header Problem


> Should work just fine.
>
> On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:
>
> > Hi,
> >
> > I`m having whats probably a very basic problem but just can`t get my
head
> > around it this late in the day, anyone have any idea why this won`t
work?
> >
> > $URL="domain.com";
> >
> > header ("Location: Http://www.$URL/members/index.php");
> >
> > $URL changes so I can`t write it directly into the header line, anyone?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi,
I was wondewring if someone know the reason to the error below,
I'm no Unix guru and my sysadm says he cant get ldap to work due to this,
is there anyone who tell me what to tell him to get it to work?
greetings
Jimmy
Lund Sweden

//ERROR ENCLOSED BELOW.


gcc -DSOLARIS2=260 -I/usr/local/src/php-4.0.0
-I/usr/local/src/php-4.0.0/Zend -I/usr/local/src/php-4.0.0/Zend
-I/usr/local/src/php-4.0.0 `./apaci` -o httpd buildmark.o modules.o
modules/php4/libphp4.a modules/extra/libextra.a
modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a
-R/usr/ucblib -R/usr/local/ldap-3.3/lib
-R/usr/local/mysql-3.22.32/lib/mysql -L/usr/ucblib
-L/usr/local/ldap-3.3/lib -L/usr/local/mysql-3.22.32/lib/mysql
-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -ldb -lpam
-ldl -lmysqlclient -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket
-lsocket -lsocket -lnsl -lldap -llber -lavl -lldbm -lldif -llthread -lphp4
Undefined                       first referenced
  symbol                             in file
ldap_module                         modules.o
ld: fatal: Symbol referencing errors. No output written to httpd
collect2: ld returned 1 exit status




the only problem could be that yourUser@webhost do not have same permisions
for this db as yourUser@yourHost, check them if you can

-almir



"Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Almir,
>
> Yes I checked the names and they are correct.  Yes I am able to connect
using
> the command prompt from the remote server as I am able to list the
databases,
> tables, etc. remotely.
>
> Thanks,
>
> Floyd
>
> almir wrote:
>
> > when you connect to server issue
> > "show databases" -query then look inside what you can see some servers
are
> > case sensitive
> > i hope that will help,
> > and are you sure that you are connected , it could be that you may not
> > connect at all because of firewalls or something like that
> > -almir
> >
> > "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I am trying to connect to a remote mySQL server through PHP but I get
a
> > > mySQL error of "Unknown Database".  I can connect to the remote mySQL
> > server
> > > using the mysql command but not with PHP.
> > >
> > > 1. How can I debug what the problem is?
> > > 2. Do I need to specify the Port parameter in PHP?
> > > 3. Which mySQL error logs do I examine to help me out - the one on the
> > local
> > > machine or on the remote machine?
> > > 4. And where is the mySQL error logs anyway?
> > >
> > > I tried other lists but no help there.  I hope this list helps!
> > >
> > > Thanks all,
> > >
> > > Floyd Piedad
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP 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]
>






Hi Almir,

Here is more info:
Server1: where my database resides
Server2: where my script resides
On Server1: I can access the database using mysql command and PHP.
On Server2: I can access the database using mysql -hserver1 ....  I can show all
the tables, select data, etc.  BUT, when running PHP script on this server,
(mysql_connect("server1",user,password)) all that happens is that it still
connects to the mysql in Server2 and not in Server1.

I really cannot understand why.  Being able to access Server1 using Server2
mysql command verifies my access rights right?


I am about to give up on this!

Thanks,

Floyd

almir wrote:

> the only problem could be that yourUser@webhost do not have same permisions
> for this db as yourUser@yourHost, check them if you can
>
> -almir
>
> "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi Almir,
> >
> > Yes I checked the names and they are correct.  Yes I am able to connect
> using
> > the command prompt from the remote server as I am able to list the
> databases,
> > tables, etc. remotely.
> >
> > Thanks,
> >
> > Floyd
> >
> > almir wrote:
> >
> > > when you connect to server issue
> > > "show databases" -query then look inside what you can see some servers
> are
> > > case sensitive
> > > i hope that will help,
> > > and are you sure that you are connected , it could be that you may not
> > > connect at all because of firewalls or something like that
> > > -almir
> > >
> > > "Floyd Piedad" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > I am trying to connect to a remote mySQL server through PHP but I get
> a
> > > > mySQL error of "Unknown Database".  I can connect to the remote mySQL
> > > server
> > > > using the mysql command but not with PHP.
> > > >
> > > > 1. How can I debug what the problem is?
> > > > 2. Do I need to specify the Port parameter in PHP?
> > > > 3. Which mySQL error logs do I examine to help me out - the one on the
> > > local
> > > > machine or on the remote machine?
> > > > 4. And where is the mySQL error logs anyway?
> > > >
> > > > I tried other lists but no help there.  I hope this list helps!
> > > >
> > > > Thanks all,
> > > >
> > > > Floyd Piedad
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





i was able to succesfully check for start dates & end
dates before feeding new booking in the database using
the following code :

<?php
    $db = mysql_connect("localhost","root");
    mysql_select_db("nidc_intranet",$db);
    
    $realsdate="$syear"."-"."$smonth"."-"."$stdate";
    $realedate="$eyear"."-"."$emonth"."-"."$endate";
    $realstime="$shh".":"."$smm".":"."00"."
"."$sttime";
    $realetime="$ehh".":"."$emm".":"."00"."
"."$entime";

    $result = mysql_query("select * from booking where
('$realsdate'>=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);

  if (mysql_num_rows($result)) {
 ?>
 <script language="javascript">
 alert('Sorry, the room is already booked for the
period. Please choose a different period');
 history.go(-1);
 </script>
 <?
}
else {
    $sql = "INSERT INTO booking
(room,sdate,edate,stime,etime,purpose,reserved) VALUES
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$res')";
    $result = mysql_query($sql) or Die ("An unexpected
error occured. Please go back and book again.");
    echo "<font face=helvetica size=2
color=#140057><b>Thank you! <font
color=#ff0000>$rooms</font>, has been booked from
<font color=#ff0000>$realsdate</font> to <font
color=#ff0000>$realedate</font>.
    <br><br>
    ** Entries will be deleted 2 weeks after the End
Date.
    ";
}
 
     ?>

But now - TIME problems. I have to check for the same
on TIME as well - the problem is - he needs to check
for the TIME in that Particular row only...and not as
a whole. For eg :- if there's a Booking from 1st
August 2001 1:00 p.m. to 1st August 2001 3:00 p.m.
(same day), and if someone wants to make a booking for
the same day from 4:00 p.m. to 6:00 p.m., my code
doesn't allow that. Because he checks for the DATE -
and as soon as he will find 1st August, he won't allow
a booking to be made for that same day. What do i do??
I know the changes have to be made here :

$result = mysql_query("select * from booking where
('$realsdate'>=sdate and '$realsdate'<=edate) or
('$realedate'>=sdate and '$realedate'<=edate)",$db);


but i dodn't know what changes. Please HELP!!

Cheers,
T. Edison jr.


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

    do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!





You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
     do whatever with $maybe
}

-Stewart

-----Original Message-----
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

    do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


-- 
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]




Alternatively, you can use the approach below. There are different benefits
from each approach. The following approach is particularly useful if you
want an unlimited number of parameters (like elipses in C).

function print_this ($value1, $value2)
{

        if (3==func_num_args())
                {
                $maybe3=func_get_arg(2);    // args are counted from 0 up
                }

..
..
}


-----Original Message-----
From: Stewart Taylor [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:53
To: 'Jack Sasportas'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Optional Parameter ?


You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
     do whatever with $maybe
}

-Stewart

-----Original Message-----
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

    do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


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

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







Or you can use an array:
function print_this( $ArrayValues ) {

    do whatever using count($ArrayValues) to determine the bounds of the
array;

}

-----Original Message-----
From: Neil Kimber [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 11:44
To: Stewart Taylor; 'Jack Sasportas'; [EMAIL PROTECTED]
Subject: RE: [PHP] Optional Parameter ?


Alternatively, you can use the approach below. There are different benefits
from each approach. The following approach is particularly useful if you
want an unlimited number of parameters (like elipses in C).

function print_this ($value1, $value2)
{

        if (3==func_num_args())
                {
                $maybe3=func_get_arg(2);    // args are counted from 0 up
                }

..
..
}


-----Original Message-----
From: Stewart Taylor [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:53
To: 'Jack Sasportas'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Optional Parameter ?


You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.

function print_this ($value1, $value2, $maybe3=false)
{
  do whatever
  if ($maybe != false)
     do whatever with $maybe
}

-Stewart

-----Original Message-----
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 08:42
To: php
Subject: [PHP] Optional Parameter ?


Is it possible to have a function that looks something like

function print_this( $value1, $value2, $maybe3) {

    do whatever;

}

that would expect $value1, $value2 BUT would not care if $maybe3 came in
or not ? and not give an error message that there is a missing paramter
?

I know I can do a condition within the function, but just want to see if
there is a more technical approach as in from php to ignore that
optional per say variable.


I did look in my PHP book by wrox, but no luck.

Thanks !!!


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

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




-- 
PHP 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]




Sorry guys...
this is not a php question...
but this is by far the best web resource i have seem...so here goes..

does anyone here know of any mailing list for perl or JAVA...?
any great web resrcs/website?

anyway,
so far.. i still think php official website provides the best resource
for their language as compare to the other languages...

thanks
john







$result = mysql_db_query("FocusDynamics", "SHOW COLUMNS FROM items");
while($field = mysql_fetch_array($result))
{       $thisfield = $field["field"];
        echo("<tr>");
        echo("<td>$thisfield</td><td><input type=text ...
name=$thisfield></td>");
        echo("</tr>");
}

I'm assuming mysql. You may want to play around with analysing
$field["type"] to get the right input attributes. There may be a slicker
way, but I think this is pretty straight forward and the "SHOW COLUMNS"
query isn't going to be slow.

... also this untested so please treat as pseudo code.

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Martin E. Koss [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 18:06
> To: [EMAIL PROTECTED]
> Subject: Dynamically build a form from mySQL table
> 
> 
> Hi,
> I've been trying to figure this out by looking through the code in
> phpMyAdmin but I'm not getting very far. There's probably 
> some help about it
> somewhere.
> 
> What I want to do is dynamically generate a form where I get 
> a table row
> containing the field name in one cell and the input field in 
> the next cell,
> for example:
> 
> $DatabaseName = "FocusDynamics";
> $TableName = "Items";
> 
> // open the table and get all field names, sizes, etc.,
> 
> // for each Field name, print something like:
> 
> PRINT "<tr>\n";
> PRINT "<td>$FieldName</td>\n";
> PRINT "<td><input type=\"text\" name=\"$FieldName\" 
> value=\"$FieldValue\"
> maxlength=\"FieldSize\"></td>\n";
> PRINT "</tr>";
> 
> How do I get all this info from the table?
> 
> Thanks for any help.
> 
> 
> Martin E. Koss
> M: 07946-706459
> E: [EMAIL PROTECTED]
> 
> 




Hi

Propably a really simple question, but my math skills are not up to speed 
anymore:

How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
I could always divide by 100 and have a look at the result and se if it has 
any decimals but I'm guessing this could be done prettier using modulus. Right?

- Nille





If the number divided by 100 hundred has no remainder
e.g.
if (($num % 100) == 0) even_100 = true;

-Stewart

-----Original Message-----
From: Nicklas af Ekenstam [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 09:38
To: [EMAIL PROTECTED]
Subject: [PHP] Finding every even 100


Hi

Propably a really simple question, but my math skills are not up to speed 
anymore:

How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
I could always divide by 100 and have a look at the result and se if it has 
any decimals but I'm guessing this could be done prettier using modulus.
Right?

- Nille


-- 
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]





$i % 100 = 0

At 10:37 AM 3/21/01 +0100, Nicklas af Ekenstam wrote:
>Hi
>
>Propably a really simple question, but my math skills are not up to speed 
>anymore:
>
>How do I find out if an int is an even 100? I.e. 100, 200, 1200, 9900 etc.
>I could always divide by 100 and have a look at the result and se if it 
>has any decimals but I'm guessing this could be done prettier using 
>modulus. Right?
>
>- Nille
>
>
>--
>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]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





I have written a system with authentication to gain access to individual
data.
Since I am using the post method the command line has something like

abc.com?client_no=5

Now even though if that person emails you that url, you won't gain
access to it bascause of authentication that is needed, what can happen
is an authorized user could change the 5 in the url to 8, and then see
the information that is there which belongs to client 8.

Because of this I am thinking in this case I should be using the post
method instead of the get method.

Does anyone have a link to a doc that has a good example in both methods
along with a good explanation so that I can make sure I understand what
it's doing?

Thanks for your help!

Jack





It would be better to use randomly generated strings for your client ids
e.g. md5(uniqid(rand()));
This would be must harder for another use to guess.


Even better would be to store your users details in a session variable so
that the id will never appear in the url at all.


e.g. a very basic example.

session_name("YOURSESSIONID")
session_start();

authenticate etc.. and read user details into $user array/object;

session_register($user);

then as long as your using the same browser session and you have

session_name("YOURSESSIONID");
session_start();

at the beginning of each page you can access $user.


If you open a new window you can do something like

abc.php?session_id=session_id()

abc.php

session_id($session_id);
session_name("YOURSESSIONID");
session_start()

and carry on using $user.


-Stewart





-----Original Message-----
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 10:02
To: php
Subject: [PHP] Post -vs- Get


I have written a system with authentication to gain access to individual
data.
Since I am using the post method the command line has something like

abc.com?client_no=5

Now even though if that person emails you that url, you won't gain
access to it bascause of authentication that is needed, what can happen
is an authorized user could change the 5 in the url to 8, and then see
the information that is there which belongs to client 8.

Because of this I am thinking in this case I should be using the post
method instead of the get method.

Does anyone have a link to a doc that has a good example in both methods
along with a good explanation so that I can make sure I understand what
it's doing?

Thanks for your help!

Jack


-- 
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]





> abc.com?client_no=5
> 
> Now even though if that person emails you that url, you won't gain
> access to it bascause of authentication that is needed, what can happen
> is an authorized user could change the 5 in the url to 8, and then see
> the information that is there which belongs to client 8.
> 
> Because of this I am thinking in this case I should be using the post
> method instead of the get method.

Even then a user could save the source code of your form, alter the POST
information, and send it back with the same effect.

You should probably look at having some kind of individualised 
authentication scheme rather than a blanket one, using sessions/cookies
perhaps.
POST alone is not the solution.

Mick





Since original poster requests where to look.
http://www.php.net/manual/en/language.variables.external.php
PHP manual is great reference for PHP programmers. If you haven't read, it is
recommended to read.

Another link in zend.com
http://www.zend.com/zend/tut/
There are many useful links in www.zend.com

You get more links here
http://www.php.net/links.php

--
Yasuo Ohgaki


"Jack Sasportas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have written a system with authentication to gain access to individual
> data.
> Since I am using the post method the command line has something like
>
> abc.com?client_no=5
>
> Now even though if that person emails you that url, you won't gain
> access to it bascause of authentication that is needed, what can happen
> is an authorized user could change the 5 in the url to 8, and then see
> the information that is there which belongs to client 8.
>
> Because of this I am thinking in this case I should be using the post
> method instead of the get method.
>
> Does anyone have a link to a doc that has a good example in both methods
> along with a good explanation so that I can make sure I understand what
> it's doing?
>
> Thanks for your help!
>
> Jack
>
>
> --
> 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]
>





I want to extract 2 sets of data each from different tables in the same db
but display the results on the same page at the same time. Can I just have
two sql statements like this or do I need to do something else.

   //sql statement 1
        $sql1 = "select club_full_name from clubs where club_name = '$id' ";

   //sql statement 2
        $sql2 = "select message,message_title from noticeboard where club_name =
'$id' ";

   //execute sql1 query and get results
      $sql_result1 = mysql_query($sql1);

   //execute sql2 query and get results
      $sql_result2 = mysql_query($sql2);

   /*results
      variables for data to be displayed*/

      while ($row = mysql_fetch_array($sql_result1)) {
                 $name = $row["club_full_name"];

            }


How can I put both sets of results in the while statement.

Any help would be kindly appreciated

Matt.





The simple answer would be 2 while statements, but are you trying to mix the results
or are you keeping them seperate?
By mix there are 2 options

value_db1 Value_db2 Value_db1

or

value_db1
value_db1
value_db2
value_db1

by the simple answer above it would result in something like
Category #1
value_db1
value_db1
value_db1
value_db1
value_db1
Category  #2
value_db2
value_db2
value_db2
value_db2
value_db2

or a side by side thing....

Also how many records (approx) are you dealing with ?
you could bring the value from each table into an array and then dump the values
stored in the array.


Hope this helps...

Jack


Matt Davis wrote:

> I want to extract 2 sets of data each from different tables in the same db
> but display the results on the same page at the same time. Can I just have
> two sql statements like this or do I need to do something else.
>
>    //sql statement 1
>         $sql1 = "select club_full_name from clubs where club_name = '$id' ";
>
>    //sql statement 2
>         $sql2 = "select message,message_title from noticeboard where club_name =
> '$id' ";
>
>    //execute sql1 query and get results
>       $sql_result1 = mysql_query($sql1);
>
>    //execute sql2 query and get results
>       $sql_result2 = mysql_query($sql2);
>
>    /*results
>       variables for data to be displayed*/
>
>       while ($row = mysql_fetch_array($sql_result1)) {
>                  $name = $row["club_full_name"];
>
>             }
>
> How can I put both sets of results in the while statement.
>
> Any help would be kindly appreciated
>
> Matt.
>
> --
> 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]









Matt,

> put two sets of data in the same while loop...

If there is some logical relationship between the sets of
records then consider adding a join:

$sql = "select club_full_name,message,messate_title "
         "  from clubs,noticeboard "
       "  where clubs.club_name = noticeboard.club_name and clubs.clubname =
'$id' ";

You can then iterate through this result:

$sth = mysql_query($sql);

$last = '';
while ($row = mysql_fetch_array($sql_result1)) {
  if ( $last != $row[club_full_name] ) {
    echo "<HR><B>$row["club_full_name"</B><BR>\n";
  }
  echo "$row[message_title]&nbsp;<I>$row[message]</I><BR>\n";
  $last = $row["club_full_name"];
}

Regards
Jeff
-----Original Message-----
From: Matt Davis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 10:23 AM
To: Php Mailing List
Subject: [PHP] can you have two sql statements on the same page.


I want to extract 2 sets of data each from different tables in the same db
but display the results on the same page at the same time. Can I just have
two sql statements like this or do I need to do something else.

   //sql statement 1
        $sql1 = "select club_full_name from clubs where club_name = '$id' ";

   //sql statement 2
        $sql2 = "select message,message_title from noticeboard where club_name =
'$id' ";

   //execute sql1 query and get results
      $sql_result1 = mysql_query($sql1);

   //execute sql2 query and get results
      $sql_result2 = mysql_query($sql2);

   /*results
      variables for data to be displayed*/

      while ($row = mysql_fetch_array($sql_result1)) {
                 $name = $row["club_full_name"];

            }


How can I put both sets of results in the while statement.

Any help would be kindly appreciated

Matt.


--
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]





What are the functions that can achieve that ?

----- Original Message -----
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Stewart Taylor"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 12:24 AM
Subject: RE: [PHP] Editing Variables from another script.


> Gotya. The why not limit your include file to only contain those values
that
> are important to you. So you get something like:
>
> varsdatabase.inc
>
> $dbhost="xxxxx";
> $dbuser="yyyyy";
> $dbpass="zzzzz";
>
> Then, in your PHP code you just rewrite this simple file. That way you
don't
> have to worry about parsing files etc... Just delete the existing
> varsdatabase.inc and build a new one from scratch. It's no longer
difficult
> because it's only 3 lines long.
>
>
>
>
> > > > $dbhost='localhost';
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 14:26
> To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> Basically, thats not what I'm going to do.
>
> I'm making an administrative script such that admins can change the
location
> and values of the $dbhost, $dbuser, $dbpass in the database.inc with just
a
> form.
>
> Kinda tough eh ?
>
> ----- Original Message -----
> From: "Neil Kimber" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 10:25 PM
> Subject: RE: [PHP] Editing Variables from another script.
>
>
> > It depends upon what your overall aim actually is.
> >
> > If you want a different value depending upon where this file is being
used
> > in your site, then you should probably just set the value accordingly in
> > that part of the site.
> > i.e.
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> >
> > If you want a different value in the same place based upon a different
> > 'user' or other criteria, then you should probably write some logic to
> > handle the situation.
> > i.e.
> >
> > include "database.inc";
> >
> > if (MYCRITERIA)
> > {
> > $dbhost='localhost';
> > }
> >
> > The only reason that I can think of for you wanting to change the
physical
> > file would be if you are writing some code to generate a release for
> > different users. In which case, you'll probably want to build a parser
and
> > use some kind of templating system.
> >
> > Neil
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 20 March 2001 14:08
> > To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > What other ways might there be ?
> >
> >
> > ----- Original Message -----
> > From: "Neil Kimber" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 20, 2001 6:10 PM
> > Subject: RE: [PHP] Editing Variables from another script.
> >
> >
> > > Do you mean that you want to alter the physical contents of
> > 'database.inc'?
> > > This would require you parsing the existing file yourself, writing a
new
> > > version of the file, altering the relevant line of code, removing the
> > > original file and renaming your new file to the original filename.
> > >
> > > This isn't a good approach, are you sure there isn't a different way
for
> > you
> > > acheive your aims?
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: 20 March 2001 10:02
> > > To: Stewart Taylor; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Editing Variables from another script.
> > >
> > >
> > > I think you didn't get what I meant,
> > >
> > > I need a script such that I can change the content of database.inc
from
> an
> > > external script (form or whatever)
> > >
> > >
> > > ----- Original Message -----
> > > From: "Stewart Taylor" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 20, 2001 5:57 PM
> > > Subject: RE: [PHP] Editing Variables from another script.
> > >
> > >
> > > >
> > > >
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> > > >
> > > >
> > > >
> > > > -Stewart
> > > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: 20 March 2001 09:26
> > > > To: Jason Stechschulte
> > > > Cc: 'PHP General List. (E-mail)'
> > > > Subject: Re: [PHP] Editing Variables from another script.
> > > >
> > > >
> > > > Okay, basically,
> > > >
> > > > I'm trying to create a script such that it will change the variables
> > > inside
> > > > of my .inc page.
> > > >
> > > > Something like
> > > >
> > > > lets say I have this file called "database.inc"
> > > > Inside it I have :
> > > >
> > > > $dbhost = 'blah'
> > > > $dbuser= 'blah'
> > > > $dbpass= 'blah'
> > > >
> > > > I would like to make a script such that I can modify the $variables
> into
> > > > something else like, $dbhost into localhost.
> > > >
> > > > How can it be done?
> > > > ----- Original Message -----
> > > > From: "Jason Stechschulte" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Cc: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
> > > > Sent: Monday, March 19, 2001 11:03 PM
> > > > Subject: Re: [PHP] Editing Variables from another script.
> > > >
> > > >
> > > > > On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
> > wrote:
> > > > >
> > > > > > I'm trying to create a form whereby I can edit the variables
with
> > just
> > > > the form.
> > > > > >
> > > > > > It will be something like a form for me to change the database
> > > > details(username,server,password) in a .inc I'm using.
> > > > > >
> > > > > > Is there anyway for me to pass information into another file's
> > > variable
> > > > and have it saved in there?
> > > > > >
> > > > > > If anyone have seen Newspro (CGI) before, when you edit some
parts
> > in
> > > a
> > > > form, the information will be saved. How can it be done in PHP?
> > > > >
> > > > > There is probably a hundred or more ways this can be done.  For me
> to
> > be
> > > > > able to give you specifics, you will have to be more specific with
> > what
> > > > > you are doing and what you have tried.
> > > > >
> > > > > --
> > > > > Jason Stechschulte
> > > > > [EMAIL PROTECTED]
> > > > > --
> > > > > Well, I think Perl should run faster than C.  :-)
> > > > >              -- Larry Wall in <[EMAIL PROTECTED]>
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP 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]
> >
> >
> >
>
>
>





Hi !

I'm trying to use the function mail().

<?php mail("[EMAIL PROTECTED]", "subject", "message"); ?>

I get :

Warning: Failed to Connect in D:\IBOIS\web\test.php on line 1

I'm using the lastest version of PHP on IIS 4.0

What's wrong ?

Should I  change the php.ini ?

If I try to use the snmp library i get lot of errors...

PLease help.me

mcfly







See the SMTP value in your PHP.ini and set it to a valid outgoing mail
server

Another thing I have noticed, perhaps this is only me, is that if the
TO-address isn´t valid it will fail.
Try to send an email to your own email address...

// Tobias


""Eric Tonicello"" <[EMAIL PROTECTED]> wrote in message
99a1hq$tns$[EMAIL PROTECTED]">news:99a1hq$tns$[EMAIL PROTECTED]...
> Hi !
>
> I'm trying to use the function mail().
>
> <?php mail("[EMAIL PROTECTED]", "subject", "message"); ?>
>
> I get :
>
> Warning: Failed to Connect in D:\IBOIS\web\test.php on line 1
>
> I'm using the lastest version of PHP on IIS 4.0
>
> What's wrong ?
>
> Should I  change the php.ini ?
>
> If I try to use the snmp library i get lot of errors...
>
> PLease help.me
>
> mcfly
>
>
>
>
> --
> 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]
>






(Sorry for the cross-post; I'd like to get this solved, as I haven't been
able to find a solution for several months.)

I have installed mhash and libmcrypt (and mcrypt, for that matter),
configured php with both of the extensions, and compiled PHP (as a DSO), and
apache gives the following error when I attempt to start it:

Cannot load /usr/local/apache/libexec/libphp4.so into server: libmhash.so.2:
cannot open shared object file: No such file or directory

Here are the details:

Webserver:
- apache-1.3.19 compiled with
  (- mm-1.1.3)
  - mod_ssl-2.8.1-1.3.19 (compiled as a static module)


PHP (DSO):
- php-4.0.4pl1 compiled with extensions:
  - libmcrypt-2.4.7
  - mhash-0.8.9

I installed mcrypt-2.2.6 as well, but I soon realized that the PHP
documentation said I should install libmcrypt, not mcrypt. Interestingly,
php never complained that libmcrypt was not installed during configure. I'm
not a *nix guru, and I don't understand completely how the dynamic linking
process works, but this seems wrong.

Any thoughts? I'm pretty desperate here. :-) Otherwise I'll have to start
using the openssl shell command.

Dean Hall.
Apt7.com Web Services







At first find where is libmhash.so.2. Then edit your ld.so.conf. Then run ldconfig. Filename and command name may vary, I can't tell since you didn't mention your OS. Alternatively, you can build into PHP if you have static lib. I prefer this way for non standard libs to make sure web server starts up even w/o shared libs. Regards, -- Yasuo Ohgaki ""Dean Hall"" <[EMAIL PROTECTED]> wrote in message 99a2gd$b2v$[EMAIL PROTECTED]">news:99a2gd$b2v$[EMAIL PROTECTED]... > (Sorry for the cross-post; I'd like to get this solved, as I haven't been > able to find a solution for several months.) > > I have installed mhash and libmcrypt (and mcrypt, for that matter), > configured php with both of the extensions, and compiled PHP (as a DSO), and > apache gives the following error when I attempt to start it: > > Cannot load /usr/local/apache/libexec/libphp4.so into server: libmhash.so.2: > cannot open shared object file: No such file or directory > > Here are the details: > > Webserver: > - apache-1.3.19 compiled with > (- mm-1.1.3) > - mod_ssl-2.8.1-1.3.19 (compiled as a static module) > > > PHP (DSO): > - php-4.0.4pl1 compiled with extensions: > - libmcrypt-2.4.7 > - mhash-0.8.9 > > I installed mcrypt-2.2.6 as well, but I soon realized that the PHP > documentation said I should install libmcrypt, not mcrypt. Interestingly, > php never complained that libmcrypt was not installed during configure. I'm > not a *nix guru, and I don't understand completely how the dynamic linking > process works, but this seems wrong. > > Any thoughts? I'm pretty desperate here. :-) Otherwise I'll have to start > using the openssl shell command. > > Dean Hall. > Apt7.com Web Services > > > > > -- > 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] >



""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> At first find where is libmhash.so.2. Then edit your ld.so.conf.
> Then run ldconfig.

I'm trying this, and I'll get back to you on whether it works.

> Filename and command name may vary, I can't tell since you didn't
> mention your OS.

RedHat Linux.

> Alternatively, you can build into PHP if you have static lib. I prefer
this
> way for non standard libs to make sure web server starts up even
> w/o shared libs.

Okay, do you mean if PHP is compiled as a static module? It's compiled as a
DSO on my box, so this is not an option. I have other modules installed
statically and dynamically, and I'd rather not recompile Apache every time a
new php comes out.

Thanks much for your help. I may need more. :-) I've tried modifying
ld.so.conf on a previous install, and it didn't help.

Dean.







""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> At first find where is libmhash.so.2. Then edit your ld.so.conf.
> Then run ldconfig.

Well, this seems to have worked. I don't know why it didn't work when I
tried doing it a few years ago -- and I really have no idea why /usr/lib and
/usr/local/lib were not already in ld.so.conf -- is this a RedHat thing? --
'cause those directories seem to be pretty standard for shared libraries.

Thanks for the help.
Dean.







""Dean Hall"" <[EMAIL PROTECTED]> wrote in message
99a9kk$hnp$[EMAIL PROTECTED]">news:99a9kk$hnp$[EMAIL PROTECTED]...
>
> ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
> 99a7rf$rer$[EMAIL PROTECTED]">news:99a7rf$rer$[EMAIL PROTECTED]...
> > At first find where is libmhash.so.2. Then edit your ld.so.conf.
> > Then run ldconfig.
>
> Well, this seems to have worked. I don't know why it didn't work when I
> tried doing it a few years ago

Oops, "months", not "years". :-)

Dean.






> We hired a developer about a year ago to develop a
> web based email system for us in php. The developer
> is no longer around, so I am having to pick up
> the development on the project...When clicking
> on the attachment link of an email in Internet
> Explorer 5.5 in Windows 98, I get the save as dialog
> and when I select ok, it tries to save the html
> page. If I right click and do save target as, it
> gets the correct file. This all works correctly in
> IE 5.0 and Netscape 4.76, and what's weird is that
> it even works as expected in IE 5.5 running on Win2k.
> Can anyone offer any suggestions? I'll be glad to send
> any code snipplets, or info if anyone can clue me in...
>
> Jack Davis
> Network Admin
> Bootheel Internet Services

I built this a few months ago to handle mail merges with a fixed defied
attachment and it seems to work for most email readers I have tried.  It is
supposed to handle text email clients and MIME clients as well as per the
RFC's (It was templated from an outgoing email attachment from Microsoft
Outlook so it will probably screw something up somewhere).

The site variable is a class variable from an included file that contains
all sorts of default stuff.
class SITE {
  var $mail_from = "[EMAIL PROTECTED]";
  var $mail_reply_to = "[EMAIL PROTECTED]";
} // END SITE CLASS

The get page function
  function get_page($page_name="") {
    $return="";
    if (file_exists($page_name))

      $fp = fopen("$page_name","r");
      $return .= fread($fp, filesize($page_name));
      fclose($fp);
    }
    return $return;
  }

The logger function is just a thing thats adds a record to a mysql table to
record the event for later use by my contact management/list procesing
system.

  function
mail_it($subject,$mail_message,$mail_to="[EMAIL PROTECTED]",$mail_
attachment="",$from="",$reply_to="") {
    global $site;
    if ($from) { $mail_from="From:$from"; } else
 $mail_from="From:".$site->mail_from; }
    if ($reply_to) { $mail_reply_to="Reply-To:$reply_to"; } else
 $mail_reply_to="Reply-To:".$site->mail_reply_to; }

    $rand=md5(rand());
    $boundary="----=_NextPart_000_$rand";
    $boundary2="----=_NextPart_001_$rand";
    $mail_headers = "$mail_from\n$mail_reply_to\n";
    $mail_headers .= "Content-Type: multipart/mixed;\n
boundary=\"$boundary\"";
    $mail_headers .= "\nX-Priority: 3 (Normal)\nX-Mailer: Walters And
Associates WCDS, Build 1.01\nImportance: Normal";
    $mail_body = "";
    $mail_body .= "  This message is in MIME format.  The first part
should";
    $mail_body .= "be readable text,\n  while the remaining parts are";
    $mail_body .= "likely unreadable without MIME-aware tools.\n  Send
mail";
    $mail_body .= "to [EMAIL PROTECTED] for more information.\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary;
    $mail_body .= "\n";
    $mail_body .= "Content-Type: multipart/alternative;\n
boundary=\"$boundary2\"\n";
    $mail_body .= "\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."\n";
    $mail_body .= "Content-Type: text/plain;\n
charset=\"iso-8859-1\"\n";
    $mail_body .= "Content-Transfer-Encoding: 7bit\n";
    $mail_body .= "\n";
    $mail_body .= strip_tags($mail_message)."\n";
    $mail_body .= "\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."\n";
    $mail_body .= "Content-Type: text/html;\n
charset=\"iso-8859-1\"\n";
    $mail_body .= "Content-Transfer-Encoding: quoted-printable\n";
    $mail_body .= "\n";
    $mail_body .= "$mail_message\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."--\n";
    $mail_body .= "\n";

    if ($mail_attachment<>"") {
      $content = get_page($mail_attachment);
      if ($content) {
        $mail_body .= "--".$boundary."\n";
        $mail_body .= "Content-Type: application/octet-stream\n";
        $mail_body .= "        name=\"".basename($mail_attachment)."\"\n";
        $mail_body .= "Content-Transfer-Encoding: base64\n";
        $mail_body .= "Content-Description: \"Mail Attachment\"\n";
        $mail_body .= "Content-Disposition: attachment;\n";
        $mail_body .= "
filename=\"".basename($mail_attachment)."\"\n";
        $mail_body .= "\n";
        $mail_body .= base64_encode($content)."\n\n";
      }
    }
    $mail_body .= "--".$boundary."--\n";

    if (mail($mail_to,"$subject",$mail_body,$mail_headers)) {
      logger(1,"Mail Success","$subject To $mail_to",$mail_message);
      return TRUE;
    } else {
      logger(9,"Mail Failure",$mail_to,$mail_body);
      return FALSE;
    }
  }


Hope this Helps.

Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989






> We hired a developer about a year ago to develop a
> web based email system for us in php. The developer
> is no longer around, so I am having to pick up
> the development on the project...When clicking
> on the attachment link of an email in Internet
> Explorer 5.5 in Windows 98, I get the save as dialog
> and when I select ok, it tries to save the html
> page. If I right click and do save target as, it
> gets the correct file. This all works correctly in
> IE 5.0 and Netscape 4.76, and what's weird is that
> it even works as expected in IE 5.5 running on Win2k.
> Can anyone offer any suggestions? I'll be glad to send
> any code snipplets, or info if anyone can clue me in...
>
> Jack Davis
> Network Admin
> Bootheel Internet Services

I built this a few months ago and it seems to work for most things I have
tried.  It is supposed to handle text email clients and MIME clients as
well.

The site variable is a class variable that contains all sorts of stuff.
  var $mail_from = "[EMAIL PROTECTED]";
  var $mail_reply_to = "[EMAIL PROTECTED]";


  function
mail_it($subject,$mail_message,$mail_to="[EMAIL PROTECTED]",$mail_
attachment="",$from="",$reply_to="") {
    global $site;
    if ($from) { $mail_from="From:$from"; } else
 $mail_from="From:".$site->mail_from; }
    if ($reply_to) { $mail_reply_to="Reply-To:$reply_to"; } else
 $mail_reply_to="Reply-To:".$site->mail_reply_to; }

    $rand=md5(rand());
    $boundary="----=_NextPart_000_$rand";
    $boundary2="----=_NextPart_001_$rand";
    $mail_headers = "$mail_from\n$mail_reply_to\n";
    $mail_headers .= "Content-Type: multipart/mixed;\n
boundary=\"$boundary\"";
    $mail_headers .= "\nX-Priority: 3 (Normal)\nX-Mailer: Walters And
Associates WCDS, Build 1.01\nImportance: Normal";
    $mail_body = "";
    $mail_body .= "  This message is in MIME format.  The first part
should";
    $mail_body .= "be readable text,\n  while the remaining parts are";
    $mail_body .= "likely unreadable without MIME-aware tools.\n  Send
mail";
    $mail_body .= "to [EMAIL PROTECTED] for more information.\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary;
    $mail_body .= "\n";
    $mail_body .= "Content-Type: multipart/alternative;\n
boundary=\"$boundary2\"\n";
    $mail_body .= "\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."\n";
    $mail_body .= "Content-Type: text/plain;\n
charset=\"iso-8859-1\"\n";
    $mail_body .= "Content-Transfer-Encoding: 7bit\n";
    $mail_body .= "\n";
    $mail_body .= strip_tags($mail_message)."\n";
    $mail_body .= "\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."\n";
    $mail_body .= "Content-Type: text/html;\n
charset=\"iso-8859-1\"\n";
    $mail_body .= "Content-Transfer-Encoding: quoted-printable\n";
    $mail_body .= "\n";
    $mail_body .= "$mail_message\n";
    $mail_body .= "\n";
    $mail_body .= "--".$boundary2."--\n";
    $mail_body .= "\n";

    if ($mail_attachment<>"") {
      $content = get_page($mail_attachment);
      if ($content) {
        $mail_body .= "--".$boundary."\n";
        $mail_body .= "Content-Type: application/octet-stream\n";
        $mail_body .= "        name=\"".basename($mail_attachment)."\"\n";
        $mail_body .= "Content-Transfer-Encoding: base64\n";
        $mail_body .= "Content-Description: \"Mail Attachment\"\n";
        $mail_body .= "Content-Disposition: attachment;\n";
        $mail_body .= "
filename=\"".basename($mail_attachment)."\"\n";
        $mail_body .= "\n";
        $mail_body .= base64_encode($content)."\n\n";
      }
    }
    $mail_body .= "--".$boundary."--\n";

    if (mail($mail_to,"$subject",$mail_body,$mail_headers)) {
      logger(1,"Mail Success","$subject To $mail_to",$mail_message);
      return TRUE;
    } else {
      logger(9,"Mail Failure",$mail_to,$mail_body);
      return FALSE;
    }
  }




Regards

Grant Walters
Brainbench 'Most Valuable Professional' for Unix Admin
Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989





Hi,

I have built a shopping cart and have made connection to an Internet 
payment company.  Now once transaction is processed they want from my 
confirmation page to receive an "[OK]".  How can I do this with php3/4?

Response.Write"[OK]" is what ASP uses, I think???


Thanks

Ajdin 




You could investigate www.php.net/echo, I think it's what you're after.

Cheers
Jon


-----Original Message-----
From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 12:05
To: [EMAIL PROTECTED]
Subject: [PHP] Response.Write [OK]


Hi,

I have built a shopping cart and have made connection to an Internet 
payment company.  Now once transaction is processed they want from my 
confirmation page to receive an "[OK]".  How can I do this with php3/4?

Response.Write"[OK]" is what ASP uses, I think???


Thanks

Ajdin 


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************




You think I need to do something like

echo'Response.Write[OK]';

This will print Response.Write [OK] on he screen or????

Ajdin


On Wed, 21 Mar 2001, Jon Haworth wrote:

> You could investigate www.php.net/echo, I think it's what you're after.
> 
> Cheers
> Jon
> 
> 
> -----Original Message-----
> From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> Sent: 21 March 2001 12:05
> To: [EMAIL PROTECTED]
> Subject: [PHP] Response.Write [OK]
> 
> 
> Hi,
> 
> I have built a shopping cart and have made connection to an Internet 
> payment company.  Now once transaction is processed they want from my 
> confirmation page to receive an "[OK]".  How can I do this with php3/4?
> 
> Response.Write"[OK]" is what ASP uses, I think???
> 
> 
> Thanks
> 
> Ajdin 
> 
> 
> **********************************************************************
> 'The information included in this Email is of a confidential nature and is 
> intended only for the addressee. If you are not the intended addressee, 
> any disclosure, copying or distribution by you is prohibited and may be 
> unlawful. Disclosure to any party other than the addressee, whether 
> inadvertent or otherwise is not intended to waive privilege or confidentiality'
> 
> **********************************************************************
> 
> -- 
> 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]
> 
> 




no.

Imagine Response.write as echo.

so it will be

echo "OK";

PHP doesn't parse ASP tags

----- Original Message -----
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: "Jon Haworth" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 8:24 PM
Subject: RE: [PHP] Response.Write [OK]


> You think I need to do something like
>
> echo'Response.Write[OK]';
>
> This will print Response.Write [OK] on he screen or????
>
> Ajdin
>
>
> On Wed, 21 Mar 2001, Jon Haworth wrote:
>
> > You could investigate www.php.net/echo, I think it's what you're after.
> >
> > Cheers
> > Jon
> >
> >
> > -----Original Message-----
> > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > Sent: 21 March 2001 12:05
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Response.Write [OK]
> >
> >
> > Hi,
> >
> > I have built a shopping cart and have made connection to an Internet
> > payment company.  Now once transaction is processed they want from my
> > confirmation page to receive an "[OK]".  How can I do this with php3/4?
> >
> > Response.Write"[OK]" is what ASP uses, I think???
> >
> >
> > Thanks
> >
> > Ajdin
> >
> >
> > **********************************************************************
> > 'The information included in this Email is of a confidential nature and
is
> > intended only for the addressee. If you are not the intended addressee,
> > any disclosure, copying or distribution by you is prohibited and may be
> > unlawful. Disclosure to any party other than the addressee, whether
> > inadvertent or otherwise is not intended to waive privilege or
confidentiality'
> >
> > **********************************************************************
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






> 
> I have built a shopping cart and have made connection to an Internet 
> payment company.  Now once transaction is processed they want from my 
> confirmation page to receive an "[OK]".  How can I do this with php3/4?
> 
> Response.Write"[OK]" is what ASP uses, I think???

try 

echo "<script>alert('OK')</script>";

I think this is the same thing

M@




OK

I have done this.  

Thanks guys

Ajdin

On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:

> no.
> 
> Imagine Response.write as echo.
> 
> so it will be
> 
> echo "OK";
> 
> PHP doesn't parse ASP tags
> 
> ----- Original Message -----
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: "Jon Haworth" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 21, 2001 8:24 PM
> Subject: RE: [PHP] Response.Write [OK]
> 
> 
> > You think I need to do something like
> >
> > echo'Response.Write[OK]';
> >
> > This will print Response.Write [OK] on he screen or????
> >
> > Ajdin
> >
> >
> > On Wed, 21 Mar 2001, Jon Haworth wrote:
> >
> > > You could investigate www.php.net/echo, I think it's what you're after.
> > >
> > > Cheers
> > > Jon
> > >
> > >
> > > -----Original Message-----
> > > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > > Sent: 21 March 2001 12:05
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Response.Write [OK]
> > >
> > >
> > > Hi,
> > >
> > > I have built a shopping cart and have made connection to an Internet
> > > payment company.  Now once transaction is processed they want from my
> > > confirmation page to receive an "[OK]".  How can I do this with php3/4?
> > >
> > > Response.Write"[OK]" is what ASP uses, I think???
> > >
> > >
> > > Thanks
> > >
> > > Ajdin
> > >
> > >
> > > **********************************************************************
> > > 'The information included in this Email is of a confidential nature and
> is
> > > intended only for the addressee. If you are not the intended addressee,
> > > any disclosure, copying or distribution by you is prohibited and may be
> > > unlawful. Disclosure to any party other than the addressee, whether
> > > inadvertent or otherwise is not intended to waive privilege or
> confidentiality'
> > >
> > > **********************************************************************
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP 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]
> 
> 




Hi there, I need some help here.

I have uploaded all the files necessary into my server. grab it at 
www.frozened.com/zeus/lostpassword.zip

This is a lostpassword script whereby when the user inputs his email address, the 
script will check if his email is a valid email ( [EMAIL PROTECTED] ) after which it will 
use the database to search for the email and if there his email is in the db, it will 
send him a mail telling him so.

In this script I haven't add the mail() but replaced it with a echo() so that I know 
that the form has been processed.

When I run the script and input a 'non-valid' email address ( no @ sign ), the 
errormsg will appear as normal but when I type a valid email or a email that is in the 
database, the form will just clear it self and reappear.

Mind if someone help me debug (I'm new to PHP).

Thanks :)

------------------------
Zeus
------------------------





Hi,

I am going to use sessions to authenticate and protect my pages, this is what 
I have so far...

User logs in via form, this is checked via a SQL call, if the correct 
username and password are entered I run the following:

session_start();
    session_register("UserName","Password");
    header ("Location: Http://www.domain.com/members/index.php");

The bit where I get lost is 1) how to authenticate this on each page and 2) 
How to close the session after the browser has closed. I have tried many 
tutorials etc but none seem to go into great detail in those areas. Anyone 
know of any decent tutorials or any snippets I can learn from.

Thanks




[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote:
> Hi,
> 
> I am going to use sessions to authenticate and protect my pages, this is what 
> I have so far...
> 
> User logs in via form, this is checked via a SQL call, if the correct 
> username and password are entered I run the following:
> 
> session_start();
>     session_register("UserName","Password");

You have to register each "field" like this:

      session_register("UserName");   // register UserName as a session var
      $UserName = $new_value_for_username; // give UserName session var a
                                              new value.
      session_register("Password");   // register Password as a session var
      $Password = $new_value_of_password; // give Password session var a
                                             new value.

Then in the next script, after you do session_start();, you
will have access to those previously registered session
variables by just using $UserName and $Password.

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

>     header ("Location: Http://www.domain.com/members/index.php");
> 
> The bit where I get lost is 1) how to authenticate this on each page and 2) 
> How to close the session after the browser has closed. I have tried many 
> tutorials etc but none seem to go into great detail in those areas. Anyone 
> know of any decent tutorials or any snippets I can learn from.
> 
> Thanks
> 
> -- 
> 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]




Apologies for the long post.

I use this approach: (simplified) at the top of every page,
before any HTML. Pop it into an include right at the top.
I have not included all the util function e.g. LogQuietAlert()


regards
Jeff

<?php
#===========================================================================
====
# Initialise session array
session_start();
if (!isset($sesh)) {
  session_register('sesh');
  $sesh = array();
}

# If they are not logged in - send them to the /login page
if ( !$sesh[_loggedin]  and !isUtilityPage()) {
  $sesh[_target] = TopPage($PHP_SELF); # Remember where they were going
  gotoPage("/login");
}

# This is updated by the login function if a login fails
# Print it on your page somewhere to let the user know
# that their login failed
$message = '';

# I leave the action on my FORMs empty, so the user
# will return to the same page when they press SUBMIT
# $act is the name of the submit button/link etc
if ( $act == 'login' ) {
  if ( !$UserName || !$Password ) {
    $message = "Missing Username or Password [From: $REMOTE_ADDR]";
  } elseif ( login( $UserName, $Password ) ) {
    srand((double) microtime() * 1000000);
    $randval = rand();
    setcookie( 'cookUserName', $UserName, time()+(180*86400),'','', 1);
    # Note that this is a session cookie, not persistant
    setcookie( 'cookSPID', $randval, 0, '','', 1);
    $sesh[_cookSPID]  = $randval;
    $sesh[_sslSESH]   = $SSL_SESSION_ID;
    gotoPage($sesh[_target]);
  } else {
    $message = "Invalid Username/Password [From: $REMOTE_ADDR]";
  }
}

if (!isUtilityPage()) {
  # Check that the user is not attempting to spoof the session
  if ( $sesh[_cookSPID] != $cookSPID) {
    LogQuietAlert("$PHP_SELF $sesh[_email] at $sesh[_client_id] "
      . "has a cookSPID mismatch: Attempt to spoof session?<BR>");
    gotoPage("/login");
  }
}

#===========================================================================
====
function login( $UserName, $Password ) {
  # Checks username/password
  global $sesh, $message, $REMOTE_ADDR;

  $sesh[_user]        = $UserName;
  $sesh[_loggedin]    = 0;
  $sesh[_user_id]     = '';
  $sesh[_role]        = '';
  $sesh[_name]        = '';
  $sesh[_client_id]   = '';

  if ( !$UserName or !$Password ) {
    return 0;
  }

  $UserName = strtolower( $UserName );
  $sth = runSQL('get_user_login',array(
            where =>   "user='$UserName' and
password=PASSWORD('MySalt$Password')"
          ));

  $rows = mysql_num_rows( $sth );
  if (!$rows) {
    # Invalid UserName/Password - log a quiet alert
    LogAlert("Login failure: $UserName from $REMOTE_ADDR tried
'$Password'<BR>");
    $message = "Invalid username/password [from $REMOTE_ADDR]";
    return 0;
  }
  $rec = mysql_fetch_array( $sth, MYSQL_ASSOC );

  $sesh[_loggedin]    = 1;
  $sesh[_user_id]     = $rec[user_id];
  $sesh[_email]       = $rec[email];
  $sesh[_role]        = $rec[role];
  $sesh[_name]        = $rec[name];
  $sesh[_client_id]   = $rec[client_id];

  return 1;
}

#===========================================================================
====
function gotoPage( $page = "/index" ) {
   header("Location: $page");
   exit; # Old browsers get no further!
}
#===========================================================================
====
function isUtilityPage() {
  global $PHP_SELF;
  # returns true if this is a utility page
  # ie index, login, unavailable or error
  if ( stristr($PHP_SELF, 'login'))       return 1;
  if ( stristr($PHP_SELF, 'index'))       return 1;
  if ( stristr($PHP_SELF, 'unavail'))     return 1;
  if ( stristr($PHP_SELF, 'error'))       return 1;
  if ( stristr($PHP_SELF, 'disclaimer'))  return 1;
  return 0;
}
#===========================================================================
====
?>





I want to restrict the height and width of a file a user will upload to the
how do I do this, is there a function for this.

TIA

--
george
[EMAIL PROTECTED]
remove my_pants to reply

P@tty's excellent DW tutorial site
http://www.thepattysite.com/dreamweaver/
 Jhinuk Chowdhury 's DW FAQ
http://people.unt.edu/~jhinuk/DW_FAQ.htm









Try using array variable names in HTML:

$rs is a statement from a select sql. This code snippet puts the values of
the columns returned in an array $field.

if (OCIFetch($rs)) {
        for ($i = 0; $i <= $NFields; $i++) {
                $field[$i] = OCIResult($rs, $i+1);
        }
}

Somewhere further on the following code gets executed:
echo "<table>";
for ($i = 0; $i <= $NFields; $i++) {
        echo "<tr><td>";
        echo "<INPUT TYPE='text' NAME='f[".$i."]' SIZE='".$FieldLen[$i]."'
MAXLENGTH='".$FieldLen[$i]."' value='".$field[$i]."'>";
        echo "</tr></td>";
}

You could use a <INPUT TYPE="hidden"> in the above code as well, just to
pass the values. When the form is posted the values in f gets sent back as
an array. This code comes comes from a script I wrote that updates a
database like you want to do.

Rudolf Visagie
[EMAIL PROTECTED]

-----Original Message-----
From: Mick Lloyd [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 10:20
To: Mark Collin
Cc: Database Help PHP
Subject: Re: [PHP-DB] Transmitting Arrays


Mark

I've had similar problems in the past. It's my understanding that you can't
pass arrays between scripts, except when using sessions. They seem to
transfer in, for example:

include("script.php");
require("script.php");

but not in:

 <a href='script.php?var=$var'>Pass</a>

but I would love to be corrected on this by a PHP expert!

Regards

Mick Lloyd
[EMAIL PROTECTED]
Tel: +44 (0)1684 560224
----- Original Message -----
From: Mark Collin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 9:44 PM
Subject: [PHP-DB] Transmitting Arrays


> I have a form which dynamically builds a table by taking data out of a
mysql
> database
>
> http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1
>
> but i'm having problems whn i try to modify the data i'm trying to put all
> the data into arrays serialize it, urlencode it then send it on to the
next
> page to put it into database and then send back to the original page when
> its done, i'm having a problem actually sendig my arrays around though,
the
> second page doesn't seem to get any data after i have unserialized it and
> urlunecoded it.
>
> anyone have any ideas, i've been fiddleing about a load with the code and
> there is a good chance i have totally messed it up now heres the state its
> in atm though if you would like to look
>
> http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt
> http://www.fyrespray.net/screenshots/admin/modify.txt
>
> (prolly need to save the first page if your browser is picking up the html
> bits and making half of a web page up like mine does)
>
>
> --
> PHP Database 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]
>





Why you are using IP address? (No DNS MX record for the host??)
Anyway, SMTP server can work w/ IP address, but many programs tries to look up
DNS MX records for SMTP server. I guess PHP trying to get MX records for the IP.
I didn't look into code, I can easily be wrong.
(SMTP server should have MX record(s), if it is configured properly.)

Try to use name (i.e. mail.example.com) instead.

Regards,

--
Yasuo Ohgaki


"Todd Cary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am getting a "Failed to connect" error when I try to send an email.
> In the php.ini, I have the IP of the ISP's mail server e.g.
>
> SMTP = 209.204.199.1
>
> This IP works for other programs I use and for test programs I have
> created with Delphi.
>
> Any suggestions??
>
> Many thanks..........
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I have an Oracle client on a webserver talking to an Oracle
server through Oracle networking and the PHP OCI8 interface.
When an error occurs on the server, the 'message' that
OCIError receives on the client is

Error while trying to retrieve text for error ORA-03113

This seems to happen with the Oracle "Programmers" client
install.  There was only one client install that had more stuff
than "Programmer" and I think that was "Administrator".

Why am I not getting proper Oracle error 'message's on the
client when the Oracle server has an error?  Is this normal,
or did I do something wrong?

TIA.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com




I've recently installed PHP4.0.4 and PHP4.0.5-RC1 for IIS5 (CGI and ISAPI)
CGI version works ok so far. However, ISAPI version is very unstable. I haven't
use it much, but it is not ready for production use for sure.

--
Yasuo Ohgaki


""Carsten Gehling"" <[EMAIL PROTECTED]> wrote in message
01a001c0b151$bd309940$[EMAIL PROTECTED]">news:01a001c0b151$bd309940$[EMAIL PROTECTED]...
> What is the status on the ISAPI version of PHP?
>
> Last I looked (4.0.1) it was still rather unstable.
>
> - Carsten
>





I am looking for help with session handling.
I have modified Joe Jarosciak`s password script slightly, so that instead of
logging in to d/l files, you login to one or two secure area`s. (depending
on the access level of password used)

How and where can i modify this more, so that a session will be created, and
the logged-in users data will be passed over to the two secure area`s??

e.g. pass the login information to the two secure area pages, so they can
evaluate if the user is allowed to view them or not!



Heres the sript so far:

<------------------- index.php------------------->

<html>
<head>
</head>
<body bgcolor="#FFFFFF">
<table border="1" width="100%" bgcolor="#000000" bordercolor="#000000"
cellspacing="0">
  <tr>
    <td width="100%">
      <p align="center"><b><font size="4" color="#FFFFFF">Authorized Access
Only</font></b></td>
<form method="POST" action="secure.php">
  <center>
  </tr>
</table>
<address align="center">&nbsp;</address>
<address align="center">&nbsp;</address>
  <address align="center"><b>Name:</b></address>
  <address align="center">&nbsp;<input type="text" name="PHP_AUTH_USER"
size="20" value=""></address>
  <address align="center">&nbsp;</address>
  <address align="center"><b>Password:</b></address>
  <address align="center"><input type="password" name="PHP_AUTH_PW"
size="20" value=""></address>
  <p align="center"><input type="submit" value="Login" name="B1"> <input
type="reset" value="Reset"> </p>
</form>
</body>
</html>

<--------------------end index.php------------------->






<---------------------secure.php--------------------->

<?php

$auth = false;

if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {

    $filename = ("D:\Inetpub\wwwroot\password\vault\passwords.txt");
    $fp = fopen( $filename, 'r' );
    $file_contents = fread( $fp, filesize( $filename ) );
    fclose( $fp );

    $lines = explode ( "\n", $file_contents );

    foreach ( $lines as $line ) {

        list($username,$password,$tc,$fc) = explode(':', $line );
 //      echo '<br>';
 //        echo $username;
 //        echo '   :   ';
 //        echo $password;
 //        echo '<br>';


       if (( $username == "$PHP_AUTH_USER" ) && ( $password ==
"$PHP_AUTH_PW" )) {
            $auth = true;
            break;
        }
    }
}


// ==================Header + IP Checking======================
$updated_from=getenv("REMOTE_ADDR");
print ('
<div align="center">
  <center><table border="1" cellpadding="0" cellspacing="0" width="667"
bgcolor="#000000" bordercolor="#000000"><tr>
<td width="100%">
  <p align="center"><font color="#FFFFFF" size="0"> Connected from (IP): ');

print '<font color="#FFFF00">';
print $updated_from;

print '</font></font><font color="#FFFF00" size="0">&nbsp;</font><font
color="#FFFFFF"><font size="0">&nbsp;|
    <font size="1"> Your username -  </font>';
print '<font color="#FFFF00">';
print $PHP_AUTH_USER;
print '</font></font></font><font color="#0000FF"
size="0">&nbsp;</font><font color="#FFFF00" size="0">
  </font></p></td></tr></table></center><br></div>';
// ==================end - Header + IP Checking======================







// ==================on support or not=======================
if (! $auth)
 {
    echo '<br> You used username: ';
    echo $PHP_AUTH_USER;
    echo '<br> You used password: ';
    echo $PHP_AUTH_PW;
    echo '<br>';
    echo '<br><center>';
    echo '<br>';
    echo '<p><font color="#000000"><b>Sorry, but this is wrong.
Authorization with right username and password is Required!</b></font></p>';
    exit;
  }


if (($auth) and ($tc == '1'))
 {
   print '<b><font color="#000000" size="1">- You are authorized for access
area 1.</font></b><br>' ;
 }


if (($auth) and ($fc == '1'))
 {
   print '<b><font color="#000000" size="1">- You are authorized for access
area 2.</font></b><br>' ;
 }


if (($auth) and ($tc == '0'))
 {
   print '<b><font color="#FF0000" size="1">- You are not authorized for
access area 1.</font></b><br>' ;
 }


if (($auth) and ($fc == '0'))
 {
   print '<b><font color="#FF0000" size="1">- You are not authorized for
access area 2.</font></b><br>' ;
 }
// ==================end -- on support or not=======================





// ==================buttons=======================

if (($auth) and ($tc == '1'))
 {
   print '<a href="access_area1.htm"><font face="Arial, Helvetica,
sans-serif"><b><font size="4" color="#FFFFFF">Area 1</font></b></font>
</a><br>';
 }

if (($auth) and ($fc == '1'))
 {
   print '<a href="access_area2.htm"><font face="Arial, Helvetica,
sans-serif"><b><font size="4" color="#FFFFFF">Area 2</font></b></font>
</a>';
 }
// ==================end buttons=======================



if ($auth)
 {
    echo '<b><center><font size="1">Thank you. You were authorized with
right username and password!</font></b>';
 }

?>

<-------------------end secure.php--------------------->







<-----------------access_area1.htm--------------------->


<html>
<head>
<title>Access Area 1</title>
</head>

<body bgcolor="#FF6600" text="#000000">
<div align="center">
  <table width="40%" border="1" cellspacing="0" cellpadding="0"
bgcolor="#FF0000" bordercolor="#000000">
    <tr>
      <td>
        <div align="center"><b><font face="Arial, Helvetica, sans-serif"
size="6">Secure
          Area 1</font></b></div>
      </td>
    </tr>
  </table>
</div>
</body>
</html>


<----------------end access_area1.htm------------------>


<html>
<head>
<title>Access Area 2</title>
</head>

<body bgcolor="#FF0000" text="#000000">
<div align="center">
  <table width="40%" border="1" cellspacing="0" cellpadding="0"
bgcolor="#FF6600" bordercolor="#000000">
    <tr>
      <td>
        <div align="center"><b><font face="Arial, Helvetica, sans-serif"
size="6">Secure
          Area 2</font></b></div>
      </td>
    </tr>
  </table>
</div>
</body>
</html>



<----------------end access_area2.htm------------------>




<----------------passwords.txt------------------------->

joe:19741:1:0:
tony:928gt:1:1:
murray:fsSS92:1:1:
greg:2NNg8ed:1:1:
mitch:dopro:0:0:
nick:cmuk:1:0:
guest:RxegXHNEV9GpM:1:1:
tom:JJft54Dcv:0:1:

<----------------end of passwords.txt------------------>



Thankyou very much for any help!

[EMAIL PROTECTED]








PHP >start here
Internet resources and book reviews for those just starting out
with PHP and MySQL
http://www.webdesigns1.com/php/
Jeff Oien




I just spotted this, so apologies if it's already been answered.

PHP will try to treat first in $arr[first] as a constant. if it doesn't find
a constant with this name it will treat it as a string. There may be an
error reporting level which throws this up as an error. $arr['first'] is
therefore lees ambiguous and so safer (and may even be a nano second
faster).

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 08:17
> To: [EMAIL PROTECTED]
> Subject: [Q] Parser behavior in a string
> 
> 
> I noticed that PHP4 accepts and does not raise error (notice 
> messages) for
> following code.
> 
> $arr = array('first' => 'one');
> $str = "This is first element of array: $arr[first]";
> 
> Question: Is this expected behavior that PHP parse w/o errors?
> 
> If this is not a expected behavior and subject to change, I'm 
> not going to use
> array w/o ' or " for assoc arrays. Because I log all error 
> messages for
> production system including notice messages.
> 
> Thank you.
> 
> [Note for those who are not familiar with use of {} in PHP]
> {} can be used to resolve ambiguity not only for arrays, but 
> also for variables
> in strings.
> 
> $str = "This is first element of array: {$arr['first']}"; // 
> works as it should.
> $str = "This is first element of array: $arr['first']"; // 
> parse error.
> 
> You can use {} for multi-dimensional array and nested objects 
> properties in
> strings also.
> i.e. "Text {$obj->foo->var} Text" works like 'Text '. 
> $obj->foo->var .' Text'.
> 
> --
> Yasuo Ohgaki
> 
> 
> 
> 




I just spotted this, so apologies if it's already been answered.

PHP will try to treat first in $arr[first] as a constant. if it doesn't find
a constant with this name it will treat it as a string. There may be an
error reporting level which throws this up as an error. $arr['first'] is
therefore lees ambiguous and so safer (and may even be a nano second
faster).

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 08:17
> To: [EMAIL PROTECTED]
> Subject: [Q] Parser behavior in a string
> 
> 
> I noticed that PHP4 accepts and does not raise error (notice 
> messages) for
> following code.
> 
> $arr = array('first' => 'one');
> $str = "This is first element of array: $arr[first]";
> 
> Question: Is this expected behavior that PHP parse w/o errors?
> 
> If this is not a expected behavior and subject to change, I'm 
> not going to use
> array w/o ' or " for assoc arrays. Because I log all error 
> messages for
> production system including notice messages.
> 
> Thank you.
> 
> [Note for those who are not familiar with use of {} in PHP]
> {} can be used to resolve ambiguity not only for arrays, but 
> also for variables
> in strings.
> 
> $str = "This is first element of array: {$arr['first']}"; // 
> works as it should.
> $str = "This is first element of array: $arr['first']"; // 
> parse error.
> 
> You can use {} for multi-dimensional array and nested objects 
> properties in
> strings also.
> i.e. "Text {$obj->foo->var} Text" works like 'Text '. 
> $obj->foo->var .' Text'.
> 
> --
> Yasuo Ohgaki
> 
> 
> 
> 




Hi,

Habe folgendes Problem:

Suse 7.1
Standardmässig ist Apache mit PHP installiert.
Das läuft auch alles solange ich nicht versuche eine DB anzubinden bzw. 
abzufragen.

Ich bekomme dann immer folgende Meldung:

Warning: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3 on 
line 5

Leider konnte ich in den Archiven und Manuals nichts finden.
Und der Verweis in meiner php3.ini im verzeichnis /etc/httpd/
zu mysql.sock ist auch richtig gesetzt.

Kann mir da jemand weiterhelfen?

Besten Dank im voraus.
Denis




Hi Remco,

That's not the Problem.
But I don't have the mysql.sock in this directory.

Regards
Denis


On Wednesday 21 March 2001 16:36, you wrote:
> denis mettler <[EMAIL PROTECTED]> writes:
> > Hi,
> >
> > Habe folgendes Problem:
>
> <snip>
>
> > Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (13) in /usr/local/httpd/htdocs/dbopen.php3
> > on line 5
>
> As root, do a chmod +x /var/lib/mysql/
>
> That might do the trick, as the mysql directory is not always readable
> for the 'nobody' user where your HTTPd runs under.
>
> regards,
> Remco




denis mettler wrote:

> But I don't have the mysql.sock in this directory.

Is mysqld running at all?

+----------------------------------------+
| Julie Meloni ([EMAIL PROTECTED])     |
|                                        |
| "PHP Essentials" and "PHP Fast & Easy" |
|       http://www.thickbook.com         |
+----------------------------------------+



Reply via email to