[PHP-DB] extracting unique entries from mysql dbase

2002-09-12 Thread Godzilla

Hi everyone,

I have a mysql row similar to the list below. What I need to do is have php
output a link list from this.

I'm new to php but in my head I picture something like:
LINK TEXT";
}
?>

The links will be on the same page thus the $php_self. The script will take
a GET variable called "category" to display the proper items from the dbase.
It's the foreach statment or whatever it should be that I need a bit of help
with.

Any ideas would be greatly appreciated!

Thanks,
Tim


Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Classic Hand-Tuned Collection - Songbirds
Wind Chimes - Constellations
Wind Chimes - Constellations
Wind Chimes - Constellations
Wind Chimes - Constellations
Wind Chimes - Duets
Wind Chimes - Duets
Wind Chimes - Duets
Wind Chimes - Duets
Wind Chimes - Energy Chimes
Wind Chimes - Energy Chimes
Wind Chimes - Energy Chimes
Wind Chimes - Energy Chimes
Wind Chimes - Energy Chimes
Wind Chimes - Geotunes
Wind Chimes - Geotunes
Wind Chimes - Geotunes
Wind Chimes - Geotunes



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




Re: [PHP-DB] Sessions and their function

2002-09-12 Thread nikos

You sould register sessions first, and if have been registered, are passing
with session_start() in each page at the top, before the  tag..

If you want to pass variables from a page to another, put them in the url:
test.php?var=3&name=george (e.g.)

Be sure that the page you refer is dynamic (.php)

-

- Original Message -
From: "LOUD, Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 12:02 PM
Subject: [PHP-DB] Sessions and their function


> Hi,
>
> I know this my sound stupid but here it goes..
>
> Can sessions be used to pass variables from one page to the next to create
> persistent data? I have this working to a certain extent but can only pass
a
> variable to my second page, but not from my second page onto the third.
Also
> in my second page I cannot change the value of this variable i.e. bob =
100
> on page 1, in page 2 I can display bob equalling 100 but then I want to a)
> alter the value of bob to 50 and b) send bob and its new value to third
> page. Can this be done by using sessions?
>
> Also how do you pass the session id of one page onto the next? do you pass
> it on the end of the page reference e.g.
>
> echo "";
>
> Any help would be grateful even if it was to tell me that I have got the
> wrong idea about sessions altogehter.
>
> Thanks
>
> Mark
>
>
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> confidential use of the above named recipient. If you are not the intended
> recipient or person responsible for delivering it to the intended
recipient,
> you have received this communication in error and must not distribute or
> copy it.  Please accept the sender's apologies, notify the sender
> immediately by return e-mail and delete this communication.  Thank you.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




Re: [PHP-DB] randomizing amounts of html displayed

2002-09-12 Thread Bas Jobsen



Op donderdag 12 september 2002 20:58, schreef Aaron Wolski:
> Hi All..
>
> Quick question and perhaps a suggestion/solution requst to the above
> topic. My brain is just not working :(
>
>
> I have a HTML table with 5 rows of data. I would like to randomly
> display 3 of the 5 rows when the page is accessed.
>
>
> For example:
>
>
>
>
>
> Row 1
>
>
> Row 2
>
> Row 3
>
> Row 4
>
> Row 5
>
>
> When the page is loaded only Row 1,2 and 4 are displayed. When someone
> else loads the page rows 2,4 and 5 are displayed.
>
> Any clues on how to make this possible??
>
> Thanks in advance for looking.
>
> Peace.
>
> Aaron

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




[PHP-DB] Help with special characters in Oracle 8i

2002-09-12 Thread Eric John Seneca

 Hello All,
I am running PHP 4.2 with Oracle 8.1.7. I am trying execute the following 
statement. 

insert into job_application values 
(NULL,'Unix','Mobile','Alabama','http://www.google.com/search?q=php+insert+oracle+special+characters\&hl=en\&lr=\&ie=UTF-8\&oe=UTF-8\&start=30\&sa=N','12-SEP-02');

As you can see I am trying to insert a url into the database and it keeps dying on the 
special characters in the url. I have tried executing the following command in 
SqlPlus( set escape \ ) and this sql statement works from command line. I cannot make 
this work from my php script. Any insight into this problem would be appreciated.

Eric Seneca


Re: [PHP-DB] php start-stop howto?

2002-09-12 Thread Warren Massengill

Hay! It worked.
A minor miracle...
Thanks


>From: Adam Williams <[EMAIL PROTECTED]>
>To: Warren Massengill <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [PHP-DB] php start-stop howto?
>Date: Thu, 12 Sep 2002 13:19:03 -0500 (CDT)
>
>look in /etc/httpd/conf/httpd.conf
>
>when you restart apache (/etc/rc.d/init.d/httpd restart) it restarts php
>because php is called by apache.
>
>   Adam
>
>On Thu, 12 Sep 2002, Warren Massengill wrote:
>
> > RedHat Linux 7.2 RPM installation included:
> > PostgreSQL 7.1.3
> > PHP 4.0.6
> >
> > Had no problem creating a database using pg but can't find the on/off 
>button
> > for php.
> >
> > PHP is installed in /usr/bin/php; /etc/php.ini; /usr/share/php
> >
> > I edited the php.ini file to specify a location for;
> > usr_dir =
> >
> > The manual for PHP 4.2 (I have 4.0) suggested uncommenting  extra module
> > lines in http.conf. I don't know if that is an Apache, Linux or PHP 
>file,
> > but I can't find it in any of them.
> >
> > If I just start typing the hello world script linux wants to execute it
> > after the first line. Put the entire script in an executable file and it
> > doesn't like that either.
> >
> > What do I do next?
> >
> > Thanks,
> > Warren
> >
> >
> >
> > _
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> >




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP-DB] randomizing amounts of html displayed

