Re: [PHP] Submit hitting enter problem
It is a client side browser issue. Which browser are you testing within??? -Original Message- From: rija [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Date: Sunday, November 10, 2002 9:49 PM Subject: [PHP] Submit hitting enter problem What am I missing? My form does not submit when I hit enter in the text box. I do something approximately like this : form action=index.php?s=add method=post input type=text name=bongabe value=something ... input type=submit value=submit name=submit // Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session vs. header
What I've done : 1. Allow the user to login 2. Use the login.php page as its own 'form action' 3. Let the login form decide when to redirect the user to the 'destination' page. 4. force the destination page (welcome.php) to do additional authentication checking by comparing the users input to some other piece of information (session variable, cookie, database info, etc...) Pseudo code for login page ? php if $user_input = something || $more_user_info=somethingelse { header ('Location: http://www.mysite.com/welcome.php'); } ? HTML what ever the login page looks like /html Pseudo code for welcome.php: ? php if $user_input != something || $more_user_info!=somethingelse { header ('Location: http://www.mysite.com/login.php'); } ? HTML what ever the welcome page looks like /html -Original Message- From: huge junk mail [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, November 06, 2002 9:03 AM Subject: Re: [PHP] session vs. header I think I have to re-explain the problem completely. I want to use this script in a login form. Once, someone is authenticated, then I register variables for indentifying him/her through session. After I register those variables I want to redirect him/her to a page, which required authenticated users (and it's done by registering variables through session). Due to this, I decide to use header: location. Futhermore, I use IE 5.5, Apache 1.3.26, PHP 4.2.1 [, MySQL 3.23.51] which running on Windows ME. Here is the script (register globals is off, due to security and default setting in php.ini). ?php $user = $_POST['user']; $user = $_POST['password']; if (authenticate($user)) { session_start(); $_SESSION['user'] = $user; $_SESSION['password'] = $password; header('Location: http://www.mysite.com/member.php'); exit(); } else { header('Location: http://www.mysite.com/login.php'); exit(); } ? When I try this code with an authenticated user, it seemed browser don't redirect to the page I specify above. The progress bar looked like searching something then it led to an error. I don't know why this could happen. Am I missing something? Thank you. huge junk mail [EMAIL PROTECTED] wrote:Can someone tell me why I can't have $_SESSION['foo'] = 'content of foo'; following by header('Location: http://www.mysite.com'); Someone from www.php.net told me that it can confuse browser (http://bugs.php.net/19991). But, still I can't the idea why it can happen. Does register session means sending a 'header: location' too? Thanks. = Regards, mahara __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Regards, mahara - Do you Yahoo!? HotJobs - Search new jobs daily now -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session vs. header
I believe the php code gets executed before html code is processed. -Original Message- From: dwalker [EMAIL PROTECTED] To: huge junk mail [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, November 06, 2002 10:44 AM Subject: Re: [PHP] session vs. header What I've done : 1. Allow the user to login 2. Use the login.php page as its own 'form action' 3. Let the login form decide when to redirect the user to the 'destination' page. 4. force the destination page (welcome.php) to do additional authentication checking by comparing the users input to some other piece of information (session variable, cookie, database info, etc...) Pseudo code for login page ? php if $user_input = something || $more_user_info=somethingelse { header ('Location: http://www.mysite.com/welcome.php'); } ? HTML what ever the login page looks like /html Pseudo code for welcome.php: ? php if $user_input != something || $more_user_info!=somethingelse { header ('Location: http://www.mysite.com/login.php'); } ? HTML what ever the welcome page looks like /html -Original Message- From: huge junk mail [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, November 06, 2002 9:03 AM Subject: Re: [PHP] session vs. header I think I have to re-explain the problem completely. I want to use this script in a login form. Once, someone is authenticated, then I register variables for indentifying him/her through session. After I register those variables I want to redirect him/her to a page, which required authenticated users (and it's done by registering variables through session). Due to this, I decide to use header: location. Futhermore, I use IE 5.5, Apache 1.3.26, PHP 4.2.1 [, MySQL 3.23.51] which running on Windows ME. Here is the script (register globals is off, due to security and default setting in php.ini). ?php $user = $_POST['user']; $user = $_POST['password']; if (authenticate($user)) { session_start(); $_SESSION['user'] = $user; $_SESSION['password'] = $password; header('Location: http://www.mysite.com/member.php'); exit(); } else { header('Location: http://www.mysite.com/login.php'); exit(); } ? When I try this code with an authenticated user, it seemed browser don't redirect to the page I specify above. The progress bar looked like searching something then it led to an error. I don't know why this could happen. Am I missing something? Thank you. huge junk mail [EMAIL PROTECTED] wrote:Can someone tell me why I can't have $_SESSION['foo'] = 'content of foo'; following by header('Location: http://www.mysite.com'); Someone from www.php.net told me that it can confuse browser (http://bugs.php.net/19991). But, still I can't the idea why it can happen. Does register session means sending a 'header: location' too? Thanks. = Regards, mahara __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Regards, mahara - Do you Yahoo!? HotJobs - Search new jobs daily now -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Decimal Places
?php function DoFormatNumber($theObject,$NumDigitsAfterDecimal,$UseParensForNegativeNumber s,$GroupDigits) { $currencyFormat=number_format($theObject,$NumDigitsAfterDecimal,$UseParensFo rNegativeNumbers,$GroupDigits); return ($currencyFormat); } ? ?php echo DoFormatNumber( $Product-Fields(UnitPrice), 2, -2, -2) ? -Original Message- From: Andrew Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, October 29, 2002 11:34 PM Subject: [PHP] Decimal Places Hay guys, I have two variables ( integers ) that are being minused one from the other and i am printing the result to the screen but i am getting unwanted decimals. print ($eall - $sall) / 1000; My question is what is the easiest way to strip decimals off the above result. The only way i know around it is if i piped the above statement into another varible and set that variable to an integer then printed that. I dont really want to do this as i will end up with 50 extra variables. Thanks in advance for your comments. Andrew Wilson Technical Support Netway Networks 8920-8877 Netway Networks Pty Ltd (T) 8920 8877 (F) 8920 8866 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying one of three functions.
You could try something less convoluted like: ?php if ($u != x): ? put code here ?php endif; ? ?php if ($u != y): ? put code here ?php endif; ? ?php if ($u != z): ? put code here ?php endif; ? NOTE: the code between the IF and ENDIF will not be visible unless the condition equates to TRUE -Original Message- From: Steve Jackson [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Date: Monday, October 28, 2002 8:14 AM Subject: [PHP] Displaying one of three functions. I have three functions written which work and I want to only display one of them depending on user input. What is the correct way to code this? I can display all three functions but not one. this is my code: ? include ('products_sc_fns.php'); // The shopping cart needs sessions, so start one session_start(); do_html_header(Checkout); // if filled out if($cart$name$address$city$zip$country) { // able to insert into database if( insert_order($HTTP_POST_VARS)!=false ) { file://display cart, not allowing changes and without pictures display_cart($cart, false, 0); calculate_weight($cart); file://de-bug file://echo test $country $express; display_shipping(calculate_shipping_cost($weight)); display_shipping(calculate_nonfinland_cost($country)); display_shipping(calculate_express_cost($express)); file://display_shipping(calculate_temp_shipping_cost($weight)); file://get credit card details calculate_final_cost($total_price, $shipping); get_order_id(); display_card_form($name, $final_cost); echo table width='760' cellpadding='0' background='images/shopbg.gif'trtd width='200'nbsp;/td; echo td align='right'; display_button(show_cart.php, continue-shopping, Continue Shopping); echo /td/tr/table; } else { // error info and footer goes here. I want to display shipping if the user is from finland and paying an express cost display_shipping(calculate_express_cost($express)); from finland but paying by weight of shipping display_shipping(calculate_shipping_cost($weight)); or from outside of finland display_shipping(calculate_nonfinland_cost($country)); How do I write the If statement to say if country=finlandexpress=yes display function 1 then if country = finland but express= display function 2 or if country isn't finland do 3? Tried all morning and repeatedly failed! Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com http://www.violasystems.com/ [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mutiple header statements?
Could it be that the results return TRUE for both statements??? And it posts the same variable twice??? -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 30, 2002 12:34 PM Subject: Re: [PHP] Mutiple header statements? WHAT IS THE ERROR?? It tells you _exactly_ in the header error message where the output was started. Look on or near that line because it caused some output to the browser and now headers cannot be sent. ---John Holmes.. Here's the code: ? if ($_POST['county'] == Lots) { header(Location: lotland1.php); exit; } ? ? if ($_POST['county'] == Land and Acreage) { header(Location: lotland2.php); exit; } ? font face=Arial,Helvetica size=+1 color=red and on from here Here's the error: Warning: Cannot add header information - headers already sent by (output started at script.php:4) in script.php on line 5 Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mutiple header statements?
try setting the variable to match one of the IF statement criteria to see what the result is. -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED] Cc: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 30, 2002 12:34 PM Subject: Re: [PHP] Mutiple header statements? WHAT IS THE ERROR?? It tells you _exactly_ in the header error message where the output was started. Look on or near that line because it caused some output to the browser and now headers cannot be sent. ---John Holmes.. Here's the code: ? if ($_POST['county'] == Lots) { header(Location: lotland1.php); exit; } ? ? if ($_POST['county'] == Land and Acreage) { header(Location: lotland2.php); exit; } ? font face=Arial,Helvetica size=+1 color=red and on from here Here's the error: Warning: Cannot add header information - headers already sent by (output started at script.php:4) in script.php on line 5 Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] One mail function, multiple recipients
Agreed. Case in point, when I attach more 9 email addresses to one email message via Netzero's servers (1 of 7 different email accounts I have), the delivery fails with a message that reads something like: ' Blah Blah Blah. Too many recipients. Blah Blah Blah.' I could be mistaken about service providers name because I change and redirect my mail on the fly to avoid lengthy email distrubances. -Original Message- From: Manuel Lemos [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Sunday, October 27, 2002 5:10 PM Subject: Re: [PHP] One mail function, multiple recipients Hello, On 10/27/2002 06:23 PM, Dwalker wrote: You'll need to be careful with this method. In an effort to keep spam to a minimum, some ISP's may refuse messages with more than X number of email address attached. Then the question becomes: did everyone on the list actually receive the message? The ISP that refuse messages to many recipients in BCC, certainly will not allow you to send separate messages to the as many recipients because that overloads even more their servers. That has nothing to do with whether you are sending spam or solicited bulk mail like newsletters. Thas has to do with abusing the mail server resources compromising the quality of service to other customers . Whether you send separate messages or a single message with all recipients in Bcc, you need to ask your ISP if you are not infringing the acceptable use policy. In shared servers you are most likely abusing. Regards, Manuel Lemos -Original Message- From: Justin French [EMAIL PROTECTED] To: Stephen [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Date: Friday, October 25, 2002 7:53 PM Subject: Re: [PHP] One mail function, multiple recipients instead of your while() loop calling mail() each time, use it to build a comma separated list of recipients, then pipe them into a Bcc (so as to not publicise everyone's email address), and send one email with all people in the Bcc list. UNTESTED code: ? $bcc = ''; $sql = SELECT email FROM mailingListTable; $result = mysql_query($sql); while($myrow = mysql_fetch_array($result)) { $bcc .= $myrow['email'].','; } // $bcc will now look like: // [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED], // trim off the trailing comma $bcc = substr($bcc, 0, -1); // prepare to send $to = '[EMAIL PROTECTED]'; $subject = 'My Mailing List'; $message = 'This is my email message'; $headers = 'From: [EMAIL PROTECTED]\r\n'; $headers .= Bcc: {$bcc}\r\n; // send mail($to, $subject, $message, $headers); ? Good luck -- like I said, untested code, so it may need some tweaking. Justin on 26/10/02 10:41 AM, Stephen ([EMAIL PROTECTED]) wrote: I'm pulling email addresses from a database, then emailing them a newsletter email. Right now, I'm calling the mail() function each time to send an email and that's slooow. How could I make it so all the emails are put into a BCC field then emailed all at once instead of multiple times? Thanks, Stephen Craton http://www.melchior.us http://php.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] One mail function, multiple recipients
You'll need to be careful with this method. In an effort to keep spam to a minimum, some ISP's may refuse messages with more than X number of email address attached. Then the question becomes: did everyone on the list actually receive the message? -Original Message- From: Justin French [EMAIL PROTECTED] To: Stephen [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Date: Friday, October 25, 2002 7:53 PM Subject: Re: [PHP] One mail function, multiple recipients instead of your while() loop calling mail() each time, use it to build a comma separated list of recipients, then pipe them into a Bcc (so as to not publicise everyone's email address), and send one email with all people in the Bcc list. UNTESTED code: ? $bcc = ''; $sql = SELECT email FROM mailingListTable; $result = mysql_query($sql); while($myrow = mysql_fetch_array($result)) { $bcc .= $myrow['email'].','; } // $bcc will now look like: // [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED], // trim off the trailing comma $bcc = substr($bcc, 0, -1); // prepare to send $to = '[EMAIL PROTECTED]'; $subject = 'My Mailing List'; $message = 'This is my email message'; $headers = 'From: [EMAIL PROTECTED]\r\n'; $headers .= Bcc: {$bcc}\r\n; // send mail($to, $subject, $message, $headers); ? Good luck -- like I said, untested code, so it may need some tweaking. Justin on 26/10/02 10:41 AM, Stephen ([EMAIL PROTECTED]) wrote: I'm pulling email addresses from a database, then emailing them a newsletter email. Right now, I'm calling the mail() function each time to send an email and that's slooow. How could I make it so all the emails are put into a BCC field then emailed all at once instead of multiple times? Thanks, Stephen Craton http://www.melchior.us http://php.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Getting the From: admin@site.com to work
How would you then build into the headers an 'invisible' BCC (blind carbon copy)? -Original Message- From: Monty [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Saturday, October 26, 2002 3:53 PM Subject: [PHP] Re: Getting the From: [EMAIL PROTECTED] to work Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the From: field pre-filled for a registration/confirmation email that I send out. To add to John's reply, here's how to do a multi-parameter Header. Also note the \r\n at the end of each of these lines. If you don't do this, the header won't be formatted properly. It took me some time to eventually figure this out when I first did this because I was using just \n which doesn't work in the header, but, does work in the body. $headers = From: [EMAIL PROTECTED]\r\n .Reply-To: [EMAIL PROTECTED]\r\n .X-Mailer: PHP/4.0.2; You can also add other mail headers such as 'Importance: High' to the headers list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] String extraction from blobs. Extracted string to be placed into field within another table.
What is the most effective method of extracting from a blob specified text to be placed into another table field. This email message and all attachments transmitted herewith are tradesecret and/or confidential information intended only for theviewing and use of addressee. If the reader of this messageis not the intended recipient, you are hereby notified that any review, use, communication, dissemination, distribution or copying of this communication is prohibited. If you have received this communication is error, please notify the sender immediately by telephone or electronic mail, and delete this message and all copies and backups thereof. Thank you for your cooperation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL Insert Select statement
Whilereading the MySQL manual for INSERT SELECT, I was not able to determine how to includeall 5 fields of one table into another table (containing 100 fields) into SPECIFIC data fields. Do I need to explicitly list all the fields within the table of 5 fields? If so, would the statement be: INSERT INTO Products (ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName) SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP, kalproduct.Cat, kalproduct.manname) FROM kalproduct ; Thanking you in advance. P.S. I'd give it a try, but I'm trying to move 500 partial records into a table containing at least 2000 records -- didn't want to start from scratch. This email message and all attachments transmitted herewith are tradesecret and/or confidential information intended only for theviewing and use of addressee. If the reader of this messageis not the intended recipient, you are hereby notified that any review, use, communication, dissemination, distribution or copying of this communication is prohibited. If you have received this communication is error, please notify the sender immediately by telephone or electronic mail, and delete this message and all copies and backups thereof. Thank you for your cooperation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] MySQL Insert Select statement
For some reason the Insert Select statement returned an ERROR and I had to resort to INSERT INTO Products (ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName) SELECT * FROM kalproduct ; Is there a noticeable reason why: INSERT INTO Products (ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName) SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP, kalproduct.Cat, kalproduct.manname) FROM kalproduct ; would have returned an error message?? I don't want to have to create multiple tables for the purpose of inserting into others. -Original Message- From: John W. Holmes [EMAIL PROTECTED] To: 'dwalker' [EMAIL PROTECTED]; 'professional php' [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Saturday, October 19, 2002 7:24 PM Subject: RE: [PHP-DB] MySQL Insert Select statement That's how you do it. Hopefully you've figured it out already. ---John Holmes. -Original Message- From: dwalker [mailto:dwalker;healthyproductsplus.com] Sent: Saturday, October 19, 2002 7:51 PM To: professional php; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] MySQL Insert Select statement While reading the MySQL manual for INSERT SELECT, I was not able to determine how to include all 5 fields of one table into another table (containing 100 fields) into SPECIFIC data fields. Do I need to explicitly list all the fields within the table of 5 fields? If so, would the statement be: INSERT INTO Products (ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName) SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP, kalproduct.Cat, kalproduct.manname) FROM kalproduct ; Thanking you in advance. P.S. I'd give it a try, but I'm trying to move 500 partial records into a table containing at least 2000 records -- didn't want to start from scratch. This email message and all attachments transmitted herewith are trade secret and/or confidential information intended only for the viewing and use of addressee. If the reader of this message is not the intended recipient, you are hereby notified that any review, use, communication, dissemination, distribution or copying of this communication is prohibited. If you have received this communication is error, please notify the sender immediately by telephone or electronic mail, and delete this message and all copies and backups thereof. Thank you for your cooperation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fedex rate calculator
It may be too soon for anyone to have gotten around to the task of putting together a new PHP script for the new rates. Has EVERYTHING changed or just a few things? Will FEDEX help you out? THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: arvind [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 16, 2002 1:40 AM Subject: Re: [PHP] Fedex rate calculator Hi Dwalker, Fedex has changed the site after sep 22 2002.Most of the scripts i got where for the http://rate.dmz.fedex.com/servlet/RateFinderServlet?orig_country=USlanguag e =english link which does not work any more. Arvind Dwalker [EMAIL PROTECTED] wrote in message 01c274db$0bbeaae0$d07623c7@b">news:01c274db$0bbeaae0$d07623c7@b... http://www.phpbuilder.com/snippet/detail.php?type=snippetid=413 THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: arvind [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 16, 2002 12:55 AM Subject: [PHP] Fedex rate calculator hi all, Where can i get the fedex rate calculator in php for the new fedex site?.Fedex has changed the earlier url for the rates and my old script have stopped working . Anyone can help me out on this ? Thanks @rvi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Need help with HTTP-Authentication
direct authentication with http headers ?php file://if some_variable is NOT set then redirect to some other location session_start(); if (!isset($HTTP_GET_VARS[some_variable])) { header( 'Location: http://www.yourfavoritepage.com/login.php?v=nogo' ); } ? html !-- Your html code goes here -- /html THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: BAROILLER [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 16, 2002 2:15 AM Subject: [PHP] Re: Need help with HTTP-Authentication Hi, a simple question.. :) how do you do ? You can use 2 methods : with a .htaccess file on your webserver, updated with your table fields or a direct authentification with http headers and a little bit of php... Tell me more? may be I could help you. Regards, P.E. Baroiller Davy Obdam [EMAIL PROTECTED] a écrit dans le message de news: 001901c2747e$fa0184a0$[EMAIL PROTECTED] Hi People,. I have a problem with HTTP-Authentication, i have 2 users in my database, and i want both to be able to login. However it works, but only the first user is able to login. I Use a MySQL 3.23.xx database, PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-) Best regards, Davy Obdam, mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What is the easiest method of determining how and when to implement browser specific external style sheets??
I posted this question on another list and received a response consisting of potentially helpful code. It has not been tested on my end, but I thought I'd pass the information along. Share the wealth. dwalker wrote: What is the easiest method of determining how and when to implement browser specific external style sheets??? I've been working on a site for several months now, and I discovered that the site looks pretty decent within IE , but is less than decent within Netscape. Do you create one external style sheet for one browser and then create one for the other?? Or is it possible to do both at the same time without loosing focus?? Assuming you want to go ahead and do multiple style sheets: One idea is to head on over to a big site which does this (i think cnn.com does, but i only say that because i always see Netscape-specific banners and such) and grab the different style sheets (by browsing it with different browsers or changing the id of your browser, as Opera and Konqueror allow for). i work for an internet company and can say that Netscape gives our web designers no end of grief, and it's about impossible to make something look good in Netscape 4.x. Below are some functions which might help you in determining which style sheet you want to show. Using those it becomes a simple matter of including a style sheet named r_get_browser_name()..css. function r_get_browser_name() { /* Get the Browser data */ $browsers = array(); $browsers['MSIE'] = !MSIE!; $browsers['Konqueror'] = !Konqueror!; $browsers['Lynx'] = !Lynx!; $browsers['Opera'] = !Opera!; $browsers['WebTV'] = !WebTV!; $browsers['Bot'] = /bot|Slurp|Infoseek|Spider|Google/; $browsers['Netscape'] = ,(Mozilla\/4|Nav|Gold|Netscape),; $browsers['Mozilla'] = !Mozilla!; $browser = Other; $agent = r_find_var( 'HTTP_USER_AGENT' ); # echo agent=[$agent]br; while( list($k,$v) = each( $browsers ) ) { if( ! preg_match( $v, $agent ) ) continue; $browser = $k; # r_debug_log( basename(__FILE__),__LINE__,: [$browser]: regex = $v. Agent=[$agent] ); #echo browser match: browser=[$browser]: ; #echo v=$vbrk=$kbr; break; } #echo bbrowser=[$browser]/bbr; return $browser; } function r_get_browser_os() { /* Get the Operating System data */ $oses = array(); $oses['Windows'] = !Win!; $oses[OS/2] = !OS/2!; $oses['Mac'] = !Mac|PPC!; $oses['Linux'] = !Linux!; $oses['FreeBSD'] = !FreeBSD!; $oses['SunOS'] = !SunOS!; $oses['IRIX'] = !IRIX!; $oses['BeOS'] = !BeOS!; $oses['AIX'] = !AIX!; $os = Other; $agent = r_find_var( 'HTTP_USER_AGENT' ); while( list($k,$v) = each( $oses ) ) { if( ! preg_match( $v, $agent ) ) continue; $os = $k; #echo agent=[$agent]brOS match: OS=[$os]: key=[$k] pattern=[$v]br; break; } #echo bOS=[$os]/bbr; return $os; } function r_find_var( $var, $defaultval = null ) { foreach( array( $GLOBALS, $GLOBALS['HTTP_POST_VARS'], $GLOBALS['HTTP_GET_VARS'], $GLOBALS['HTTP_SERVER_VARS'], $GLOBALS['HTTP_COOKIE_VARS'] ) as $ar ) { if( isset( $ar[$var] ) ) return $ar[$var]; } return $defaultval; } - stephan beal Registered Linux User #71917 http://counter.li.org I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL GMT -- Local time
Try something like: ?php echo oMySQLTimeStamp( $GetCustHistInfo-Fields(AccountActivationDate), 'l, F jS Y H:i:s') ? THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: Jason [EMAIL PROTECTED] To: php_gen [EMAIL PROTECTED] Date: Thursday, October 17, 2002 12:26 AM Subject: [PHP] MySQL GMT -- Local time My logging application is feeding a MySQL database with data records that are time stamped with GMT time. I would like to query the database for records matching local time(eg. all records created on oct 17,2002 local time). I would prefer if the records could be formated in local time when returned from MySQL. What is the best way to do this. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.
Passing string variable to HTML TITLE tag fails within Netscape but workwell within IE.I have a single page consisting of inventory items to be sold. When an itemis selected, it passes the product name to a DETAIL page as part of theTITLE tag for the DETAIL page. My problem is: Netscape does not like theSPACES between the text and refuses to display the DETAIL page.Initially, I thought there might be some way to parse the string and add theascii code for SPACE, but I wasn't sure if I was on the right track. Doesanyone have a proven solution to this problem?I thought the pseudo code might look something like this:?phpfunction parse_and_change(grab_string){ $string_holder=$grab_string; while stepping through the characters in this $string_holder{ if character = " " (or some other representation) replace it with something that doesn't scare netscape or title tag} return $string_holder; }? ?php if (isset($HTTP_GET_VARS["itemname"])) { $title = (parse_and_change($HTTP_GET_VARS["itemname"] )); }else{ $title="Generic Product Title"; }? html title?php echo $title ? /title/html THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADESECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING ANDUSE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDEDRECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDERIMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE ANDALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fedex rate calculator
try this link http://clickit.go2net.com/search?cid=239171site=srcharea=srch.noncomm.goog leshape=textlinkcp=dogpilerawto=http://www.phpbuilder.com/snippet/browse. php%3Fby%3Dcat%26cat%3D11 THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: arvind [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 16, 2002 12:55 AM Subject: [PHP] Fedex rate calculator hi all, Where can i get the fedex rate calculator in php for the new fedex site?.Fedex has changed the earlier url for the rates and my old script have stopped working . Anyone can help me out on this ? Thanks @rvi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fedex rate calculator
http://www.phpbuilder.com/snippet/detail.php?type=snippetid=413 THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND USE OF ADDRESSEE. IF THE READER OF THIS MESSAGE IS NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND ALL COPIES AND BACKUPS THEREOF. THANK YOU FOR YOUR COOPERATION. -Original Message- From: arvind [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, October 16, 2002 12:55 AM Subject: [PHP] Fedex rate calculator hi all, Where can i get the fedex rate calculator in php for the new fedex site?.Fedex has changed the earlier url for the rates and my old script have stopped working . Anyone can help me out on this ? Thanks @rvi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php