OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Wed Mar 21 2001 - 09:58:26 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    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:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

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

    attached mail follows:


    That goes in the PHP code no?

    -----Original Message-----
    From: Tyrone Mills [mailto:t_millstelus.net]
    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:mattplanetveggie.com]
    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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


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

    -----Original Message----- From: Matt Stone [mailto:mattplanetveggie.com] 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:t_millstelus.net] 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:mattplanetveggie.com] 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


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

    -----Original Message----- From: Tyrone Mills [mailto:t_millstelus.net] 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:mattplanetveggie.com] 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:t_millstelus.net] 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:mattplanetveggie.com] 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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

    attached mail follows:


    Try,

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

    -Stewart

    -----Original Message----- From: Dennis Moore [mailto:dennisdkmoore.com] Sent: 21 March 2001 04:14 To: php-generallists.php.net 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    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
    

    attached mail follows:


    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
    

    attached mail follows:


    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
    

    attached mail follows:


    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                                         dreadtexas.net
    -- If you are going to sin, sin against God, not the bureaucracy. 
                      God will forgive you but the bureaucrats won't. 
    

    attached mail follows:


    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
    

    attached mail follows:


    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
    

    attached mail follows:


    > 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
    jasonmmelbourneit.com.au
    Web Design Team, Melbourne IT
    Fetch the comfy chair!
    

    attached mail follows:


    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 dkirkebyfrontlinelearning.com 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.

    attached mail follows:


    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 peterhsunrentals.com.au ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************

    attached mail follows:


    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"" <peterhvfsa.com.au> wrote in message news:NFBBJNAGDIPHLCGPBLKDCEBPCBAA.peterhsunrentals.com.au... > 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 > peterhsunrentals.com.au > ========================================================= > _____ __ /\ > /_/_/_\ / |_/ \ > /_/_/_ __ __ __ __ / \ > \_/_/_\ /_/ /_/ /_/ /_/ \ _ / > ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ > \_//_/_/ /_/_/_/ /_/ \/_/ 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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>

    attached mail follows:


    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 - joshgfunk007.com http://www.gfunk007.com/ ----------------------------------------------------------------------------

    ----- Original Message ----- From: "Ed Lazor" <osmosisatfantasy.com> To: <php-generallists.php.net> 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    On Tue, 20 Mar 2001 21:27:14 -0800, Ed Lazor (osmosisatfantasy.com) 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: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list- >adminlists.php.net

    attached mail follows:


    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 : abraxastechyahoo.com Tel : 91-4546512/4522124 *******************************************

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

    attached mail follows:


    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 <jeff.armstrongpirum.com> 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:thomasedisonjryahoo.com] > Sent: Tuesday, March 20, 2001 5:08 PM > To: Jeff Armstrong > Cc: php-generallists.php.net > 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 <jeff.armstrongpirum.com> 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:thomasedisonjryahoo.com] > > Sent: Tuesday, March 20, 2001 11:50 AM > > To: Peter Chr. Hansen > > Cc: php-generallists.php.net > > 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" <PCHschilling.dk> wrote: > > > Can't you use " > > > Newdate between date1 and date2 > > > > > > > > > -----Oprindelig meddelelse----- > > > Fra: Thomas Edison Jr. > > > [mailto:thomasedisonjryahoo.com] > > > Sendt: 20. marts 2001 12:25 > > > Til: php-generallists.php.net > > > 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 : abraxastechyahoo.com > > > Tel : 91-4546512/4522124 > > > ******************************************* > > > > > > > __________________________________________________ > === message truncated ===

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

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

    attached mail follows:


    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 <jeff.armstrongpirum.com> 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:thomasedisonjryahoo.com] > Sent: Tuesday, March 20, 2001 5:08 PM > To: Jeff Armstrong > Cc: php-generallists.php.net > 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 <jeff.armstrongpirum.com> 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:thomasedisonjryahoo.com] > > Sent: Tuesday, March 20, 2001 11:50 AM > > To: Peter Chr. Hansen > > Cc: php-generallists.php.net > > 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" <PCHschilling.dk> wrote: > > > Can't you use " > > > Newdate between date1 and date2 > > > > > > > > > -----Oprindelig meddelelse----- > > > Fra: Thomas Edison Jr. > > > [mailto:thomasedisonjryahoo.com] > > > Sendt: 20. marts 2001 12:25 > > > Til: php-generallists.php.net > > > 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 : abraxastechyahoo.com > > > Tel : 91-4546512/4522124 > > > ******************************************* > > > > > > > __________________________________________________ > === message truncated ===

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

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

    attached mail follows:


    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

    attached mail follows:


    > Why wouldn't this redirect?

    Because you need to do this:

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

    Jason

    attached mail follows:


    On Tue, Mar 20, 2001 at 10:05:06PM -0800, deanaaddesign.com 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
    jpstechunoh.edu
    --
    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 <199709242015.NAA10312wall.org>
    

    attached mail follows:


    "Jason Stechschulte" <jpstechunoh.edu> wrote in message news:20010321085311.A2581unwosrv3.unoh.edu... > On Tue, Mar 20, 2001 at 10:05:06PM -0800, deanaaddesign.com 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
    

    attached mail follows:


    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 : abraxastechyahoo.com Tel : 91-4546512/4522124 *******************************************

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

    attached mail follows:


    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.

    attached mail follows:


    You mean something like this:

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

    > -----Original Message----- > From: Jimmy Bäckström [mailto:broder_bchello.se] > 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 >

    attached mail follows:


    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

    attached mail follows:


    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/

    attached mail follows:


    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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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
    

    attached mail follows:


    Addressed to: Jen Hall <jhallconovertuttle.com> php-generallists.php.net

    ** Reply to note from Jen Hall <jhallconovertuttle.com> 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

    attached mail follows:


    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 .

    php3developersdesk.com wrote:

    > Addressed to: Jen Hall <jhallconovertuttle.com> > php-generallists.php.net > > ** Reply to note from Jen Hall <jhallconovertuttle.com> 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

    attached mail follows:


    > php3developersdesk.com wrote: > > > Addressed to: Jen Hall <jhallconovertuttle.com> > > php-generallists.php.net > > > > ** Reply to note from Jen Hall <jhallconovertuttle.com> 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

    attached mail follows:


    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

    attached mail follows:


    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
    

    attached mail follows:


    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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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"" <pauledsamail.com.ph> wrote in message news:ee31c9ab21f0073b6459167fe52c5c41news.php.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello

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

    attached mail follows:


    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" <calinitcnet.ro> wrote in message news:01032109363500.01148zion.itcnet.ro... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Addressed to: "Henkie" <deckard_007nospamdeja.com> php-generallists.php.net

    ** Reply to note from "Henkie" <deckard_007nospamdeja.com> 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

    attached mail follows:


    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?

    attached mail follows:


    Should work just fine.

    On Wed, 21 Mar 2001 KPortsmoutaol.com 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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 <rasmusphp.net> To: <KPortsmoutaol.com> Cc: <php-generallists.php.net> Sent: Wednesday, March 21, 2001 7:45 AM Subject: Re: [PHP] Header Problem

    > Should work just fine. > > On Wed, 21 Mar 2001 KPortsmoutaol.com 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: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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

    attached mail follows:


    the only problem could be that yourUserwebhost do not have same permisions for this db as yourUseryourHost, check them if you can

    -almir

    "Floyd Piedad" <piedadakasia.com> schrieb im Newsbeitrag news:3AB80A08.AFAF082Cakasia.com... > 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" <piedadakasia.com> schrieb im Newsbeitrag > > news:3AB764B6.C4B8713Aakasia.com... > > > 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: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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 yourUserwebhost do not have same permisions > for this db as yourUseryourHost, check them if you can > > -almir > > "Floyd Piedad" <piedadakasia.com> schrieb im Newsbeitrag > news:3AB80A08.AFAF082Cakasia.com... > > 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" <piedadakasia.com> schrieb im Newsbeitrag > > > news:3AB764B6.C4B8713Aakasia.com... > > > > 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: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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 : abraxastechyahoo.com Tel : 91-4546512/4522124 *******************************************

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

    attached mail follows:


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

    attached mail follows:


    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:jackinnovativeinternet.com] 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    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:Stewart.Tayloruk.thalesgroup.com] Sent: 21 March 2001 08:53 To: 'Jack Sasportas'; 'php-generallists.php.net' 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:jackinnovativeinternet.com] 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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:neil.kimberflytxt.com] Sent: 21 March 2001 11:44 To: Stewart Taylor; 'Jack Sasportas'; php-generallists.php.net 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:Stewart.Tayloruk.thalesgroup.com] Sent: 21 March 2001 08:53 To: 'Jack Sasportas'; 'php-generallists.php.net' 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:jackinnovativeinternet.com] 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: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail