RE: [PHP-DB] Pear with PHP

2003-02-19 Thread Clarkson, Nick


Start here - http://pear.php.net/packages.php. I'm only just looking at it
myself, but the docs are on there too.

Good luck

Nick

-Original Message-
From: Neil [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2003 11:09
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pear with PHP


Hi,

How do you install pear db to work with PHP. having a problem with certain
applications needing pear. How and where do I get the program and
installation instructions.

Thank you all
Neil


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Pear with PHP

2003-02-19 Thread Clarkson, Nick


Sorry, should have been more specific with my last reply;

Base PEAR package - http://pear.php.net/package-info.php?pacid=14
Additional packages - http://pear.php.net/packages.php

Sorry about that.

Nick


-Original Message-
From: Neil [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2003 11:09
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pear with PHP


Hi,

How do you install pear db to work with PHP. having a problem with certain
applications needing pear. How and where do I get the program and
installation instructions.

Thank you all
Neil


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: Re[2]: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-18 Thread Clarkson, Nick

I believe if you put OR instead of || it will work OK as originally posted..

ie mysql_query(SELECT * FROM SOME_TABLE) OR die(

Nick

-Original Message-
From: Max 'AMiGo' Gashkov [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2003 08:42
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP-DB] More help with mysql -- solved (bizarre)


OK, now I see 8)

$result  after  your operations contains not SQL result, it's value is 1
(logical
TRUE)  -- result of logical operation

mysql_query(SELECT * FROM SOME_TABLE) || die(



If you want to exit after error try this construction:

if(!mysql_query(SELECT * FROM SOME_TABLE))
{
   die(
};

EM If I remove the '|| die' part from the mysql_query() statement, it works
EM fine. This is bizarre, but there it is.

EM ie, if I have:

EM $result = mysql_query(SELECT * FROM SOME_TABLE);

EM it works.

EM If I have:

EM $result = mysql_query(SELECT * FROM SOME_TABLE) || die (Unable to
execute
EM SQL query);

EM it doesn't work. It gives me:  Supplied argument is not a valid MySQL
EM result resource

EM Anyway, since it works I don't suppose I should complain, but it seems
EM pretty weird to me nevertheless.



WBR, Max 'AMiGo' Gashkov
[EMAIL PROTECTED] ]=[ http://diary.otaku.ru/amigo
Distributed.net participant [408228][RC5-72]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Session variables when global variables switched off [Sorry, firs t message accidentally fired off to quickly ]

2003-02-18 Thread Clarkson, Nick

Try changing your code to 

if ($_SESSION['verified'] != yes){

I think that's the problem

Nick



-Original Message-
From: Baumgartner Jeffrey [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2003 11:20
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Session variables when global variables switched off
[Sorry, firs t message accidentally fired off to quickly ]


[sorry for the incomplete posting of a couple moments ago. I hit ctl
something or other and outlook fired off the e-mail against my wishes!]

I am making a section on a web site which requires that visitors log-in.
Log-in, password, etc are in an MySQL table. I am using (via a web host) PHP
4.2.2 with global variables turned off. Until now, I have worked with a
different host in which global variables were switched on.

The way it works
The user logs in at index.php. When she does so successfully, index.php
returns a menu of links. However, if she clicks on any of those links, which
are different pages, she gets a please log-in first message because each
page includes...

if ($_SESSION['verified']  yes){
echo Pa href='index.php'Please log in first/a/P;
exit();
}

Returning to index.php requires a log-in again.

So, it seems the session variable is not being sent being sent between
pages, although it works within the same page. I expect I am missing
something obvious. I've made this kind of thing work with global variables
on - so I assume I am misunderstanding something related to lack of global
variables. 

I use 

session_start(); 

at the top of all pages and  

session_register($_SESSION['okbabe']); 

on index.php.

Your enlightenment will be highly appreciated.

Jeffrey Baumgartner


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Preserving form field values between pages/tags

2003-02-18 Thread Clarkson, Nick

Here's an example to get you started - created 2 files as below, 1.html and
2.php

The important bit is value=?php echo $_POST['username'];?


Nick


FILE : 1.html

html
form action=2.php method=post
input type=text name=username size=40 maxlength=256
input type=submit value=submit

/form

/html


FILE : 2.php

html
form action=2.php method=post
Name : input type=text name=username value=?php echo
$_POST['username'];?size=40 maxlength=256
Address : input type=text name=test size=40 maxlength=256
input type=submit value=submit

/form

/html

-Original Message-
From: news [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2003 11:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Preserving form field values between pages/tags


Hi,

I'm building a form page that has 3 tags for different types of fields (i.e.
Personal details, location details, other).  I want to preserve the values
of the filled in fields as the user moves from section/tag to section/tag.
I've tried making each tag a separate page and use the URL to pass values,
as well as put it all on one page and hide fields (which became more trouble
than it was worth!).

Does anyone have a more practical/useful way of preserving field values from
page-to-page... or hiding fields as a user clicks on each tag?

Thanks,

-Nelson



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL problem -- new to PHP

2003-02-13 Thread Clarkson, Nick

Looks like is to do with MySQL permissions. Check your host's (the one you
are trying to connect from) permissions to the server.

To change permissions, from the MySQL prompt type;

GRANT ALL ON * TO username@host IDENTIFIED BY password;

Substitute in username, host and password for your ones.

Easier to use PHPMyAdmin or SQLYog (www.sqlyog.com) if you're new to it. I'm
pretty new, so learning all the time.

A couple of links to get you started;
http://www.mysql.com/doc/en/GRANT.html
http://www.mysql.com/doc/en/GRANT.html

Good luck,

Nick



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 13:20
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL problem -- new to PHP


Hi all

I am new to PHP (just basically started yesterday). I am currently having a
problem connecting to a MySQL database.

My sample code is:

--
?php
mysql_connect(localhost,username,password) or die (Unable to connect to
MySQL server.);
$db = mysql_select_db(DB_NAME) or die (Unable to select requested
database.);
?
---

This throws the following error:

---
Warning: MySQL Connection Failed: Host 'my.host.name' is not allowed to
connect to this MySQL server
---

Now, the mySQL server and the web server reside on the same machine. This
warning is therefore saying that this machine does not have permission to
connect to itself. Hmm. I have put entries in the host table and the user
table, using both hostname and ip address, but no luck. I keep getting the
same error.

What am I doing wrong?

Any and all help appreciated.

Thanks

Evan Morris
[EMAIL PROTECTED]
+27 11 792 2777 (tel)
+27 11 792 2711 (fax)



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL problem -- new to PHP

2003-02-13 Thread Clarkson, Nick

PHPMyAdmin is just a web-based tool for administering MySQL and it's pretty
intuitive, assuming you've used similar tools before. You can download it
and read more here http://www.phpwizard.net/projects/phpMyAdmin/

I would recommend SQLYog as an alternative;
http://www.webyog.com/sqlyog/index.html as it's VERY intuitive and pretty
simple to use.

But then you can't beat going straight into the MySQL prompt and learning
from there

Here are some good links for tutorials and examples;

www.php.net and www.mysql.com for searching on specific functions - unless
you have the memory of a few Cray computers ;o)

http://www.evilwalrus.com
http://www.zend.com/zend/tut/
http://www.devshed.com/Server_Side/MySQL/
http://www.devshed.com/Server_Side/PHP/

There are tons out there, but they are good starting points.

Good luck,

Nick




-Original Message-
From: Mark Loewenberg [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 14:01
To: Clarkson, Nick
Subject: Re: [PHP-DB] MySQL problem -- new to PHP


Well you opened up my question!  Do you know where to learn PHPMyAdmin?

Thanks in advance,

Mark

Clarkson, Nick wrote:

Looks like is to do with MySQL permissions. Check your host's (the one you
are trying to connect from) permissions to the server.

To change permissions, from the MySQL prompt type;

GRANT ALL ON * TO username@host IDENTIFIED BY password;

Substitute in username, host and password for your ones.

Easier to use PHPMyAdmin or SQLYog (www.sqlyog.com) if you're new to it.
I'm
pretty new, so learning all the time.

A couple of links to get you started;
http://www.mysql.com/doc/en/GRANT.html
http://www.mysql.com/doc/en/GRANT.html

Good luck,

Nick



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 13:20
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL problem -- new to PHP


Hi all

I am new to PHP (just basically started yesterday). I am currently having a
problem connecting to a MySQL database.

My sample code is:

--
?php
mysql_connect(localhost,username,password) or die (Unable to connect
to
MySQL server.);
$db = mysql_select_db(DB_NAME) or die (Unable to select requested
database.);
?
---

This throws the following error:

---
Warning: MySQL Connection Failed: Host 'my.host.name' is not allowed to
connect to this MySQL server
---

Now, the mySQL server and the web server reside on the same machine. This
warning is therefore saying that this machine does not have permission to
connect to itself. Hmm. I have put entries in the host table and the user
table, using both hostname and ip address, but no luck. I keep getting the
same error.

What am I doing wrong?

Any and all help appreciated.

Thanks

Evan Morris
[EMAIL PROTECTED]
+27 11 792 2777 (tel)
+27 11 792 2711 (fax)



  


-- 

Mark Loewenberg
770 428 1071
[EMAIL PROTECTED]
http://www.ITSbiz.net

Affordable Website Design
Website Hosting @ $9.95/month

ITSbiz also provides:
IT Solutions
Phone Systems
Phone  Data Wiring Services




This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php