Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big horse;$var2 = small yellow;$var3 = red hydrant;
$theArray = array(big blue horse, small yellow bird, giant red hydrant);
Is there a way to find out if $var1
I have various PHP scripts that use the same database.
The startup script default.php sets the connection once for all the scripts.
This connection is set in $_SESSION to make it a global variable for all
scripts.
When switching from page default to page faq, I get errors I can't explain.
Any
C.R.Vegelin wrote:
I have various PHP scripts that use the same database.
The startup script default.php sets the connection once for all the scripts.
This connection is set in $_SESSION to make it a global variable for all
scripts.
When switching from page default to page faq, I get errors I
- Original Message -
From: Chris [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Wednesday, July 11, 2007 8:56 AM
Subject: Re: [PHP] How to pass connection as global variable ?
C.R.Vegelin wrote:
I have various PHP scripts
C.R.Vegelin wrote:
- Original Message - From: Chris [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Wednesday, July 11, 2007 8:56 AM
Subject: Re: [PHP] How to pass connection as global variable ?
C.R.Vegelin wrote:
I have
C.R.Vegelin wrote:
I have various PHP scripts that use the same database.
The startup script default.php sets the connection once for all the
scripts.
This connection is set in $_SESSION to make it a global variable for
all scripts.
When switching from page default to page faq, I get errors I
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big horse;$var2 = small yellow;$var3 = red hydrant;
$theArray = array(big blue horse, small yellow bird, giant red
C.R.Vegelin wrote:
C.R.Vegelin wrote:
I have various PHP scripts that use the same database.
The startup script default.php sets the connection once for all the
scripts.
This connection is set in $_SESSION to make it a global variable
for all scripts.
When switching from page default to page
Hi Chris,
I recreated a new connection in faq.php and it's working now.
I had the impression that 1 connection could last during a user session,
but apparently a user session may need many connections.
Thanks again, Cor
Have a read on persistent connections
Regards,
Clive.
{No electrons
Hello,
What about this.
test.php
?php
if(isset($_REQUEST['sqlProcess']))
{
switch($_REQUEST['sqlProcess'])
{
case query1:
$sql=
SELECT FOO
FORM BAR
WHERE BAZ='BAR'
break;
}
$res = mysqli_query($connect,$sql);
}
if(!isset($res))
{
$strReturn =
form name='test' method='post' action=''
input
On 7/11/07, clive [EMAIL PROTECTED] wrote:
Hi Chris,
I recreated a new connection in faq.php and it's working now.
I had the impression that 1 connection could last during a user session,
but apparently a user session may need many connections.
Thanks again, Cor
Have a read on
Thanks M. Sokolewicz
for explaining the under water basics ...
Cor
- Original Message -
From: M. Sokolewicz [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: Chris [EMAIL PROTECTED]; [EMAIL PROTECTED]
php-general@lists.php.net
Sent: Wednesday, July 11, 2007 9:56 AM
Subject: Re:
Hi gang:
Totally off topic.
If you bought an iPhone, please contact me off-list -- I have a question.
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Jim,
Code looks extremely promising well explained - let me give it a try and
work it out. I'm sure to hit snags - but can't thank you enough.
The one thing that comes straight off in my mind looking at the code is -
and I may be addressing this prematurely since I haven't tried the code yet
-
Allow bunnies ...
Any takers on this ... I JUST want the duration of the mp3 file - with a
small function if possible ... I honestly don't want to use a class like
http://www.phpclasses.org/browse/package/112.html
The coding is terrible and SERIOUSLY over inflated for what I want.
Anyone know
OK Chris,
I understand that we're checking checking the form data and escaping it, but
can explain what's going on in the WHERE clause and 1=1 tad bit more.
Chris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
kvigor wrote:
/*Good Morning to All,
I am having an issue with the
Allow bunnies ...
Any takers on this ... I JUST want the duration of the mp3
file - with a
small function if possible ... I honestly don't want to use a
class like
http://www.phpclasses.org/browse/package/112.html
The coding is terrible and SERIOUSLY over inflated for what I want.
Shyte ...
The files are VBR ... I will read up and when I find answer - will revert to
list with it as well..
Ps.
Everyone is a bunny to me :P
S
-Original Message-
From: Jim Moseby [mailto:[EMAIL PROTECTED]
Sent: 11 July 2007 03:55 PM
To: 'Steven Macintyre';
So after many days and many questions and the help of many many
people, I have finished my task scheduler!
I just wanted to say thank you to all who helped. Now I just need to
make it look pretty and add some comments so I know why I did what I
did. :)
Anyone interested in looking at
Freelance.eu outsource your programming and webdesign projects
http://www.freelance.eu
freelance, programming, outsourcing, programmer, outsource, php programming,
mysql,mysql database database
Freelance.eu , temporarily: post your projects for free and free webmaster
and programmer signup!
--
On Wednesday 11 July 2007 21:32, Steven Macintyre wrote:
Any takers on this ... I JUST want the duration of the mp3 file - with
a small function if possible ... I honestly don't want to use a class
like http://www.phpclasses.org/browse/package/112.html
The coding is terrible and SERIOUSLY
Or you could use ffmpeg executable to get details about the media file.
You will have to parse the response of the executable.
The only thing is that you must have exec function or an execution
function available and ffmpeg installed.
This is for linux machines tho... Don't know if ffmpeg is
Thanks,
I've seen the light by your code.
Robin Vickery [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big
On 7/11/07, Jason Pruim [EMAIL PROTECTED] wrote:
So after many days and many questions and the help of many many
people, I have finished my task scheduler!
I just wanted to say thank you to all who helped. Now I just need to
make it look pretty and add some comments so I know why I did what I
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big horse;$var2 = small yellow;$var3 = red hydrant;
Robert Cummings wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big horse;$var2 = small yellow;$var3
Or you can use sox, if you compile it with mp3 support. It works for me...
-Original Message-
From: Andrei [EMAIL PROTECTED]
To: 'Jim Moseby' [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: 07. 07. 11. 16:25
Subject: Re: [PHP] duration of mp3 file
Or you could use ffmpeg
On Wed, 2007-07-11 at 15:52 +0100, Stut wrote:
Robert Cummings wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
Robert Cummings wrote:
On Wed, 2007-07-11 at 15:52 +0100, Stut wrote:
Robert Cummings wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array
On Wed, 2007-07-11 at 16:07 +0100, Stut wrote:
Robert Cummings wrote:
On Wed, 2007-07-11 at 15:52 +0100, Stut wrote:
Robert Cummings wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array
On 11/07/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Wed, 2007-07-11 at 09:46 +0100, Robin Vickery wrote:
On 11/07/07, kvigor [EMAIL PROTECTED] wrote:
Is there a php function similar to in_array that can detect if a partial
value is in an array value or not:
e.g.
$var1 = big
http://arrozcru.no-ip.org/ffmpeg_builds/
On 11/07/07, Andrei [EMAIL PROTECTED] wrote:
Or you could use ffmpeg executable to get details about the media file.
You will have to parse the response of the executable.
The only thing is that you must have exec function or an execution
function
Hi, new to PHP5 and I have a question about the object model.
I want to be able to create a class which is allows abstraction from
specifics. So for one example, imagine a generic database connection wrapper
which can have multiple drivers depending on the database used. Some of the
OK, so that came out fairly illegible. Try again:
Hi, new to PHP5 (and the forums evidently !) and I have a question about the
object model.
I want to be able to create a class which is allows abstraction from
specifics. So for one example, imagine a generic database connection wrapper
which can
On Wed, 2007-07-11 at 16:46 +0100, Steve Perkins wrote:
I guess there are lots of workaround ways. I could write lots of
middleman code in generic and use things like __set and __get etc but its
lots of extra overhead. I also know I could use extends but that makes the
code the wrong way
I also don't really get the idea of interface and abstract classes ? They
don't seem to be any practical use ? Maybe that's me ? Anyway, not really
relevant to this post ...
there is a lot of usefulness in these constructs; look into design patterns.
also, there are code libraries already
On Wed, 2007-07-11 at 12:07 -0400, Nathan Nobbe wrote:
I also don't really get the idea of interface and abstract classes ? They
don't seem to be any practical use ? Maybe that's me ? Anyway, not really
relevant to this post ...
there is a lot of usefulness in these constructs; look into
some ideas about class design:
1. properties should normally (read almost always) be private.
2. the apps interface to the DB [connection] is via the 'generic'
class, the app should have to know nothing about the drive object and
should have no direct access to it.
3. use an interface definition
I installed the certificate on our server, but the ftp_ssl_connect still
fails?
I have verified that the certificate is valid and works.
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 7:07 PM
To: Daniel Novotny
Cc: 'php-general@lists.php.net'
The time reported by the date() function is off by one hour.
Currently our server is configured to EDT (-400) time zone, however our
php installation is reporting the timezone at EST (-500).
I know in php 5.1.x you can set the timezone in php.ini. However we're
not prepared to update php at the
Robert,
I looked at your code in InterJinn a couple of times; i havent gone over all
of it mind you but it looks pretty sweet.
have you had a look at any of the other frameworks i mentioned earlier in
this thread?
ez components, onPHP, and now there is a new one ive found (in recent
thread)
On Wed, 2007-07-11 at 12:50 -0400, Nathan Nobbe wrote:
Robert,
I looked at your code in InterJinn a couple of times; i havent gone over all
of it mind you but it looks pretty sweet.
It's very different in many respects from other styles of coding. It's
an MVC approach for the most part but
On Wednesday 11 July 2007 19:58, tedd wrote:
If you bought an iPhone, please contact me off-list -- I have a
question.
They have:
http://www.willitblend.com/videos.aspx?type=unsafevideo=iphone
--
Crayon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Could anybody point me in the right general direction for why Mac OS X
Safari and Firefox would open up a new window/tab for this link?
a
href=http://complaintsdevbrowse.hostedlabs.com/redirect_by_entry_id.php?entry_id=146802;FW:
VitalChek Order Confirmation/a
It's password-protected to keep
Almost for sure from the TZ environment variable, and almost for sure
there's more about it in the FAQ, IIRC:
http://php.net/faq.php
On Wed, July 11, 2007 11:14 am, Shafer, Philip wrote:
The time reported by the date() function is off by one hour.
Currently our server is configured to EDT
I completely agree there.
Darren
独身貴族の生態系 wrote:
ルックスが悪いわけじゃない。仕事を頑張りたいだけが理由じゃない。
「だったらなぜ?」それは当然の疑問です。リサーチの結果これほど性的に飢えた人種はいないという事実が発覚し分離改装となりました。
今回のご案内はこちらです!
■□■ 完全無料制・独身貴族攻略大全集 ■□■
家庭を持つ安定 < 独身の自由な性生活
http://fochun.com/kouryaku/4/
1・コミニティーとして使用するも良し・出会いのキッカケとして使用するも良し
You probably ought to have:
class mysql_driver extends generic_driver {
}
Seems like that would be the most reasonable OOP model, imho.
That said, I suspect that if you do something like:
$driver = $this-driver;
You then may be able to access the driver-specific data using
$driver-propl;
Richard, I'm using Firefox on Mac OS X 10.3.9 ... Clicking your link takes
me to a page with http authentication asking me for usr/pass. Where are you
seeing the pop-up phenomena? I have Safari as well to check with. I can't
get past the Authorization to see where you get the pop-up.
On 7/11/07
On Wed, July 11, 2007 8:32 am, Steven Macintyre wrote:
Allow bunnies ...
Any takers on this ... I JUST want the duration of the mp3 file - with
a
small function if possible ... I honestly don't want to use a class
like
http://www.phpclasses.org/browse/package/112.html
The coding is
Yeah. I've been working on re-writing it using bits from everyone !! It's a
good learning process to find out how PHP handles OOP. I thoroughly
recommend it, it's the only way to learn. Some things just can't be learnt
from the manual!
Cheers All.
-Original Message-
From: Richard Lynch
You can't make a database connection survive past the end of a script.
So putting it in the $_SESSION is about as pointless as it gets.
On Wed, July 11, 2007 3:47 am, C.R.Vegelin wrote:
I have various PHP scripts that use the same database.
The startup script default.php sets the connection
On Wed, July 11, 2007 9:52 am, Stut wrote:
$needle = (array)$needle;
Conversion to array creates an array with one element... the value
converted.
Without raising a notice?
Sure looks like it:
php -d error_reporting=2047 -r '$foo = (array) foo; var_dump($foo);'
array(1) {
[0]=
On Tue, July 10, 2007 7:33 pm, David Wonderly wrote:
I am trying to create a small script to open a file and edit it.
However, when I open a file with PHP in it the PHP is stripped out. It
open as if I was viewing the page source. How do I fix this?
Here is the code I am using.
form
On Wed, 2007-07-11 at 16:11 -0500, Richard Lynch wrote:
On Wed, July 11, 2007 9:52 am, Stut wrote:
$needle = (array)$needle;
Conversion to array creates an array with one element... the value
converted.
Without raising a notice?
Sure looks like it:
php -d error_reporting=2047
On Tue, July 10, 2007 5:59 pm, k w wrote:
I'm trying to make a button execute some php code when the button is
clicked. I'm not sure if it is the button i'm coding wrong or the php
code.
Here is the code I am using.
?php
echo button action='?php
mysqli_query($connect,$query)?'Click/button;
On Tue, July 10, 2007 5:59 pm, k w wrote:
I'm trying to make a button execute some php code when the button is
clicked. I'm not sure if it is the button i'm coding wrong or the php
code.
Here is the code I am using.
?php
echo button action='?php
mysqli_query($connect,$query)?'Click/button;
On Wed, July 11, 2007 4:16 pm, Robert Cummings wrote:
But I'd have to say that the intent is not all that clear, really,
and
I'd be leery of this feature, personally.
I wouldn't be leery at all. It's been around for a very long time and
it's documented:
On Tue, July 10, 2007 4:23 pm, Dan wrote:
I know in some languages there's a right way to remove an element from
an
array and other ways that will give you problems.
In PHP can I just set $arrayname[key] = null? Or will I then end up
with
key = null as a value. I looked on php.net under
Comment out the header(Content-type);
Change error_reporting to E_ALL.
Surf directly to chart.php.
See error messages.
Fix them.
On Tue, July 10, 2007 3:26 pm, M5 wrote:
I've got a little PHP script that generates charts, that has been
working perfectly every day for the past couple years.
On Tue, July 10, 2007 1:51 pm, Kelvin Park wrote:
I'm trying to make a program with PHP, that prevents ecommerce fraud
orders.
Technically, what's the most effective way to prevent fraud orders on
e-commerce web sites?
Don't take orders.
Oh.
You probably want a better answer than that.
On Tue, July 10, 2007 1:59 pm, Stut wrote:
Kelvin Park wrote:
I'm trying to make a program with PHP, that prevents ecommerce fraud
orders.
Technically, what's the most effective way to prevent fraud orders
on
e-commerce web sites?
Give everything away for free.
And take donations instead
Doing a select to get every record, and then looping through them all,
concatenating a bunch of stuff together, and then using PHP to test ==
is not very efficient...
Why not just:
$sql = array_map('mysql_real_insert_string', $POST);
$query = select count(*) from central ;
$query .= where
Don't try to figure out the name of the photo that is next/previous.
Just do it by number and use http://php.net/array_slice after you do
glob.
This is a bit of a hack, as, technically, the Operating System is NOT
required to return the files in any particular order, nor does glob
document
On Tue, July 10, 2007 4:25 am, Kelvin Park wrote:
Do you know the cause of this error?
Yes.
You are using Java instead of PHP.
I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02
64bit
is installed.
Do you know how to fix the following error? if yes how?
Yes.
Uninstall
On Wed, June 13, 2007 3:04 pm, Robert Cummings wrote:
But you might not. It depends on what you decide to include() instead
of
redirecting. I guess in the included source you could code aorund not
having the correct URL parameters and default to something sensible,
but
that still doesn't
On Thu, June 14, 2007 6:02 am, Ross wrote:
I have done this before with a paid service in the uk
www.postcodeanywhere.co.uk but is there a free service where I can
automatically genereate this from the postcode? At present I am using
multimap to get the 'lat' and 'lon' information I want. This
On Tue, July 3, 2007 3:51 pm, Jochem Maas wrote:
$I = null; sleep(10); $I = rear(); function rear() {};
Looks like a snooze alarm to me... :-)
Mine was trying to go for an old funk song that starts:
What goes up, must come down.
Spinning wheel got to go 'round
Drop all the painted ponies by
On Fri, July 6, 2007 7:53 pm, Stut wrote:
Tijnema wrote:
I just noted that my php (CLI and Apache2 SAPI) doesn't read my
php.ini
in /etc
I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it doesn't read the php.ini file..
when I use the CLI with -c /etc it
On Wed, 2007-07-11 at 16:40 -0500, Richard Lynch wrote:
On Wed, July 11, 2007 4:16 pm, Robert Cummings wrote:
But I'd have to say that the intent is not all that clear, really,
and
I'd be leery of this feature, personally.
I wouldn't be leery at all. It's been around for a very long
On Wed, 2007-07-11 at 17:51 -0500, Richard Lynch wrote:
On Wed, June 13, 2007 3:04 pm, Robert Cummings wrote:
But you might not. It depends on what you decide to include() instead
of
redirecting. I guess in the included source you could code aorund not
having the correct URL parameters
kvigor wrote:
OK Chris,
I understand that we're checking checking the form data and escaping it, but
can explain what's going on in the WHERE clause and 1=1 tad bit more.
Instead of looking at all records in your original attempt (which will
work fine for 10 records), you limit what you
let's say we have the following associative array:
$array = array(
red = ferrari,
yellow = volkswagen,
green = mercedes,
blue = volvo
);
then we have a current index into the array:
$index = yellow;
$current = $array[$index];
now: how do i get the key of the next array element (in this
72 matches
Mail list logo