joined to p. So swap em around if I misunderstood.
iPhone 4. It rocks!
On Nov 21, 2010, at 1:37 AM, Simcha Younger wrote:
> On Sat, 20 Nov 2010 13:54:29 -0700
> "Ben Miller" wrote:
>
>> Hi,
>>
>> I'm building a website for a client in which I need t
eria_id,
eliminating any criteria where the number of criteria_values <
count($selected_product), but this seems pretty inefficient.
Thanks in advance for any help.
Ben Miller
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I need to access and read the files in a password protected directory with a
PHP script using the readdir function. I'm already making users login to a
secure area, so I don't want to make them enter a password again to access
the files - is there a way to include the password with the readdir/ope
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Friday, July 02, 2010 2:43 PM
To: b...@tottd.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] SELECT AVG(rating)
On Fri, 2010-07-02 at 14:32 -0600, Ben Miller wrote:
> Hi - I have a MySQL table f
Hi - I have a MySQL table full of product reviews and I'm trying to select
info for only the top 5 rated products. The only way I can figure out how
to do it so far is something like:
$query1 = mysql_query("SELECT * FROM products");
for($i=1;$i<=mysql_num_rows($query1);$i++) {
$row1 = mys
Hi,
I'm building a site for a client that has a need to allow their users to
upload large files (up to 100mb or more) and store them on the server. I've
never had a need to work with PHP's FTP functions until now and, before I go
reading the manual to learn how, I wanted to see if this somethi
Hi, I've always thought that session data was subdomain specific and would
not carry over between http://www.mydomain.com and
https://secure.mydomain.com, but it seems to be working for me now. Can I
rely on this and post from http://www.mydomain.com to
https://secure.mydomain.com and simply pass
Hi, I've always thought that session data was subdomain specific and would
not carry over between http://www.mydomain.com and
https://secure.mydomain.com, but it seems to be working for me now. Can I
rely on this and post from http://www.mydomain.com to
https://secure.mydomain.com and simply pass
Is there a PHP function that will return whether the request was http or
https? I have functions that need to cURL other servers - sometimes over
SSL, sometimes not, depending whether the function is called from
http://www.mydomain.com/script_that_calls_function.php or
https://www.mydomain.com/scr
I hope this isn't a bone-head question - Is there a MySQL query that will
increment/decrement the value in an integer column with a single query - in
other words, I don't have to run a SELECT query to get the value,
add/subtract to/from the value, and then run an UPDATE query to store the
new value
, December 11, 2009 2:39 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive
On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote:
Too much reliance on the user knowing how to extract the files to the flash
drive – need something that does
)
(preferred) run the presentation via an autoplay command or b) open the
presentation.html file.
Ben
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Friday, December 11, 2009 2:25 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backu
drive into a USB port and present the info on the road, regardless of
connection to the internet.
Ben
-Original Message-
From: Roberto [mailto:prof...@gmail.com]
Sent: Friday, December 11, 2009 11:58 AM
To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive
Hi
Hello - I have an application I'm building that allows users to store
personal information and files (images, PDFs, etc.) in our database, but I
need a way for them to be able to save the HTML output of that personal data
to a local (for the user) flash drive. I'm guessing I'm going to need a
clie
Is there a simple to way to compare two strings with case insensitivity so
that the following will return true?
$foo = "Arnold";
$bar = "arnold";
If($foo == $bar) {
}
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_lastName]";
$query = mysql_query("INSERT INTO customers (`cust_first`,`cust_last`)
VALUES ('$firstName','$lastName')");
Ben Miller
Oh yeah - not sure if spaces are considered alphanumeric or not, but I need
to keep spaces - replacing anything that is NOT a letter, a number or a
space. Thanks again.
-Original Message-
From: Ben Miller [mailto:biprel...@gmail.com]
Sent: Friday, June 05, 2009 2:09 AM
To: php-general
I bought PHP & MySQL for DUMMIES and it shows me how to use special
characters for pattern matching and I've figured out the basics of using
preg_replace to replace pattern matches. What I am having trouble with,
though, is figuring out how to replace anything that does not match the
pattern.
Rather than using the following, which simply displays a white screen with
the die message, is there a way to add the die message to the body of the
original form page, such as in a variable, so that I can display the message
on the original form page with all the values already filled out, so that
In trying to make an alpha list, using the following:
for($i=A;$i<=Z;$i++) {
echo "$i";
}
Produces:
A
B
C...
X
Y
Z
AA
AB
AC...
AX
AY
AZ... all the way to YZ.
What am I doing wrong that it's not stopping at just plain old "Z", without
moving on to "AA" and continuing?
--
PHP General Ma
If anyone has an answer for this, I would be greatly appreciative.
I was trying to compare two values, the first is the total cost of products
to be refunded, and the second is the original order total. To the naked
eye, they both were coming out as 102.85, yet an if($Refund_Amount >
$Order_Total
Is there a way to easily tell PHP how many days there are in a selected
month without writing the following out for each month:
if($Month == "January") {
$NumberOfDays = 31;
}
elseif($Month == "February") {
if($Year == "A Leap Year") {
$NumberOfDays = 29;
}
When using forms with PHP sessions, hitting the back button results in
WARNING: Page has Expired
I am wondering if there is a work around for this so that it (IE, in this
case) resubmits the form information and displays the previous page.
Any ideas?
--
PHP General Mailing List (http://www.php.
Never mind - wasn't adding properly. Found it after all on php.net, anyway.
Thanks anyway.
-Original Message-
From: Ben Miller [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 04, 2006 5:01 PM
To: php-general@lists.php.net
Subject: [PHP] Counting in Hex
Is there a way in PHP to
Is there a way in PHP to count using hex instead of numerals so that the
following statement
$var = 237F;
$var++;
echo "$var";
would result in
2380
Thanks a bunch.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If I have an array, such as
$Var[0] = "Dog";
$Var[1] = "Cat";
$Var[2] = "Horse";
Is there a way to quickly check to see if $Var contains "Lion" without
walking through each value?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Ben,
Thursday, November 17, 2005, 3:26:04 PM, you wrote:
> Is there a way to test if a user has cookies turned on or not so
> that I can use cookies if the user allows them and use the URL if
> the user does not allow them?
Set one? :)
Then check if it exists or not.
This of course will not
Is there a way to test if a user has cookies turned on or not so that I can
use cookies if the user allows them and use the URL if the user does not
allow them?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am trying to learn how to work with arrays, and have the basic concept
down for working within a single page, but I am having trouble sending an
array from one page to another. For example, I can send a variable from
page to page using either the URL, such as www.domain.com/?foo=bar, or using
a
OK - easy one here, I know. Having troubles removing anything that is not a
number from user input. According to manual, [!] is supposed to mean set of
non-matching optional characters. Tried
$var = ereg_replace("[!0-9]","",$var);
and it removes the numbers, but so does
$var =
That did it perfectly. Why don't any of the stupid books tell you that you
need the AS statement?
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 11:16 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] Column Totals
[snip]
Th
-Original Message-
From: Robby Russell [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 11:12 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Column Totals
On Mon, 2004-11-15 at 11:01 -0700, Ben Miller wrote:
> SELECT SUM(Revenue) FROM Sales WHERE Date=
I am trying to get the total sales revenue for each day of the month, and
having no luck at all.
The following query seems to return an empty string, which should only give
me the total for the entire column anyway.
$query = "SELECT SUM(Revenue) FROM Sales WHERE Date='$Date'";
I also tried, amon
Thank you to all for help with this. Once I have a general idea of which
path to head down, I can figure it out pretty well from there, and you have
all given me a pretty good road map. Anyway, thanks again. It is greatly
appreciated. I'll let you know hot it all comes out.
Ben
-Original
edit
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values [the
whole array and all of it's values] from
page to page and/or store in a db. Once again, I am new to arrays (and
fairly new to PHP for that matter
EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 7:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql_connect
On Thursday 04 November 2004 06:22, Ben Miller wrote:
> I am having trouble connecting to a database on another server. I have
the
> following for the connection, but it seems to be
I am having trouble connecting to a database on another server. I have the
following for the connection, but it seems to be overriding the value for
the $host variable, and replacing it with localhost. Anyone got any ideas?
$host="domain.com";
$user="username";
$password=
Probably a stupid question, but hopefully has a simple answer. Is there a
way to get Grenwich Mean time? time() and date() functions that I can see
only seem to get date/time from the server, which knowing where that is,
could easily figure out GM time, but would rather go the other way.
Tha
Thanks all. That did it perfectly.
-Original Message-
From: Matt M. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 2:21 PM
To: Ben
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Referring Page
> I am trying to set up a script that will do different things based on the
> reffering
39 matches
Mail list logo