2002-09-12 Thread Aaron Wolski

Hi All..

Quick question and perhaps a suggestion/solution requst to the above
topic. My brain is just not working :(


I have a HTML table with 5 rows of data. I would like to randomly
display 3 of the 5 rows when the page is accessed.


For example:





Row 1


Row 2

Row 3

Row 4

Row 5


When the page is loaded only Row 1,2 and 4 are displayed. When someone
else loads the page rows 2,4 and 5 are displayed.

Any clues on how to make this possible??

Thanks in advance for looking.

Peace.

Aaron




Re: [PHP-DB] php start-stop howto?

2002-09-12 Thread Adam Williams

look in /etc/httpd/conf/httpd.conf

when you restart apache (/etc/rc.d/init.d/httpd restart) it restarts php
because php is called by apache.

Adam

On Thu, 12 Sep 2002, Warren Massengill wrote:

> RedHat Linux 7.2 RPM installation included:
> PostgreSQL 7.1.3
> PHP 4.0.6
>
> Had no problem creating a database using pg but can't find the on/off button
> for php.
>
> PHP is installed in /usr/bin/php; /etc/php.ini; /usr/share/php
>
> I edited the php.ini file to specify a location for;
> usr_dir =
>
> The manual for PHP 4.2 (I have 4.0) suggested uncommenting  extra module
> lines in http.conf. I don't know if that is an Apache, Linux or PHP file,
> but I can't find it in any of them.
>
> If I just start typing the hello world script linux wants to execute it
> after the first line. Put the entire script in an executable file and it
> doesn't like that either.
>
> What do I do next?
>
> Thanks,
> Warren
>
>
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
>


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




[PHP-DB] php start-stop howto?

2002-09-12 Thread Warren Massengill

RedHat Linux 7.2 RPM installation included:
PostgreSQL 7.1.3
PHP 4.0.6

Had no problem creating a database using pg but can't find the on/off button 
for php.

PHP is installed in /usr/bin/php; /etc/php.ini; /usr/share/php

I edited the php.ini file to specify a location for;
usr_dir =

The manual for PHP 4.2 (I have 4.0) suggested uncommenting  extra module 
lines in http.conf. I don't know if that is an Apache, Linux or PHP file, 
but I can't find it in any of them.

If I just start typing the hello world script linux wants to execute it 
after the first line. Put the entire script in an executable file and it 
doesn't like that either.

What do I do next?

Thanks,
Warren



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




RE: [PHP-DB] previous and next links with php postgresql

2002-09-12 Thread Chandler, Jacob R

http://www.webmasterbase.com/article/662

-Original Message-
From: Angelo Marcos Rigo [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 12, 2002 11:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] previous and next links with php postgresql


Hi 
I am trying to have previous and next links in my php script wich i make a select from 
a table. I am using  postgresql anybody has a link for a tutorial or a sample code 
doing this?

Ângelo Marcos Rigo
Webmaster Colégio Anchieta
http://www.colegioanchieta.g12.br


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


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




[PHP-DB] previous and next links with php postgresql

2002-09-12 Thread Angelo Marcos Rigo

Hi 
I am trying to have previous and next links in my php script
wich i make a select from a table. I am using  postgresql
anybody has a link for a tutorial or a sample code doing this?

Ângelo Marcos Rigo
Webmaster Colégio Anchieta
http://www.colegioanchieta.g12.br


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




RE: [PHP-DB] LDAP?

2002-09-12 Thread Ryan Jameson (USA)

LDAP is a database IMHO... :-)
<>< Ryan

