Hi there,
I'm having trouble with passing objects as references. What I want to
do is something like this:
class object_1
{
var $my_chld;
var $my_array;
function object_1()
{
$this->my_array = array('id' => 0, 'name'=>'');
$this->my_chil
Boyan, Michael and Mike,
Thanks for the help, I now understand what is going on, and you guys
have saved me from pulling my hair out in frustration.
I'm more used to doing OOP in Delphi and Perl, and the peculiarities of
PHP are somewhat confusing.
Once again, thanks for the help.
On Friday,
Hi there,
Try this:
mysql_pconnect($_host, $_user, $_password) or die("Could not connect:
" . mysql_error());;
This open a permanent mysql connection. The first time you run it, it
opens the connection, and the second time, etc, it just uses the one
already opened.
On Friday, Oct 31, 200
Have you already sent anything to the browser? Once the first echo has
been performed, you can't send header information, as the header is
sent with the first bit of text.
On Friday, Oct 31, 2003, at 15:47 Europe/Amsterdam, Tore E. Mackay
wrote:
Hi,
I am creating a shopping cart but experien
k if there is a
session.
It works fine if I go passed the index.php file. Maybe it is because
the
index.php file has echoed information. Any idea
Tore
"Gareth Williams" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
Have you already sent anything to the browser?
hi there,
I suppose that technically PHP is built to run on Linux, but does work
on many other platforms. I do all of my development on OS X and have
never had any problems, I've also had it running on Linux and FreeBSD
without any trouble. I think there is no problem with Win2000, but I
do
I think you'll find that this is more of a Javascript problem than a
PHP one.
On 13 Oct 2004, at 12:11, Bruno Santos wrote:
hello all.
I've a question that i might think is not much related with PHP, even
the pages are PHP and everything is working with PHP.
I've a FORM in my site to be written
What about in MySQL:
SELECT personID from persons ORDER BY RAND(NOW()) LIMIT 1
If the table is large, then the following might be better:
LOCK TABLES foo READ;
SELECT FLOOR(RAND() * COUNT(*)) AS rand_row FROM foo;
SELECT * FROM foo LIMIT $rand_row, 1;
UNLOCK TABLES;
There's a whole discussion on it
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11 &&
substr($_POST['mobile_number'],0,3) != 447)
{
$error="Invalid Number";
}
On 15 Oct 2004, at 13:38, Shaun wrote:
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried
You could add is_integer() into the if statement.
On 15 Oct 2004, at 14:07, Robert Cummings wrote:
On Fri, 2004-10-15 at 07:45, Gareth Williams wrote:
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11 &&
substr($_POST['mobile_number'],0
Try something like this:
$string = 'A12B05C45D34';
$string = chunk_split($string, 3, ':');
//Should give you 'A12:B05:C45:D34';
$array = explode(":",$string);
Cheers,
Gareth
On 29 Sep 2004, at 15:40, blackwater dev wrote:
How can I take a string and create an array?
Example,
A12B05C45D34
I need to
There's a simple one abbreviation answer
CVS.
It's probably the widest used version control system in the world, and
is integrated into XCode (if you are a Mac PHP developer).
On 30 Sep 2004, at 10:24, Dave Carrera wrote:
Hi List,
Is there a simple solution for two or more people to work on the s
Well, if you can do it without a regex, then it's always best, because
the regex engine slows things down.
On 30 Sep 2004, at 10:39, mario wrote:
Hi all
I have a string: ##CODE## and I want to replace that with CODE
can u help?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
Try header();
On 30 Sep 2004, at 14:09, welly limston wrote:
how to make my page refresh automaticly?
Can i use PHP function?
what is it?
-
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
--
PHP General Mailing List (http://www.php.net
Not Really.
On 30 Sep 2004, at 21:50, Sagar C Nannapaneni wrote:
Hi folks,
I wonder whether Mysql supports procedures and triggers
:?
/sagar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Well, if you are running you own server at home, or have a dedicated
server, you can install your own MySQL server, and use version 5, which
has all this, but if you have a shared space, then you are probably
running version 4.whatever, and don't have them.
That's why I said not really, instead
Oh please. Not even as a joke.
On 7 Oct 2004, at 21:07, Matt M. wrote:
My boss recently called PHP "good for hobbyists" but REAL sites have
to
be done with Microsoft technologies. He wants to use Sharepoint for a
wiki type site because of versioning.
:)
real sites use iis
--
PHP General Mailing
Can't you sort the array?
On 8 Oct 2004, at 10:41, rich gray wrote:
Just a heads up on this change in array concatenation behaviour that
could cause a few probs for some people...
'Zero');
$arr2 = array(1 => 'One',2 => 'Two');
$arr2 = $arr1 + $arr2;
echo phpversion().'';
print_r($arr2);
?>
this co
header("Location: <>");
On 9 Oct 2004, at 20:21, Armands Pucs wrote:
Hi everyone!
Sorry for the probably stupid question. But I can`t find a way to make
a php
script to open an url in a browser!
Like " location = "example.html"; " does.
Armand from Latvia
--
PHP General Mailing List (http://www.p
I would agree with the Mandrake recommendation.
I first installed it a few years back, to help me get started in the
Linux/Unix world, and had very little trouble with it. It's hardware
recognition has always been very impressive. Since first installing
Mandrake, I have often thought I should
Use implode:
http://nl2.php.net/manual/en/function.implode.php
On 15 Feb 2005, at 16:37, Dave wrote:
PHP General,
The Situation:
I'm retrieving some email addresses from a database. I want to be
able assemble all the addresses into one string that I can use in the
mail() command. At no tim
Create some indexes. I spend most of my day messing around with a
table of 200 records, and indexes increased the speed from 40
seconds to 55 minutes for a query, down to the longest being less than
5 seconds.
On 28 Feb 2005, at 16:42, James Nunnerley wrote:
I'm creating a serious of pages
Wouldn't using GET instead of POST help?
Gareth Williams
venditor.com
Buy cool stuff online at http://www.venditor.com";>venditor.com
On 3 Mar 2005, at 14:20, Jochem Maas wrote:
rory walsh wrote:
Thanks Eoghan, I have tried the following but it still reposts the
data from the form
Hi there,
Try using:
round($number, 2);
cheers,
Gareth
On 25 May 2004, at 16:00, [EMAIL PROTECTED] wrote:
Hi,
please suppose PHP 4.3.2 and $number=502,3550
number_format($number,2,'.',' ') returns 502.36.
It seems ok, but if $number=253,0650
number_format($number,2,'.',' ') returns 253.06 instead o
Hi there,
Try include_once(), it's much safer
Cheers,
Gareth
On 17 Feb 2004, at 23:02, Alex Hogan wrote:
Hi All,
What are the rules of thumb for classes and included files?
Can I not include a file in a class function? If I put the include()
outside the class structure everything works
Hi,
In your mysql query, use the LIMIT keyword at or near to the end of the
query.
LIMIT 1000 will limit to the first thousand records
LIMIT 2000,1000 will retrieve 1000 records, offset by 2000 records.
Cheers,
Gareth
On 17 Feb 2004, at 22:12, Shaun wrote:
Hi,
I use the following function
Well if you are a unix/linux/os x user, drop to the command line, go to
the directory with all the php files, and type in:
grep php
or if your php files are scattered around a load of sub-directories,
then go to a directory which sits above all your php files, and type
in:
grep -r *
if you
No probs.
On 18 Feb 2004, at 16:34, pete M wrote:
Wicked - that's the best tip I've seen for a long time... TA
Gareth Williams wrote:
Well if you are a unix/linux/os x user, drop to the command line, go
to the directory with all the php files, and type in:
grep php
or if your php
Hello Roger,
If you find a solution, I would also be interested to to see it. I
have tried almost everything to get Mac IE to not use the cache. It
just doesn't seem to accept anything.
On 18 Feb 2004, at 18:58, Roger Spears wrote:
Hello List,
I am using the following in a PHP script:
head
I'll second that one, I wrote a shell script in PHP to resize images,
using ImageMagicks mogrify
command, and it took ages. It's really much too slow for a web site.
If you need a faster solution, I think you have to buy something.
On 26 Feb 2004, at 09:15, Adam Bregenzer wrote:
On Thu, 2004-0
The function mysql_insert_id() will return the correct value.
On 26 Feb 2004, at 17:10, Brian Dunning wrote:
When I write a record to a MySQL db with an auto-incremented key
column, say it's called "id", what's the easy to retrieve that value?
Do I have to run a query?
--
PHP General Mailing
Try this:
function tes(selCtrl){
document.write('JavaScript');
window.location.replace('http://192.168.23.1/coba/coba.php?
vtes='+selCtrl.value);
}
or this:
function tes(){
selCtrl = document.getElementById('vtes');
document.write('JavaScript');
window.location.replace('http://192.168.23.1
I had programmed for years in OO, and when I learned PHP, it only
seemed natural to stay with it. I personally find the OO functionality
in PHP to be not quite complete, but good enough for daily use. In
fact, I don't write any sites in a non-oo manner. I love it.
On 28 Feb 2004, at 22:58,
The easiest language to learn for Windows is Visual Basic. You can get
a simple gui app up and running in minutes.
On 8 Mar 2004, at 14:40, Jay Blanchard wrote:
[snip]
I have been working with PHP for a few years now, and I feel very
comfortable with it. I am considering branching out into wind
Try this:
class base_object()
{
function base_object()
{
echo "I'm the base";
}
function base_test()
{
echo "I'm the base test";
}
}
class extended_object() extends base_object
{
function extended_object()
You could try chown user:group, where user and group are those apache
runs in.
Is this script running on your own machine, or on a web server hosted
somewhere?
On 1 Dec 2004, at 09:03, Michael Leung wrote:
Hi all,
I am still solving my upload script problems.
Here is the error Msg:
"Warning:
No
On 1 Dec 2004, at 15:37, abrea wrote:
Will the adoption and legalization of software patents actually
threaten the
activity of PHP software developers?
I see some people quite worried about this, e.g. at
http://www.knoppix.org
and http://swpat.ffii.org/index.en.html
Alberto Brea
--
PHP General
Try
$string = mysql_real_escape_string($string);
On 7 Dec 2004, at 14:12, Shaun wrote:
Hi,
I have been investigating the problem of apostrphes in a mysql insert /
update. I use a db_query function for all my queries:
function db_query($query) {
$qid = mysql_query($query);
return $qid;
}
It app
What happens is (if I understand it correctly):
First, PHP sets $i to equal 0, and then immediately sets $i to
$months_arr_length.
Every time the loop executes, it resets $1 to $months_arr_length, so
you are stuck in an infinite loop.
The reason behind this is you are using assignment equals (=
Because you prefer it?
Seriously, you should choose what you are most happy with. Both work
fine, although, PHP rocks!
On 11 Dec 2004, at 10:11, Peter Lauri wrote:
Best groupmember,
Why should I choose PHP instead of JSP/Servlets when it comes to
develop a
high-traffic site. Assume that the inf
$result = mysql_query("SELECT name, description FROM table");
while ($row = mysql_fetch_assoc($result))
{
echo "{$row['name']}$row['description']";
}
On 14 Dec 2004, at 16:52, Steve Marquez wrote:
Greetings. I am trying to display looped information from a MySQL
database
in a PHP file.
Lo
In the else part, you have the possibility to echo to the screen and
later on, then header("Location: ...");
This is the bit which isn't allowed.
If you are doing header("Location: ...");, you are not allowed to echo
before it.
On 18 Dec 2004, at 11:52, Ahmed Abdel-Aliem wrote:
Dear Groups memb
42 matches
Mail list logo