php-general Digest 31 Mar 2003 07:40:57 -0000 Issue 1970

2003-03-30 Thread php-general-digest-help
php-general Digest 31 Mar 2003 07:40:57 - Issue 1970 Topics (messages 141647 through 141680): issue with connecting to DB 141647 by: Jennifer Fountain 141663 by: Joel Colombo Re: accessing result-set with associative array 141648 by: Leif K-Brooks Re: Ereg question

Re: [PHP] require/include from a different directory

2003-03-30 Thread Tim Burden
The call to include() must be relative to one of the directories listed in open_basedir, regardless of which file the call is made from. Usually the dir mentioned in open_basedir is the docroot, so in your case require "include/inc_file.php"; should work from any file, in any folder. - Orig

Re: [PHP] Ereg question

2003-03-30 Thread Peter Houchin
Beauford, Jason, Build a bridge and get over it already sheeesh TYVMIA Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
This likely won't get through, but if it does. Post a real address so these conversations don't go through the list. I mean I'm already a burden to the list as it is. B. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 31, 2003 1:36 A

Re: [PHP] Ereg question

2003-03-30 Thread Jason Wong
On Monday 31 March 2003 13:58, Beauford wrote: > I posted the information as I had it. I had no idea what the problem was > and posted the information I thought was FULL and ACCURATE - Full and accurate if taken literally are absolute terms and are objective not subjective. > if this isn't > g

Re: [PHP] what could be wrong

2003-03-30 Thread Haseeb Iqbal
thanx everyone i got it the problem was i was opening connection with OP_HALFOPEN Friendship is always a sweet responsibility, never an opportunity. HaSeEb IqBaL. 0300-4258030 - Original Message - From: "Haseeb Iqbal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 01

[PHP] what could be wrong

2003-03-30 Thread Haseeb Iqbal
i am doing this $arr=imap_sort($pIMAP,1,1); and getting this error Notice: (null)(): Error in IMAP command received by server. (errflg=2) in Unknown on line 0 what could be wrong here regards Friendship is always a sweet responsibility, never an opportunity. HaSeEb IqBaL. 0300-4258030 -- PHP Ge

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
I posted the information as I had it. I had no idea what the problem was and posted the information I thought was FULL and ACCURATE - if this isn't good enough - then maybe I'll look for another list where people are a little more forgiving of new users. Remember, you were in my shoes once. B. --

Re: [PHP] GNU & Open Source

2003-03-30 Thread Manuel Lemos
Hello, On 03/31/2003 01:05 AM, Rasmus Lerdorf wrote: This is a list for questions about PHP. Look in the titlebar of your browser when you go to www.php.net to see what the acronym stands for. Beyond that, please take this stuff somewhere else. He was asking *where* PHP stands (regarding licenses

Re: [PHP] Ereg question

2003-03-30 Thread Jason Wong
On Monday 31 March 2003 04:15, Beauford wrote: > Just some more information. It appears that the session variable > $formsave["dob"] is causing the problem. If I echo the input $_POST['dob'] > it shows correctly, but when it's put into $formsave["dob"] the leading > and ending 0's are being stripp

Re: [PHP] GNU & Open Source

2003-03-30 Thread Rasmus Lerdorf
This is a list for questions about PHP. Look in the titlebar of your browser when you go to www.php.net to see what the acronym stands for. Beyond that, please take this stuff somewhere else. -Rasmus On Sun, 30 Mar 2003, John Taylor-Johnston wrote: > Where does PHP.net stand? Is it GNU or OpenS

[PHP] GNU & Open Source

2003-03-30 Thread John Taylor-Johnston
Where does PHP.net stand? Is it GNU or OpenSource or both? What's the difference between www.GNU.org and www.OpenSource.org? I have been reading: http://www.oreilly.com/catalog/opensources/book/intro.html but don't get what DiBona, Ockman & Stone mean. OpenSource permits folks like RedHat to distr

Re: [PHP] Parsing CSS files

2003-03-30 Thread Sebastian
if you have cpanel you can add the extension from there. cheers, - Sebastian - Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> Is there any way of making PHP parse files with a CSS extension? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

RE: [PHP] Ereg question

2003-03-30 Thread John W. Holmes
> I thought trim only stripped white space.?. $formsave['dob'] is a > session variable. I have also found now that leading 0's are also being > stripped. > > foreach($HTTP_POST_VARS as $varname => $value) > $formsave[$varname] = trim($value, 50); > > If it's not there then the whole

RE: [PHP] Problems with post data

2003-03-30 Thread John W. Holmes
> Does this bug also applies to passing variables in an URL. > > I'v noticed that when the directive register_globals is set to off as it > is > recommended in the php.ini file no variables are passed on to other pages. > Switching it to on would be the simplest solution, but scripts like > phpMy

RE: [PHP] PHP, ASP, IIS and MySQL

2003-03-30 Thread John W. Holmes
> My questions for you: > 1) Is there a penelty/drawback when coding PHP instead of ASP on IIS > (towards MySQL)? No, not really. I'm sure ASP has some little tricks built in that you'd have to recreate in PHP, but the two are basically the same, regardless of the OS. > 2) Do you see any problems