-Original Message-
From: Tony Earnshaw [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 9:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] LDAP?


Hi list!

Seen a lot of SQL stuff floating by, but my present, consuming interest
is Openldap.

Is this the right list, or should I subscribe to any other list?

Best,

Tony

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981



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




[PHP-DB] LDAP?

2002-09-12 Thread Tony Earnshaw

Hi list!

Seen a lot of SQL stuff floating by, but my present, consuming interest
is Openldap.

Is this the right list, or should I subscribe to any other list?

Best,

Tony

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981





signature.asc
Description: Dette er en digitalt signert meldingsdel


[PHP-DB] Getting LDAP schema

2002-09-12 Thread Dave Smith


Howdy. I'm working on a PHP-based alternative to GQ, and it is coming 
along very nicely thanks to PHP's genius. I have run into an obstacle, 
though, and that is getting LDAP schema. I'd like to use the ldap_search() 
function or some alternative to capture the schema for an LDAP server so I 
can list available attributes for each object. I can do this sort of thing 
with OpenLDAP's ldapsearch on the command line but I can't figure out how 
to formulate my request with PHP's ldap_search(). Any ideas?

Thanks,
Dave


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




[PHP-DB] sendmail

2002-09-12 Thread Bartłomiej Pawlik

Hi
Sorry to be off topic but I have problem with sendmail
If anyone know sth about sendmail please e-mail priv.

Sorry once more

[EMAIL PROTECTED]



Re: [PHP-DB] PreCaching Db into Variables Slows it down?!??

2002-09-12 Thread M1tch

Cheers Patrick, I do keep them to a minimum, this is my 4th after the
session variables. And I intend it to be my last.

Andy

"Patrick Latour" <[EMAIL PROTECTED]> wrote in message
001801c25a09$99e9d840$[EMAIL PROTECTED]">news:001801c25a09$99e9d840$[EMAIL PROTECTED]...
> Not yet a big specialist of  PHP, but a rule that apply to nearly all
server
> side scripting languages, use global variables as less as you can.
>
> They simplify your programer's life, but on a server that is serving a lot
> of concurent sessions, it eats all the performances and ressources. It
does
> not explain your time problem, but it is my 2 cents before you place to
much
> stuff in global variables.
>
> Thanks and regards,
> Patrick
>
> - Original Message -
> From: "M1tch" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 11, 2002 8:36 PM
> Subject: [PHP-DB] PreCaching Db into Variables Slows it down?!??
>
>
> > Grrr!
> >
> > Just spent ages (well, 2hours) on a precaching system for my PHP code
that
> > didn't work out!
> > Hang on, I'll backtrack a bit...
> >
> > My website is using a php engine that picks at snippets of html from the
> > database, and builds them up to form the page.
> > A typical page may use 5 of these html snippets, each at maybe 5kb in
> size.
> >
> > I was sat thinking, looking at the debug-timer, and saw that the
templates
> > were one of the more time consuming aspects.
> > So I said, I know, I'll save the db a bit, and at the start of the
script,
> > read all the templates that I'll need into a global variable, and call
> them
> > from that.
> > Simple, 5 db calls put into 1, and templates taken out of memory.
> >
> > So why, oh why, has the time taken actually increased??? Does anyone
have
> > sufficient working knowledge of PHP to give me a hint at why this has
> > happened?
> >
> > Also, am I right in thinking that as the website hits increase, the db
> will
> > be put under increasing pressure, so it serves off better being called
> only
> > once instead of 5 times (Even though more data is taken out of it??).
> >
> > It's late, my eyes are blurring, and I'm annoyed. Very annoyed!
> >
> > Regards,
> > Andy
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002
>



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




RE: [PHP-DB] strange behavior

2002-09-12 Thread Aaron Wolski

Hi There,

I don't know if this is the actual problem.. But in your form action it
looks off.


  action="index.php?

