[PHP] Stripping characters.....

2002-04-28 Thread CDitty
Hello all, Does anyone have any snippets of code that will strip several characters from a string? I am trying to figure out how to do this without using 3 different if statement blocks. This is what I am looking for. ieUser email address is Chris Ditty [EMAIL PROTECTED] or Chris

[PHP] Re: Stripping characters.....

2002-04-28 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Cditty) wrote: ieUser email address is Chris Ditty [EMAIL PROTECTED] or Chris Ditty [EMAIL PROTECTED] I need to be able to strip the quotes and everything between them and the signs from the first one and then the name and the

[PHP] Re: Stripping characters.....

2002-04-28 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Cc Zona) wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Cditty) wrote: ieUser email address is Chris Ditty [EMAIL PROTECTED] or Chris Ditty [EMAIL PROTECTED] I need to be able to strip the quotes and everything

[PHP] Wrapping Text

2002-04-28 Thread Scott Reismanis
Hi PHP digest readers. Ok I have a problem and a question which I am certain many share and even a solution to my problem, however I wish to hear how you dealt with this issue to see if there is a better method. Ok for my problem, it is regarding a smilie system. Currently what happens is if

Re: [PHP] Stripping characters.....

2002-04-28 Thread Justin French
Clarification: So really, what you want to achieve is to ONLY have the email address? I'm POSITIVE there's a better way with ereg_replace(), but I haven't got time to experiment, and i'm no expert :) So, what I figured was that you would loop through the $email, and if the first char wasn't a ,

[PHP] Re: array question--help

2002-04-28 Thread Johan Holst Nielsen
Mark Pelillo wrote: I am a Newbie at PHP I am sure I am missing something small but... I am trying to create a form selection box which an alphabetically sort list of a unix group file. The group file has the format groupname::groupnumber: I have tried to create an array using the

[PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Simonk
I have made a php + mysql site and hosting in my own IIS server, but in my school network, The page didnt change when i changed the data in mysql server. I think is the cache problem, but i cant fix it even i tick the Update the page everytime when page load in IE. There is no such problem in any

Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread The_RadiX
You could use Headers to tell the browser to expire the page now.. header (Expires: Mon, 1 Jan 1990 05:00:00 GMT);// Date in the past header (Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always modified header (Cache-Control:

[PHP] The definitive source for PHP news, tutorials and articles (also, as XML)

2002-04-28 Thread Stefen Lars
Hello all I posted a link to Coding The Web (CodingTheWeb.com) a while ago as they had a channel dedicated to Google. It seems that they have updated the site a bit in the past few days and now have a news channel for PHP too. It is pretty cool:

[PHP] passing variables to scripts

2002-04-28 Thread Mark Gallagher
(yes, newbie - but I *have* tried everything I know, I swear) I'm trying to write a comments system for my site (because I think I can). Basically, the script receives the ID of a particular entry (the site is a blog) via ?entry_id=entry_id. It checks to see if there's a corresponding text

[PHP] Re: passing variables to scripts

2002-04-28 Thread Yuri Petro
Which version of PHP you're running? May be you need to set register_globals = On in your php.ini file. -- Kind regards, Yuri. www.AceHoster.com Quality web hosting Mark Gallagher [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (yes,

[PHP] date problem

2002-04-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all I have a field in MySQL db like this: date TIMESTAMP, and it looks pretty regular like this: 20020428011911 when I come to use php date(D M Y, $myTimeStamp) though I get TUE JAN 2038! I see something in the manual re this date but I'm

[PHP] failed query results

2002-04-28 Thread baldey_uk
Hello all, i am trying to query a mysql database to see if a customer all ready exists in a database and if so then use there customer id to insert data into another table. Can anyone tell me what valuse mysql returns if the query returns no value? i have the following code:

Re: [PHP] date problem

2002-04-28 Thread Richard Emery
First, the timestamp that is retrieved from mysql is NOT the same as is required for PHP. Second, do you REALLY wan the Day of the Week (Mon, Tue, Wed) or the date of the month (1,2,3,4,5,6,...)? Third, let Mysql do the conversion for you. For instance if you timestamp field is named mydate:

Re: [PHP] failed query results

2002-04-28 Thread Richard Emery
If no customers are found, then: if (mysql_num_rows($result1)==0) { print theres no such customer!; } - Original Message - From: baldey_uk [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Sunday, April 28, 2002 7:48 AM Subject: [PHP] failed query results Hello all, i am

[PHP] Re: date problem

2002-04-28 Thread Yuri Petro
You can include date formatting function in your SQL statement: DATE_FORMAT(date,format) http://www.mysql.com/doc/D/a/Date_and_time_functions.html -- Kind regards, Yuri. www.AceHoster.com Quality web hosting Nick Wilson [EMAIL PROTECTED] ???/ ? ?: [EMAIL

Re: [PHP] date problem

2002-04-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Richard Emery declared Third, let Mysql do the conversion for you. For instance if you timestamp field is named mydate: SELECT DATE_FORMAT(mydate,%e %b %Y) AS thedate FROM mytable Nice one, cheers Richard. I didn't know about

[PHP] HTML in PHP

2002-04-28 Thread Christian Ista
Hello, I have a newbie question for you. I do a query, I'd like to display the result but I'd like to go to a new line for each row. I use this code that's work : ?php for ($i = 0; $imysql_num_rows($result); $i++) { echo mysql_result($result,$i, NAME); } ? but this not work ?php

Re: [PHP] HTML in PHP

2002-04-28 Thread Andrew Brampton
echo mysql_result($result,$i, NAME);br should be: echo mysql_result($result,$i, NAME) . 'br'; Andrew - Original Message - From: Christian Ista [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 28, 2002 2:51 PM Subject: [PHP] HTML in PHP Hello, I have a newbie question

php-general Digest 28 Apr 2002 13:56:24 -0000 Issue 1313

2002-04-28 Thread php-general-digest-help
php-general Digest 28 Apr 2002 13:56:24 - Issue 1313 Topics (messages 94955 through 94983): Re: tutorial on global variables 94955 by: Jason Wong Re: Apache: SERVER_NAME gone? 94956 by: Jason Wong class PHP 94957 by: Peter 94961 by: John Holmes

[PHP] Changing field size

2002-04-28 Thread Anthony Rodriguez
I've a VARCHAR(4) field that I want to change to a VARCHAR(6) field. What would happen to the existing data in MySQL db? Thanks! Tony ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Changing field size

2002-04-28 Thread Richard Emery
First, your question belongs on the mysql mailing list, not PHP Second, did you try it yourself before asking? I guess not. Third, the data would not be effected - Original Message - From: Anthony Rodriguez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 28, 2002 8:09 AM

[PHP] Re: Changing field size

2002-04-28 Thread Yuri Petro
ALTER TABLE works by making a temporary copy of the original table. The alteration is performed on the copy, then the original table is deleted and the new one is renamed. This is done in such a way that all updates are automatically redirected to the new table without any failed updates. While

RE: [PHP] passing variables to scripts

2002-04-28 Thread John Holmes
Try $_GET[entry_id] or $HTTP_GET_VARS[entry_id], depending on your version of PHP. ---John Holmes... -Original Message- From: Mark Gallagher [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 4:04 AM To: [EMAIL PROTECTED] Subject: [PHP] passing variables to scripts (yes,

RE: [PHP] Wrapping Text

2002-04-28 Thread John Holmes
Wordwrap() might be a good solution for you, but it's probably more of a table design issue. The table needs some whitespace to break to a new line. If you are putting in a string of img...img...img... etc..then there's no where to break. Try putting a space before or after the img... when you

[PHP] Removing empty elements from an array

2002-04-28 Thread Craig Westerman
I have an array that contains several empty elements. What is simplest way to remove these elements? Array ( [0] = [1] = [2] = [3] = 16/Mar/02 [4] = [5] = 17/Mar/02 [6] = 18/Mar/02 [7] = 19/Mar/02 [8] = 20/Mar/02 [9] = 21/Mar/02 [10] = 22/Mar/02 [11] = 23/Mar/02 [12] = [13] = 24/Mar/02 [14] =

Re: [PHP] Removing empty elements from an array

2002-04-28 Thread Richard Emery
unset() ??? - Original Message - From: Craig Westerman [EMAIL PROTECTED] To: php-general-list [EMAIL PROTECTED] Sent: Sunday, April 28, 2002 9:36 AM Subject: [PHP] Removing empty elements from an array I have an array that contains several empty elements. What is simplest way to

Re: RE: [PHP] Wrapping Text

2002-04-28 Thread Scott Reismanis
Sorry I wasn't exactly clear on my explaination. I believe it is a table design issue because i tried putting spaces between the image tags. i.e. img ... img ... img ... img ... etc... and the table was still been stretched. my solution has since been to force a br (using wordwrap) but I

RE: [PHP] Removing empty elements from an array

2002-04-28 Thread Stuart Dallas
If $arr is your array, something like... foreach ($arr as $key=$val) { if (strlen($val) == 0) unset($arr[$key]); } HTH, Stuart -Original Message- From: Craig Westerman [mailto:[EMAIL PROTECTED]] Sent: 28 April 2002 15:37 To: php-general-list Subject: [PHP] Removing empty

RE: RE: [PHP] Wrapping Text

2002-04-28 Thread John Holmes
It should have a % for the width at least, and then it should wrap itself. ---John Holmes... -Original Message- From: Scott Reismanis [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 7:42 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP] Wrapping Text

Re: [PHP] Removing empty elements from an array

2002-04-28 Thread eric.coleman
function filter($array) { if ( !is_array($array) ) { die(Must be an array!); } foreach($array as $key = $value) { if($array[$key] == ) { unset($array[$key]); } } return($array); } - Original Message - From: Craig

RE: [PHP] Removing empty elements from an array

2002-04-28 Thread Matt Friedman
This is what you want. http://www.php.net/manual/en/function.array-filter.php Matt Friedman Web Applications Developer www.SpryNewMedia.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday April 28, 2002 10:57 AM To: Craig Westerman;

[PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely
Hello. I'm new to this list, though not new to PHP. I'm hoping that my question hasn't been answered a thousand times before, and I did at least search on NameVirtualHost and read all those archived messages before getting to this point. I have an Apache web server (1.0.38) that has been

Re: [PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Jason Wong
On Monday 29 April 2002 00:53, Greg Blakely wrote: I have an Apache web server (1.0.38) that has been peacefully co-existing with php4 for quite some time. I've interfaced it to mySQL, and life was great. Apache 1.0.38 How old is that? If you're really using such an old version you

Re: RE: [PHP] Wrapping Text

2002-04-28 Thread Jason Wong
On Monday 29 April 2002 01:53, John Holmes wrote: It should have a % for the width at least, and then it should wrap itself. Not necessarily, if you have a single 'word' (a string of characters with no space) that is very long then the width of the table stretches to accomodate the length of

Re: [PHP] date problem

2002-04-28 Thread Jason Wong
On Sunday 28 April 2002 21:10, Nick Wilson wrote: * and then Richard Emery declared Third, let Mysql do the conversion for you. For instance if you timestamp field is named mydate: SELECT DATE_FORMAT(mydate,%e %b %Y) AS thedate FROM mytable Nice one, cheers Richard. I didn't

Re: [PHP] failed query results

2002-04-28 Thread Jason Wong
On Sunday 28 April 2002 20:48, baldey_uk wrote: $customer_id_check=(SELECT id FROM $customer_table WHERE firstname = '$firstname' lastname = '$lastname' email = '$email'); $result1=mysql_query($customer_id_check); if (!$result1) {

RE: RE: [PHP] Wrapping Text

2002-04-28 Thread John Holmes
It should have a % for the width at least, and then it should wrap itself. Not necessarily, if you have a single 'word' (a string of characters with no space) that is very long then the width of the table stretches to accomodate the length of that 'word'. Right, that's why I told him

[PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread Yuri Petro
Can you indicate Apache settings regarding php and virtualhosts? -- Kind regards, Yuri. www.AceHoster.com Quality web hosting Greg Blakely [EMAIL PROTECTED] ???/ ? ?: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello. I'm new to this list, though not new to

[PHP] Weird/inconsistent behaviour when sending an empty file? (WAMP, Apache2, PHP 4.2.0)

2002-04-28 Thread Moritz Schallaboeck
Hi, it might very well be an ignorant oversight, but I can't explain the following behaviour. Consider a file containing -only- this code: -snip- ? ? -snip- As you can see, it doesn't do anything. It should return an empty file. However, what it does return is the following (copy/paste from

Re: [PHP] Sessions and Query String Variable Handling

2002-04-28 Thread Dennis Moore
Thanks for your assistance... I found three small errors that caused me the problem. 1. I had an extra line or space in my include file that defines all my functions after the '?' 2. I didn't realize that session_start returns an output. I assigned a variable to it. 3. I needed to passed

Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Simonk
I have added the code, but it turn out : Warning: Cannot add header information - headers already sent by (output started at C:\Inetpub\php\hospital_equipment.php:5) in C:\Inetpub\php\hospital_equipment.php on line 6 Warning: Cannot add header information - headers already sent by (output

RE: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Stuart Dallas
All header calls need to be made before any content is sent back to the browser. Try this... -- BEGIN CODE -- ?php header (Expires: Mon, 1 Jan 1990 05:00:00 GMT);// Date in the past header (Last-Modified: . gmdate(D, d M Y H:i:s) . GMT);

[PHP] PHP4.2.0 + Apache2 prints code

2002-04-28 Thread James Stuart
I've installed Apache 2.0.35 with PHP 4.2.0 on both FreeBSD and Linux, and both yield the same result. When the test.php page is accessed it returns ?php phpinfo(); ? instead of actually processing it. I have the lines: LoadModule php4_modulemodules/libphp4.so AddType

RE: [PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely
Jason Wong asked: Apache 1.0.38 How old is that? If you're really using such an old version you should first upgrade to something modern (1.3.X or the 2.0.X series). My bad. I queried the wrong httpd (/bin/httpd rather than /sbin/httpd). It's really 1.3.20 If I'd given it much

[PHP] i18n translation of PHP based forum

2002-04-28 Thread Ilia A.
Hello, I am one of the core developers of FUDforum, which is PHP based forum released under the GPL licence. The upcomming release of FUDforum 2.0 will contain i18n support and I am looking for people who would be willing to help translate the forum to other languages. If you want to help

[PHP] Autoload of cookies on Linux fails, Win32 works???

2002-04-28 Thread Joseph Smith
I'm confused.. Assuming I've got a cookie called loggedin defined as 12345 In 4.2.0 on Win32, my cookies are preloaded so when I do if (isset($loggedin)) echo $loggedin It checks to see if there is a variable named $loggedin that was created by autoloading of cookies, then it prints 12345

[PHP] Header question

2002-04-28 Thread Dean Ouellette
I have a tell a friend script and got the php script from a friend to make it work. I am a newbie so still do not fully udners stand it. Here is the problem, it puts the following at the top of each e-mail: X-Mailer: PHP/4.1.2 Here is the script: ?php $Subject = Look at this, I think you

[PHP] for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0

2002-04-28 Thread Don Tait
This is all I can get even when I paly with PHP windows include= Warning: Failed opening '/inetpub/wwwroot/test.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] (include_path='.;c:\php4\pear') in Unknown on line 0

2002-04-28 Thread Don Tait
Sorry Should do it all grin Using apache 1.3 for windoze and 4.2 php but can get it to fly best I can get even when I use Vins (fix it) is Warning: Failed opening '/inetpub/wwwroot/test.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0 -- PHP General Mailing List

RE: [PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely
Frenck advised: add this to your virutalhost tag: AddType application/x-httpd-php .php I did, and now browsers ask me if I want to download index.php... Do I need to activate the php module? I wonder why it worked before the NameVirtualHost, and now it doesn't... -- PHP General

RE: [PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely
Yuri Petro asked: Can you indicate Apache settings regarding php and virtualhosts? In the main server configuration area, I have: # The following is for PHP4 (conficts with PHP/FI, below): IfModule mod_php4.c AddType application/x-httpd-php .php4 .php3 .phtml .php AddType

RE: [PHP] class PHP

2002-04-28 Thread Miguel Cruz
Best I can figure, it's a very verbose description of a process analogous to using mod_rewrite to parse requests ending in .class and pass them off to a wrapper that instantiates the eponymous class (i.e., about 2 minutes of programming). But it was a little hard to get through, so I may have

Re: [PHP] Producing images in different sizes

2002-04-28 Thread php3
Addressed to: Miguel Cruz [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Miguel Cruz [EMAIL PROTECTED] Sat, 27 Apr 2002 19:11:46 -0500 (CDT) I'm guessing the issue is that it complicates the process of adding new images, because someone has to create and upload two

Re: [PHP] PGP

2002-04-28 Thread Miguel Cruz
On Sat, 27 Apr 2002, Richard Lynch wrote: $test = escapeshellarg($cleartext); exec(cat $test | /usr/bin/pgpe -a -t -f -r '[EMAIL PROTECTED]' . . . ^Kb^Estdin^H^@^@^@ $cleartext is the actual text? What if you used 'echo' instead of 'cat'? miguel -- PHP General Mailing List

Re: [PHP] Question

2002-04-28 Thread Miguel Cruz
On Sat, 27 Apr 2002, Gerard Samuel wrote: Is it possible to have PHP find out the ethernet's card MAC address?? I know that one can parse the output of dmesg or equvalent to find it out, but that would be OS platform specific code. I just want to know if php has a native way of finding out

[PHP] Re: Header question

2002-04-28 Thread Yuri Petro
Just replace the last line with: @mail ($To,$Subject,$Message,From: $EmailSender\nReply-To: $EmailSender); -- Kind regards, Yuri. www.AceHoster.com Quality web hosting Dean Ouellette [EMAIL PROTECTED] ???/ ? ?:

Re: [PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread Yuri Petro
You need to specify IP address in NameVirtualHost directive: NameVirtualHost 127.0.0.1 VirtualHost 127.0.0.1:80 DocumentRoot /home/tcrc/www/forum ServerName forum.tcrconline.com ErrorLog /home/tcrc/logs/error_log CustomLog /home/tcrc/logs/access_log combined /VirtualHost -- Kind

[PHP] GET question

2002-04-28 Thread Evan
Hi to all. I pass parameters via querystring in this way: page.php?ID=5ID=6ID=23 In $_GET[ID] I get only the value 23 I am surprised 'cause in ASP I get 5,6,23. Is there a way to make things working to have a sequence of values separated by commas? Am I doing something wrong in PHP?

Re: [PHP] HTML in PHP

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Christian Ista wrote: ?php for ($i = 0; $imysql_num_rows($result); $i++) { echo mysql_result($result,$i, NAME);br } ? Could you tell me how I can do to have a br after each row. Two options: { echo mysql_result($result,$i, NAME) . 'br'; } or:

Re: [PHP] GET question

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Evan wrote: I pass parameters via querystring in this way: page.php?ID=5ID=6ID=23 In $_GET[ID] I get only the value 23 I am surprised 'cause in ASP I get 5,6,23. Is there a way to make things working to have a sequence of values separated by commas?

Re: [PHP] Autoload of cookies on Linux fails, Win32 works???

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Joseph Smith wrote: Assuming I've got a cookie called loggedin defined as 12345 In 4.2.0 on Win32, my cookies are preloaded so when I do if (isset($loggedin)) echo $loggedin It checks to see if there is a variable named $loggedin that was created by autoloading

Re: [PHP] date problem

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 14:48, Nick Wilson wrote: I have a field in MySQL db like this: date TIMESTAMP, and it looks pretty regular like this: 20020428011911 If you've got the data in your database then do the date/time conversions as part of your sql query - it's more efficient. Something like

Re: [PHP] Weird/inconsistent behaviour when sending an empty file? (WAMP, Apache2, PHP 4.2.0)

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 17:54, Moritz Schallaboeck wrote: it might very well be an ignorant oversight, but I can't explain the following behaviour. Consider a file containing -only- this code: -snip- ? ? -snip- [etc] Just a personal opinion here... if you're sending output to a browser

Re: [PHP] failed query results

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 13:48, baldey_uk wrote: $customer_id_check=(SELECT id FROM $customer_table WHERE firstname = '$firstname' lastname = '$lastname' email = '$email'); $result1=mysql_query($customer_id_check); if (!$result1) {

Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 20:32, Simonk wrote: I have added the code, but it turn out : Warning: Cannot add header information - headers already sent by (output started at C:\Inetpub\php\hospital_equipment.php:5) in C:\Inetpub\php\hospital_equipment.php on line 6 [etc] Here is my full HTML

RE: [PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 16:11, Greg Blakely wrote: Can you indicate Apache settings regarding php and virtualhosts? In the main server configuration area, I have: [etc] ### and then, under the VirtualHost area, I have: VirtualHost * Port 80 AddType application/x-httpd-php .php4 .php3

Re: [PHP] GET question

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 23:30, Evan wrote: I pass parameters via querystring in this way: page.php?ID=5ID=6ID=23 In $_GET[ID] I get only the value 23 Unless you set ID as an array, which you haven't, you'll only keep the last value. The simple answer is to have something like:

Re: [PHP] GET question

2002-04-28 Thread Evan Nemerson
Thats because that query string is like saying: $ID = 5; $ID = 6; $ID = 23; If this is a form that you can't change the ID field names to ID1, ID2, ID3, etc. (which would probably be best) you could try something like: ?php $args = explode( , $QUERY_STRING); foreach ( $args as $argz ) {

[PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread Dan McCullough
What does that error mean? $result = mysql_query('select * from aannh_towns;'); echo 'info stored'; while ($query_data = mysql_fetch_array($result)) { echo , $query_data['town'], , $query_data['town_id'], ; } ? = dan mccullough

RE: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread John Holmes
It means your query failed. www.php.net/mysql_error ---John Holmes... -Original Message- From: Dan McCullough [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 3:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Supplied argument is not a valid MySQL result resource What does

Re: [PHP] Autoload of cookies on Linux fails, Win32 works???

2002-04-28 Thread Joseph Smith
Thanks, but when I tried this.. ?php if (isset( $_COOKIE[ 'loggedin'] )) { include( build_state.php ); } else { echo No Cookie!!!; flush(); exit; header( Location: .$SiteUrl . /login.htm ); } ? I consistently get No Cookie!! Yes, the cookie is set.. I can delete the cookies and

Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread Evan Nemerson
Probably means your query failed. What line did the error occur on? You should be able to track down your problem with that. On Sunday 28 April 2002 15:14 pm, you wrote: What does that error mean? $result = mysql_query('select * from aannh_towns;'); echo 'info stored'; while ($query_data

Re: [PHP] Autoload of cookies on Linux fails, Win32 works???

2002-04-28 Thread Joseph Smith
Actually.. I see now... Windows doesn't care about cookie case. Linux does. However, I still can't get the value from the $_COOKIES array. It tells me it's defined, but doesn't return the value of the cookie. Any thoughts? J - Original Message - From: Miguel Cruz [EMAIL PROTECTED] To:

Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread Nathan
I am betting the problem is simply your semicolon... never use a semicolon in a php mysql query. It doesn't need one. In general, though, you should write your query such that it will tell you exactly what went wrong... Re-write this like so: $sql = 'select * from aannh_towns'; $result =

RE: Re[2]: [PHP] Re: Header question

2002-04-28 Thread Dean Ouellette
Not sure what is happening. Still getting same error. As soon as I remove \nX-Mailer: PHP/.phpversion() I get the error message ___- May be you just made incorrect modification... Correct php code: ?php $Subject = Look at this, I think you will like

Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Dan McCullough wrote: What does that error mean? $result = mysql_query('select * from aannh_towns;'); echo 'info stored'; while ($query_data = mysql_fetch_array($result)) { echo , $query_data['town'], , $query_data['town_id'], ; } ? You'd know if you checked

RE: Re[2]: [PHP] Re: Header question

2002-04-28 Thread Miguel Cruz
You need a closing quote after $EmailSender... $EmailSender); miguel On Sun, 28 Apr 2002, Dean Ouellette wrote: Not sure what is happening. Still getting same error. As soon as I remove \nX-Mailer: PHP/.phpversion() I get the error message

[PHP] Hey PHP PPL - Great Question !!!

2002-04-28 Thread Vins
Session Data. What is the best. to save in database, or to save as file ??? let me know. Cheerz Vins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] register_globals=Off Question

2002-04-28 Thread Kirk Babb
How do I use $PHP_SELF with register_globals off? I looked up the documentation on php.net but haven't gotten this line of code to work: form name=form5 method=post action='?php echo($_SERVER[PHP_SELF]; ?' I get this error instead: [28-Apr-2002 16:33:31] PHP Parse error: parse error,

RE: [PHP] Hey PHP PPL - Great Question !!!

2002-04-28 Thread John Holmes
Yes -Original Message- From: Vins [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 3:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Hey PHP PPL - Great Question !!! Session Data. What is the best. to save in database, or to save as file ??? let me know. Cheerz Vins

[PHP] Re: Hey PHP PPL - Great Question !!!

2002-04-28 Thread Michael Kimsal
Vins wrote: Session Data. What is the best. to save in database, or to save as file ??? let me know. Cheerz Vins Sorry Vins, It's not a great question. It's too dependant on what you need to do, what your development level is, and a host of other factors. Start with files and

[PHP] Append a line to a text file

2002-04-28 Thread Rodrigo
I need to add a email to the text file that is already written, but I get the file writen over , so I always get only the last email send by the form. What I need is a form that get the e-mail and it writes the email at the end of a text file. Thanx, Rodrigo

[PHP] Re: Hey PHP PPL - Great Question !!!

2002-04-28 Thread Vins
For example: one form... - First name - last name - address - country - phone - email - mobile number After you click submit on the first page, it sends you to a preview data page where you can check all the data. instead of inserting tons of hidden input form fields and waist download

RE: [PHP] register_globals=Off Question

2002-04-28 Thread John Holmes
You are missing an ending quote to begin with. Either add it in and use braces, or remove the quotes. action = '?=$_SERVER[PHP_SELF]?' or... action = '? echo $_SERVER[PHP_SELF]; ?' or... action = '? echo {$_SERVER['PHP_SELF']}; ?' Adapt to your needs... ---John Holmes... -Original

Re: [PHP] register_globals=Off Question

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Kirk Babb wrote: How do I use $PHP_SELF with register_globals off? I looked up the documentation on php.net but haven't gotten this line of code to work: form name=form5 method=post action='?php echo($_SERVER[PHP_SELF]; ?' action='?= $_SERVER['PHP_SELF'] ?' miguel

[PHP] Re: Append a line to a text file

2002-04-28 Thread Vins
That is a dam good question LOL I would also love to know how2 append text to the END of a file. Vins Rodrigo [EMAIL PROTECTED] wrote in message 000f01c1ef08$debba1e0$6e48bbac@rodirgo">news:000f01c1ef08$debba1e0$6e48bbac@rodirgo... I need to add a email to the text file that is already

Re: [PHP] Append a line to a text file

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Rodrigo wrote: I need to add a email to the text file that is already written, but I get the file writen over , so I always get only the last email send by the form. What I need is a form that get the e-mail and it writes the email at the end of a text file.

Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 15:14, Dan McCullough wrote: What does that error mean? $result = mysql_query('select * from aannh_towns;'); echo 'info stored'; while ($query_data = mysql_fetch_array($result)) { echo , $query_data['town'], , $query_data['town_id'], ; } ? Means you stuffed up

Re: Re[2]: [PHP] Re: Header question

2002-04-28 Thread Vins
in order to add a new line to a mail header you need not use '\n' you MUST use '\r\n' otherwise no headers will be sent. Dean Ouellette [EMAIL PROTECTED] wrote in message 001901c1ef06$697b3910$0200a8c0@yoda">news:001901c1ef06$697b3910$0200a8c0@yoda... Not sure what is happening. Still

[PHP] Date and Time

2002-04-28 Thread baldey_uk
Hi all, Anyone know any reason that the date function would return 2am in the morning as 102 if i use it in the following manner? $time=date(H:i:s); print $time; this outputs 102:14:51 instead of 02:14:51, anyone know where the 1 comes from? and why its there? Cheers From baldey_uk --

[PHP] redirection

2002-04-28 Thread Norman Zhang
Hi, I want to set up a check that the page cannot be exacted by calling from another page. E.g., members.php can only be excited if it called by login.php. So I set if (eregi(members.php, $_SERVER['PHP_SELF'])) Header(Location, login.php); at the very top of members.php. But I am being

RE: [PHP] Date and Time

2002-04-28 Thread John Holmes
What version of PHP, OS, web server, etc are you running? Is that the exact code you used? Did you try it in a file all by itself and did it return the same result? ---John Holmes... -Original Message- From: baldey_uk [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 6:22 PM

Re: [PHP] register_globals=Off Question

2002-04-28 Thread Steve Buehler
Looks like you forgot your ticks ' around the PHP_SELF. If I am correct, it should be $_SERVER['PHP_SELF']. Either way, you might want to try this. Somebody else posted it before and I have been using it so that no matter what version of PHP my program runs on, it should work. if

Re: [PHP] redirection

2002-04-28 Thread Jason Wong
On Monday 29 April 2002 10:11, Norman Zhang wrote: Hi, I want to set up a check that the page cannot be exacted by calling from another page. E.g., members.php can only be excited if it called by login.php. So I set if (eregi(members.php, $_SERVER['PHP_SELF'])) Header(Location,

[PHP] Append a line to a Text File

2002-04-28 Thread Rodrigo
I still need to know how to do it, since the a+ or the a give me problems... I need to be able to add a line at the end of a text file thru sending the information (and by this I mean the e-mail to be writen) thru a form, and this new information should be added to the file at the end of it

Re: [PHP] Append a line to a Text File

2002-04-28 Thread Miguel Cruz
On Sun, 28 Apr 2002, Rodrigo wrote: I still need to know how to do it, since the a+ or the a give me problems... What kind of problems? Do you get an error message that you can paste into a message for us to see? Does the file get corrupted in some specific way that you can describe? Does your

RE: [PHP] Append a line to a Text File

2002-04-28 Thread John Holmes
How about you send us your code, because you're the one doing something wrong. a is what you want, if it's not working, then there is an error in your code or logic. ---John Holmes... -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 7:50 PM

[PHP] append line to text file HELP !!!

2002-04-28 Thread Rodrigo
Ok guys, this is the code and under it you can see what I get when I try to submit the form. ?php $file_pointer=file('emails.txt','a') || exit; $string_to_write = ($newmail).\n; $s=fopen($file_pointer,$string_to_write); $s=fclose($fp); ? Warning: Supplied argument is not a valid

[PHP] lookin for a Menuing System...

2002-04-28 Thread Dan
I could do this myself but I don't want to waist time writing something that I could have just asked for.. what I need is a menuing system.. When link is clicked the sub-topics appear under the topic you just clicked on.. e.g. if you where to click on Contact. Contact --becomes: Contact

  1   2   >