RE: [PHP] Parsing CSS files

2003-03-30 Thread John W. Holmes
> Is there any way of making PHP parse files with a CSS extension? Yeah... the same way you made your web server parse files with a .php extension. Just repeat the same procedure for a .css extension. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy to

[PHP] Parsing CSS files

2003-03-30 Thread Liam Gibbs
Is there any way of making PHP parse files with a CSS extension?

[PHP] Re: issue with connecting to DB

2003-03-30 Thread Joel Colombo
did u change the password with 'phpmyadmin' ? u did ? ok then restart mysql the passwords load when mysql starts up... at least when u change it via 'phpmyadmin' havent played much with command line password mods... may not need the restart. i just pounded my head with the prob last week... ru

[PHP] Parsing XML CDATA errors?

2003-03-30 Thread Toby Coleridge
I am trying to parse an XML file that looks like the following snippet: 12/03/03 New benefits to members however it will not parse (doesnt display anything) when I put the CDATA line on

Re: [PHP] Sessions and iframes (or frames)?

2003-03-30 Thread Justin French
My advice is to first get REALLY comfortable with sessions in a non-framed environment... get a grip on logging in, logging out, showing different code for logged in members, restricting a user from doing something more than once, etc etc. THEN try to get it happening in a framed environment. As

Re: [PHP] Problems with post data

2003-03-30 Thread Chris Shiflett
Frank, John's answer applies to Apache 2.44 as well. I'm not sure how you interpreted his advice against using Apache 2 to mean that an upgrade would solve your problem. He recommended using the latest Apache 1.3.x. The likely reason you are having trouble with register_globals is that you need t

RE: [PHP] Test tables existance

2003-03-30 Thread Don Read
On 30-Mar-2003 Antti wrote: > How do I test if a mysql table exists or not? Is there a function for > this? I didn't find a good one. > > -antti function tableexists($tbl) { $res = @mysql_query("SELECT 1 FROM $tbl LIMIT 1"); return ($res ? true : false); } Regards, -- Don Read

Re: [PHP] Test tables existance