Would produce something that looks like: index.php?123455667784332

What I think you WANT to do is...

action="index.php?SID=


When I need to put php code into a url (form or link) such as a
$rerturn_url I usual do something like:



This would produce a url like: index.php?type_index=3 (assuming the type
index selected was indeed 3) but you should understand what I mean.

Don't know if this helps you at all but figured I'd take a shot.

Regards,

Aaron


-Original Message-
From: Martin Adler [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 12, 2002 8:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] strange behavior


Hi,

i start a session on a entrypage with a form,
and i wonder about the output to the browser.
There appeared a input-field of the type hidden
with the session-name as name and the
session-id as value.
How can I switch this PHP-behavior off?

CODE

  
  



OUTPUT
...

  
  

...


greet
Martin




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


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




AW: [PHP-DB] strange behavior

2002-09-12 Thread Thomas Lamy

Hi,
this isn't essantially DB-related
It's a feature called transparent session id (activated at compile time with
--enable-trans-sid). No need for  in
most cases, as it is automatically added by PHP. And for the few times PHP
can not add session information, you may use the SID define, which is
automatically defined to session_name().session_id() if the user has turned
off cookies.

Read: http://php.net/session

Thomas

> -Ursprüngliche Nachricht-
> Von: Martin Adler [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 12. September 2002 14:34
> An: [EMAIL PROTECTED]
> Betreff: [PHP-DB] strange behavior
> 
> 
> Hi,
> 
> i start a session on a entrypage with a form,
> and i wonder about the output to the browser.
> There appeared a input-field of the type hidden
> with the session-name as name and the
> session-id as value.
> How can I switch this PHP-behavior off?
> 
> CODE
> 
>action="index.php?" method=post>
>   
> 
> 
> 
> OUTPUT
> ...
> 
>action="index.php?PHPSESSID=5ac37e23f46a3c2c1388201e3f4a951f"
> method="post"> value="5ac37e23f46a3c2c1388201e3f4a951f" />
>maxlength="15">
> 
> ...
> 
> 
> greet
> Martin
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP-DB] strange behavior

2002-09-12 Thread Martin Adler

Hi,

i start a session on a entrypage with a form,
and i wonder about the output to the browser.
There appeared a input-field of the type hidden
with the session-name as name and the
session-id as value.
How can I switch this PHP-behavior off?

CODE

  
  



OUTPUT
...

  
  

...


greet
Martin




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




[PHP-DB] Sessions and their function

2002-09-12 Thread LOUD, Mark

Hi,

I know this my sound stupid but here it goes..

Can sessions be used to pass variables from one page to the next to create
persistent data? I have this working to a certain extent but can only pass a
variable to my second page, but not from my second page onto the third. Also
in my second page I cannot change the value of this variable i.e. bob = 100
on page 1, in page 2 I can display bob equalling 100 but then I want to a)
alter the value of bob to 50 and b) send bob and its new value to third
page. Can this be done by using sessions?

Also how do you pass the session id of one page onto the next? do you pass
it on the end of the page reference e.g. 

echo "";

Any help would be grateful even if it was to tell me that I have got the
wrong idea about sessions altogehter.

Thanks

Mark



CONFIDENTIALITY NOTICE 
The information contained in this e-mail is intended only for the
confidential use of the above named recipient. If you are not the intended
recipient or person responsible for delivering it to the intended recipient,
you have received this communication in error and must not distribute or
copy it.  Please accept the sender's apologies, notify the sender
immediately by return e-mail and delete this communication.  Thank you. 

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




[PHP-DB] Re: Problem with dsn

2002-09-12 Thread Nick Gorham

Gian Michele wrote:
> I have installed on my computer :
> Apache 1.3
> Php 4.1.2
> Postgresql
> the rpm of odbc and the unixODBC.
> 
> I tried to connect to my database after done all configurations; I used 
> the function odbc_pconnect('name_of_my_database','','') and the system 
> gives me this error
> "Warning: SQL error: [unixODBC][Driver Manager]Data source name not 
> found, and no default driver specified, SQL state IM002 in SQLConnect in 
> /var/www/html/check_avviso2.php on line 5"
> 
> Does any body knows as set the DSN and the driver?
> 

Have a look in the docs on the unixODBC web site, there are details there.

You need to create a system DSN, and use the name of that DSN in your 
connect. Check that you can connect with isql before moving on to PHP.

--
Nick Gorham
Easysoft Limited


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