2003-03-30 Thread Haseeb Iqbal
use mysql_query("show tables"); get them in array and then scan the array thats what i would do if there isn;t any function Friendship is always a sweet responsibility, never an opportunity. HaSeEb IqBaL. 0300-4258030 - Original Message - From: "Antti" <[EMAIL PROTECTED]> To: <[EMAIL PR

Re: [PHP] Problems with post data

2003-03-30 Thread Haseeb Iqbal
hi, i have seen some script using a unique method.they grab all the global variables in a array and then unset the global variables.ofcourse they are not handling file uploads.i think its a good idea if you are not uploading files. any suggestions are welcome Haseeb >I'v noticed that when the d

Re: [PHP] Test tables existance

2003-03-30 Thread Miles Thompson
Come on, check the mysql section of the PHP manual ... this took about 20 sec http://www.php.net/manual/en/function.mysql-list-tables.php At 11:34 PM 3/30/2003 +0300, Antti wrote: How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti -- PHP

[PHP] PHP, ASP, IIS and MySQL

2003-03-30 Thread Jesper Blomström
Hi! I hope this is the right place to ask this kind of question, otherwise I apologize. I would like some advice, this is the situation: We´re using IIS today and unfortunate we will have to cope with this situation for a long time ahead. There are plans for using Apache on Linux but not right

[PHP] Test tables existance

2003-03-30 Thread Antti
How do I test if a mysql table exists or not? Is there a function for this? I didn't find a good one. -antti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with post data

2003-03-30 Thread Frank
Does this bug also applies to passing variables in an URL. I'v noticed that when the directive register_globals is set to off as it is recommended in the php.ini file no variables are passed on to other pages. Switching it to on would be the simplest solution, but scripts like phpMyAdmin do not s

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
Just some more information. It appears that the session variable $formsave["dob"] is causing the problem. If I echo the input $_POST['dob'] it shows correctly, but when it's put into $formsave["dob"] the leading and ending 0's are being stripped. B. - Original Message - From: "John W. Ho

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
This is what I get when I echo $formsave["dob"] - 9/09/199. It was inputted as 09/09/1990. B. - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Beauford'" <[EMAIL PROTECTED]>; "'PHP General'" <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 2:28 PM Subject: RE: [PHP]

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
$parts has been removed as I found I didn't need it there, but the problem still exists. This part of code however may be causing the problem, although I thought trim only stripped white space.?. $formsave['dob'] is a session variable. I have also found now that leading 0's are also being st

RE: [PHP] Ereg question

2003-03-30 Thread John W. Holmes
> I am using ereg to validate the format of a date entry (mm/dd/yy), but if > the year ends in a 0, it is being stripped and as such produces an error. > So > 1990 would be 199. The dob is being inputted by a form > > Here is my code: > > if (!ereg("^([0-9]{2})/([0-9]{2})/([0-9]{4})$", $form

Re: [PHP] accessing result-set with associative array

2003-03-30 Thread Leif K-Brooks
It doesn't include the table name. Use name, albumid, etc. anders thoresson wrote: Hi, I've the query "SELECT albums.name, albums.albumid, accessrights.albumid, accessrights.userid FROM albums, accessrights WHERE accessrights.userid = '$id' AND albums.albumid = accessrights.albumid". It wor

[PHP] issue with connecting to DB

2003-03-30 Thread Jennifer Fountain
Here is the code:       $link = mysql_connect("xxx", "x", "x")    or die("Could not connect: " . mysql_error());    print ("Connected successfully");    mysql_close($link);?>     WhenI try to connect, I get the following error:   Warning: mysql_connect() [function.mysql-connect]: Ac

php-general Digest 30 Mar 2003 18:57:24 -0000 Issue 1969

2003-03-30 Thread php-general-digest-help
php-general Digest 30 Mar 2003 18:57:24 - Issue 1969 Topics (messages 141628 through 141646): Re: Adding a URL 141628 by: Don Read 141629 by: Hugh Danaher Question 141630 by: Marius 141631 by: Kevin Waterson 141632 by: Julien Wadin 141633 by:

[PHP] accessing result-set with associative array

2003-03-30 Thread anders thoresson
Hi, I've the query "SELECT albums.name, albums.albumid, accessrights.albumid, accessrights.userid FROM albums, accessrights WHERE accessrights.userid = '$id' AND albums.albumid = accessrights.albumid". It works allright. Using the result in a html -tag this way works: while($row = mysq

RE: [PHP] Sessions and iframes (or frames)?

2003-03-30 Thread John W. Holmes
> I built this site using using different iframes: one for a login, other > for > a forum, another for a voting poll, etc... > > I was wondering what is the best way to ensure that you could only post a > topic in the forum, or vote if you had already logged in. > > I'm somewhat familiar with the

[PHP] Sessions and iframes (or frames)?

2003-03-30 Thread Tiago Simões
Hello. I built this site using using different iframes: one for a login, other for a forum, another for a voting poll, etc... I was wondering what is the best way to ensure that you could only post a topic in the forum, or vote if you had already logged in. I'm somewhat familiar with the $_sess

[PHP] Ereg question

2003-03-30 Thread Beauford
I am using ereg to validate the format of a date entry (mm/dd/yy), but if the year ends in a 0, it is being stripped and as such produces an error. So 1990 would be 199. The dob is being inputted by a form Here is my code: if (!ereg("^([0-9]{2})/([0-9]{2})/([0-9]{4})$", $formsave["dob"], $pa

Re: [PHP] PHP and Visual Studio.Net

2003-03-30 Thread Steven Kallstrom
Ulrik, For PHP editing in Visual Studio .NET... http://www.quake-au.net/php/php_and_vsdotnet.htm SJK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question

2003-03-30 Thread skate
ahkay, makes perfect sense now :) thanks - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "skate" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 2:19 PM Subject: Re: [PHP] question > > On 30-Mar-2003 skate wrote: > > excuse me for being dumb, but ca

Re: [PHP] preg_replace_callback and brackets

2003-03-30 Thread Marek Kilimajer
Maybe you should use /\b/ word boundary instead of all the or's Joshua Moore-Oliva wrote: I'm kind of confused right now... when I call preg_replace_callback with a regular expression with brackets, sometimes I get an array back with multiple elements like array(3) { [0]=> string(19)

[PHP] PHP and Visual Studio.Net

2003-03-30 Thread Ulrik
Hello, maybe somebody can help me. I am involved in a web project for the first time now and I'd like to keep my current development environment, Visual Studio.Net. Is there any way to incorporate PHP Syntax highlighting into Visual Studio.Net or Visual Studio 6.0??? In 6.0, I can choose to handl

Re: [PHP] question

2003-03-30 Thread Don Read
On 30-Mar-2003 skate wrote: > excuse me for being dumb, but can you explain this line for me? > > if (! (++$i % 2)) > If $i is evenly divisible by 2 then ($i % 2) evaluates to 0 or (false). The (! ($i % 2)) inverts the meaning to (true) so the statements within the if block are executed. The +

Re: [PHP] question

2003-03-30 Thread skate
excuse me for being dumb, but can you explain this line for me? if (! (++$i % 2)) i've done scripts like this before, but never used anything like this? but then i never was a great coder :) thanks - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "Marius" <[EMAIL PROTECTED]

RE: [PHP] question

2003-03-30 Thread Don Read
On 30-Mar-2003 Marius wrote: >$i = 0; > $list = array('Banana', 'Strawberry', 'Apple', 'Cherry'); > echo $list[$i]; > $i = $i+1; > ?> > > how to do that 2 of key echoes in first table colum and other 2 in > second colum? > Method 1: $i=0; echo ' foreach($list as $v) { echo $v,

Re: [PHP] Theme selector?

2003-03-30 Thread Lars Tvedt
i would have used templates: heres one http://smarty.php.net "Liam Gibbs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hello, can anyone help me with a php theme selector? I want it like when > > the seletect a theme ?theme=green that it will go into a directory and > > load gree

RE: [PHP] upload question

2003-03-30 Thread Dan Rossi
err its "open with" actually -Original Message- From: Hugh Danaher [mailto:[EMAIL PROTECTED] Sent: Sunday, March 30, 2003 2:04 PM To: Anthony Ritter Cc: [EMAIL PROTECTED] Subject: Re: [PHP] upload question Sounds like a Windows configuration issue and not a php issue. There's an 'open u

[PHP] question

2003-03-30 Thread Marius
how to do that 2 of key echoes in first table colum and other 2 in second colum? -- Marius [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Question

2003-03-30 Thread Julien Wadin
just do that : to have Banana : $a = ereg_replace("-","",$list[0]); to have Ba na na $b = ereg_replace("-"," ",$list[0]); Bye __ WADIN JULIEN URL : www.campinfm.be.tf -Message d'origine- De : Marius [mailto:[EMAIL PROTEC

Re: [PHP] Question

2003-03-30 Thread Kevin Waterson
This one time, at band camp, Marius <[EMAIL PROTECTED]> wrote: >$list = array ('Ba-na-na', 'Ber-ry'); > echo ""; > echo $list['0']; > echo ""; > ?> > how i can get "Ba-na-na" in url and "Banana" or "Ba na na" in echo ? $list = array('Ba-na-na', 'Ber-ry'); echo ''.str_replace('-','',$lis

[PHP] Question

2003-03-30 Thread Marius
"; echo $list['0']; echo ""; ?> how i can get "Ba-na-na" in url and "Banana" or "Ba na na" in echo ? -- Marius [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Adding a URL

2003-03-30 Thread Hugh Danaher
Scott, try changing: print "\t\t$col_value\n"; to: print "\t\tmailto:".$col_value.";>$col_value\n"; Hope this helps. Hugh - Original Message - From: "Scott Thompson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 29, 2003 8:53 PM Subject: [PHP] Adding a URL > Hi, >