Re: [PHP] Is there any substitute for header function?

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 14:14, Balaji Ankem wrote: > Hi Martin, > I have tried with full URL. But no use. > Again displayed the error alert. Try searching on http://bugs.php.net to see whether there are any known problems with header() under Windows. Try re-installing php. -- Jason Wong ->

RE: [PHP] Is there any substitute for header function?

2002-05-28 Thread Balaji Ankem
Hi Martin, I have tried with full URL. But no use. Again displayed the error alert. Thanks and Regards Balaji -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:37 AM To: 'Balaji Ankem'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there any

RE: [PHP] Is there any substitute for header function?

2002-05-28 Thread Martin Towell
try specifying the full url. see how that goes -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 4:06 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Is there any substitute for header function? Hi Jason and friends, I am very sorry for that. Pl

RE: [PHP] Is there any substitute for header function?

2002-05-28 Thread Balaji Ankem
Hi Jason and friends, I am very sorry for that. Pls. Pardon me. Yaa I am sure header is causing that trouble and that to it is happening on Windows only. In linux it is not a problem. If I remove the 3 lines code present in if loop and if I keep any echo statement it is working fine. And If I

Re: [PHP] Time release type question

2002-05-28 Thread Dr. Indera
hi jule, thank you for the script and don't worry about the # of posts. i admire your dedication. indera Jule wrote: > I really should be more clear on my scripts > I'm sorry > > $assignment[1][date] = date(); // date in mktime format see www.php.net > $assignment[2][date] = date(); > $

Re: [PHP] Is there any substitute for header function?

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 13:49, Balaji Ankem wrote: First of all, please start a new post when you have a new question. Do not just reply to an existing post. It's bad manners. And quoting the irrelevant existing post is even worse manners. > Hi, > Is there any substitute for header function

[PHP] Is there any substitute for header function?

2002-05-28 Thread Balaji Ankem
Hi, Is there any substitute for header function.. Because of this I am getting error saying.."php.exe has generated some errors and will be closed by windows". if ($row->user_type=='A') { mysql_close($connection); header("Location:admin.php"); exit; } Thanks in advance

[PHP] eregi() against a binary file?

2002-05-28 Thread Kevin Stone
I'm trying to match file names associated with a 3DS file (a 3DS file is a common 3D file format). The file is binary by nature but as you can clearly see in the dump below the filenames themselves are stored as plain text. So I should be able to do a simple eregi() on the file and discover if th

RE: [PHP] easy date question?

2002-05-28 Thread Martin Towell
If you want to make it a few line shorter, change if ($MonthStartDay < $Day) { $C = $Day - $MonthStartDay; } else if ($MonthStartDay > $Day) { $C = 7 - $MonthStartDay + $Day; } to $C = ($MonthStartD

Re: [PHP] easy date question?

2002-05-28 Thread Ed Lazor
I came up with a solution that I'd like to share. Could someone confirm whether it's the best approach? Thanks, -Ed - source code # ex.: GetDay ("Third", "Saturday", 5, 2002); function GetDay($Week, $Day, $Month, $Year) { $MonthStartDay = date("w", mktime(0,

Re: [PHP] Time release type question

2002-05-28 Thread Jule
I really should be more clear on my scripts I'm sorry $assignment[1][date] = date(); // date in mktime format see www.php.net $assignment[2][date] = date(); $assignment[3][date] = date(); $assignment[4][date] = date(); $assignment[5][date] = date(); $assignment[1][assignment] = "pg. 1-5"; $

[PHP] can I use regex for this?

2002-05-28 Thread Martin Towell
I have a string which is a date - eg "01-JUL-02" I want to convert the month bit to it's corresponding number, so the above would become "01-07-02" Can this easily be done using a regex? Otherwise I was thinking of this: $mon = array("JAN"=>"01", "FEB"=>"02", "MAR"=>"03", etc...); list($x, $y, $

Re: [PHP] Time release type question

2002-05-28 Thread Jule
actually that should be for ($n = 1; $n <= $number_of_assignments; $n++) { if (mktime($current) >= mktime($assignment[$n]) { echo "assignment[$n]\n"; } } Jule On Wednesday 29 May 2002 00:31, Jule wrote: > I think that is right Jay, > you can use mktime() to cha

RE: [PHP] dynamic indexes in arrays

2002-05-28 Thread Martin Towell
why not just do this? $this->m_menu[$index] = array("title"=>$title, "content"=>"", "color"=>$color); -Original Message- From: Joe Pemberton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:23 PM To: php list Subject: [PHP] dynamic indexes in arrays I have a member variable

Re: [PHP] Inconsistent behavior with preg_match_all in conditional

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 11:06, Randy Janinda wrote: > Hello everyone, > > I have a script to check a user submitted string. It may be multiple > words. If a word is found to be 3 characters or less, the script should > retain the case of the string IF all the characters are uppercase. > Otherwise

Re: [PHP] Login determines content on page

2002-05-28 Thread Jule
That's all possible using an SQL database (www.mysql.com) just think about the databnse first before you actually make it, i ran into a lot of problems because i just kept adding tables whenever i needed them a good hint is to write scemes of your script and what ylu want to achieve on paper bef

[PHP] Login determines content on page

2002-05-28 Thread Dr. Indera
Hello, I'd to know how difficult it is to achieve the following: Create login page, when the submit button is clicked, the user info is checked against a database as to whether is login info is valid. if it is valid, a page is displayed that lists all of the classes that the user has registe

Re: [PHP] Time release type question

2002-05-28 Thread Jule
I think that is right Jay, you can use mktime() to change the date into unix time and then create the if statement if ((mktime([current])) == (mktime([date of assignment])) { echo "link to assignment" } something along those lines.. you can easily check it by setting the system clock f

[PHP] Login determines content on page

2002-05-28 Thread Dr. Indera
Hello, I'd to know how difficult it is to achieve the following: Create login page, when the submit button is clicked, the user info is checked against a database as to whether is login info is valid. if it is valid, a page is displayed that lists all of the classes that the user has registe

[PHP] dynamic indexes in arrays

2002-05-28 Thread Joe Pemberton
I have a member variable of a class that I am designing called $m_menu. I am trying to add items to it using the contents of $index as the index for the 'slot' in the array, but I get a parse error when I do so. array_push($this->m_menu, $index =>array("title"=>$title, "content"=>"", "color"

Re: [PHP] FATAL call to undefined function pg_query()

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 11:37, Steve G wrote: > Fatal error: Call to undefined function: pg_query() in > /var/www/html/steve/frontdoor.php on line 42 > but for some reason pg_query gives me an undefined function. What gives?? > Is this function not valid? The manual says it is.. I think my s

Re: [PHP] Time release type question

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 11:52, Dr. Indera wrote: > I am in the planning stage of building an online course room. Each week I > need to upload pages for that weeks lesson and assignments. What I want to > know is if there is a way for me to have all 8 weeks of the course pages > created and uploa

[PHP] Time release type question

2002-05-28 Thread Dr. Indera
Hello, I'm probably not using the right terminology for what I want to know, but I'll explain it as best I can. I am in the planning stage of building an online course room. Each week I need to upload pages for that weeks lesson and assignments. What I want to know is if there is a way for me

[PHP] FATAL call to undefined function pg_query()

2002-05-28 Thread Steve G
Hello, I don't know exactly why I'm getting this output: Fatal error: Call to undefined function: pg_query() in /var/www/html/steve/frontdoor.php on line 42 I can successfully connect to my db using: $link = pg_connect ("host=localhost dbname=$dbname user=$user"); And I even get the proper Da

[PHP] Converting Text to Hyperlinks

2002-05-28 Thread Alexis Antonakis
Hi All, I am designing a News board and wish to convert any text beginning with 'http://' into a hyperlink, when displayed on the page. I have converted all the HTML tags (htmlspecialchars) before saving the data. I can do the initial bit fine (adding the ) before the start of the link, but I am

[PHP] Inconsistent behavior with preg_match_all in conditional

2002-05-28 Thread Randy Janinda
Hello everyone, I have a script to check a user submitted string. It may be multiple words. If a word is found to be 3 characters or less, the script should retain the case of the string IF all the characters are uppercase. Otherwise, the script will make the first character of each word uppercas

[PHP] DNS-less Connections With PHP?

2002-05-28 Thread Dr. Shim
Could anybody explain to me (or even give me a link to a place explaining) the creation of "DSN-less" connections? I've extensivly searched Google with this, but I couldn't find anything that was of any help to me. I know how to do this in ASP, though... -- PHP General Mailing List (http://www

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
Ill see what else I find. Thanks... Martin Towell wrote: >well this sql : > select * from database where this='$foo' and that='$bar'; >should become : > select * from database where this='' and that=''; >after you substitute the variables in. > >This looks like a valid sql to me,

[PHP] imageTTFtext() doesn't work

2002-05-28 Thread Chris Sechiatano
Hello, I'm just playing around with the imageTTftext() function but it doesn't seem to be working. I can output an image, but when I use the text function, nothing is displayed, not even the image. This is running on a RHL 7.2 system with the following installed: php-4.0.6-7 gd-1.8.4-4 freetyp

RE: [PHP] PHP new super globals or something else??

2002-05-28 Thread Martin Towell
well this sql : select * from database where this='$foo' and that='$bar'; should become : select * from database where this='' and that=''; after you substitute the variables in. This looks like a valid sql to me, unless the database is set up to _dis_allow zero length strings...

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
Actually, no. $foo and $bar are controls to let the script know which threads (its a forum script) to follow. This merely an example. Im not really looking for a fix for the script, thats a no brainer, but an explanation as to why the script is not behaving as it is supposed to be with regist

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Lars Torben Wilson
On Tue, 2002-05-28 at 18:05, Gerard Samuel wrote: > Its a fairly long script but this is a basic rundown of the mechanics. > > some_page.php > - > /* user is sent here from another page, grab foo and bar from the url */ > $foo = $_GET['foo']; > $bar = $_GET['bar']; >

Re: [PHP] read last three letters

2002-05-28 Thread Justin French
or, try this: '; } elseif(file_exists('{$c}.jpg')) { echo ''; } else { echo ''; } ?> Justin French Creative Director http://Indent.com.au on 29/05/02 7:56 PM, r ([EMAIL PROTECTED]) wrote: > Hi PHP ppl, > > I have a direct

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
Its a fairly long script but this is a basic rundown of the mechanics. some_page.php - '; echo ''; echo ''; echo ''; } ?> Now as it stands, initially it would work fine, but when the form is submitted, it would break, because 'foo' and 'bar' are in $_POST

RE: [PHP] easy date question?

2002-05-28 Thread Martin Towell
1. set date = 1 2. get day of 1st of month 3. if day != tuesday, set date = 10-day_num (assuming Sun = 0, Mon = 1, etc) 4. add 14 to date 5. now you have your date There's most likely a better way of doing it though -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED]] Sent: Wedn

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Gerard Samuel wrote: > Then the form is submitted to itself to insert into the database. When > its submitted, the script is looking for 'foo' and 'bar', but > they are now in the $_POST, and this is where it breaks for the other > guy, because the script is still looking f

Re: [PHP] easy date question?

2002-05-28 Thread Rasmus Lerdorf
See the PEAR Date/Calc class. On Tue, 28 May 2002, Ed Lazor wrote: > How can I find out the date of the 3rd Tuesday of any given month? > > Thanks, > > -Ed > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing

[PHP] easy date question?

2002-05-28 Thread Ed Lazor
How can I find out the date of the 3rd Tuesday of any given month? Thanks, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP new super globals or something else??

2002-05-28 Thread Martin Towell
code snippets would be good, if possible -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:46 AM To: PHP Subject: [PHP] PHP new super globals or something else?? I hope this makes sense to someone Im converting a script over to work

[PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
I hope this makes sense to someone Im converting a script over to work with 4.1.x +. Im running php 4.1.2 on FreeBSD/Apache and I have 4.2.0 on w2k/IIS/Apache. I sent the script to a friend of mine who is running w2k/Apache with 4.2.0. He told me that the script isn't working for him but it w

Re: [PHP] .php extension

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Luis Miguel N. Tavora wrote: > As far as I understood it, for a server process the php > code, the file must have the extension .php > > But then, the apache server (for example) requires a file > index.html to be placed in the directory public_html/ ... Wrong on both coun

Re: [PHP] regexp magic

2002-05-28 Thread Lars Torben Wilson
On Tue, 2002-05-28 at 16:56, Dan Harrington wrote: > Greetings everyone, > > I'm trying to do some regexp magic and just can't seem to > get it done with PHP. > > Basically I want to evaluate a word and if the last character > of the word is an 's', to knock it off, unless there are > two conse

[PHP] Submitted form doesn't work

2002-05-28 Thread nico_free
Helllorgh, !!! I've got a strange problem... Look at this pseudo-script (news.php) : -- etc . and the submit, plus 1 or 2 others... -

Re: [PHP] Thread safe

2002-05-28 Thread Miguel Cruz
If you use the database mechanism to lock the table during the transaction, then the second simultaneous invocation of your PHP program will wait (a tiny fraction of a second) until the first one is done. miguel On Wed, 29 May 2002, r wrote: > since only my one program was accessing the table

RE: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread Scott Reismanis
The way vbulliten does it, is they take a users search query, and find out which threads match i.e. (2000, 5000, 2310, etc...). This is then inserted into a database along with a search ID. From here once the search is completed you are forwarded to a page like search.php? search_id=7 that way

[PHP] regexp magic

2002-05-28 Thread Dan Harrington
Greetings everyone, I'm trying to do some regexp magic and just can't seem to get it done with PHP. Basically I want to evaluate a word and if the last character of the word is an 's', to knock it off, unless there are two consecutives at the end of the word. So 'boys' would become 'boy' and

RE: [PHP] Generate inline image

2002-05-28 Thread Rasmus Lerdorf
How about the obvious way? -Rasmus On Tue, 28 May 2002, Engineering Software Center wrote: > Hi: all: > > With helps from Martin, now I can create images on the fly. > I used code like to create my > images. However, with this option, how can I pass a variable to > generateimage.php? The p

RE: [PHP] Generate inline image

2002-05-28 Thread Engineering Software Center
Hi: all: With helps from Martin, now I can create images on the fly. I used code like to create my images. However, with this option, how can I pass a variable to generateimage.php? The php scrip is supposed to take a variable: say ImageID and looks up the MySQL database for all values and the

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Andre Dubuc
Thanks John, I'm not familiar with the first function, but it sounds like any easy way to accomplish basic validation. Btw, any ideas why my code snippet didn't work? I still have some "badWords' to check for, and eregi doesn't seem to work with textarea. Tia, Andre On Tuesday 28 May 2002 06

Re: [PHP] _() ???

2002-05-28 Thread Weston Houghton
Of course this had to come in after I sent my email. Thanks again Rasmus, you seem to always be there with the answer. Wes > No, the _() function is the standard gettext() alias. See > http://php.net/gettext > > -Rasmus > > On Tue, 28 May 2002, John Holmes wrote: > >>> What exactly does t

Re: [PHP] _() ???

2002-05-28 Thread Weston Houghton
Oddly, I get the following error on the page when trying to view it though: Fatal error: Call to undefined function: _() in /Library/WebServer/Documents/admin/horde/config/prefs.php on line 5 Here's the exact offending code: $prefGroups['language'] = array( 'column' => _("Your Information")

RE: [PHP] _() ???

2002-05-28 Thread Rasmus Lerdorf
No, the _() function is the standard gettext() alias. See http://php.net/gettext -Rasmus On Tue, 28 May 2002, John Holmes wrote: > > What exactly does the underscore in _("Select your preferred > language:") > > mean? > > It doesn't do anything. It's just a naming convention the author chose >

RE: [PHP] _() ???

2002-05-28 Thread John Holmes
> What exactly does the underscore in _("Select your preferred language:") > mean? It doesn't do anything. It's just a naming convention the author chose to use. Usually when you name a function like that, it's meant to be "private" or shouldn't be called directly. Other functions will use it, bu

RE: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread John Holmes
Why not just use htmlentities() and striptags() on the user input? I prefer to just use htmlentities() and that's it. Any code the user tries to type in is just converted to html codes and ends up being displayed in the browser exactly as they typed it. None of their code is evaluated though. --

[PHP] Best GD Module for 4.0.6

2002-05-28 Thread Shane
Howdy crew... I have a client's ISP that is running php 4.0.6 on WIN IIS but does NOT have a version of GD installed. My question to you is, What is the best version of the GD module that works with 4.0.6, and where can I get it? Trying to download just the GD module on PHP.NET has proven to

Re: [PHP] .php extension

2002-05-28 Thread Ashley M. Kirchner
"Luis Miguel N. Tavora" wrote: > But then, the apache server (for example) requires a file > index.html to be placed in the directory public_html/ ... The Apache server only requires what you tell it to require. Edit your httpd.conf file and look for: DirectoryIndex index.html ...

Re: [PHP] .php extension

2002-05-28 Thread Julie Meloni
LMNT> As far as I understood it, for a server process the php LMNT> code, the file must have the extension .php You can use any extension for PHP, as long as you tell Apache (or other web server) to process files of that extension as PHP files. LMNT> Does that mean that I can't have any php in

Re: [PHP] .php extension

2002-05-28 Thread Thalis A. Kalfigopoulos
On Tue, 28 May 2002, Luis Miguel N. Tavora wrote: > Hi there. > > I've started to code in PHP a couple of days ago, so > I'm really a newbie. > > As far as I understood it, for a server process the php > code, the file must have the extension .php Not really but it's a good convention. > B

[PHP] .php extension

2002-05-28 Thread Luis Miguel N. Tavora
Hi there. I've started to code in PHP a couple of days ago, so I'm really a newbie. As far as I understood it, for a server process the php code, the file must have the extension .php But then, the apache server (for example) requires a file index.html to be placed in the directory public_h

[PHP] PHP internal question.

2002-05-28 Thread Wei Weng
How does PHP support server push? I was reading PHP4-1.1 source code, and noticed PHP_FUNCTION(header) (main/head.c) calls sapi_add_header_ex (main/SAPI.c) and thus calls sapi_apache_header_handler (sapi/apache/mod_php4.c), and that function puts a : into request_rec.headers_out table. So for

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Kevin Stone
After you said the commenting worked on 4.06 I tried it again and it worked for me too (4.12). How odd. The first time I tried this it gave me a parse error.. same exact code (copied and pasted) but maybe it was a browser cache glitch. Hmm.. my mistake I guess. :) */ echo "hello world"; ?> -K

[PHP] read last three letters

2002-05-28 Thread r
Hi PHP ppl, I have a directory named cartoons, it has around 180 files in them ONLY images, the filenames are 1.jpg, 2.jpg..5.gif, 6.gif etc etc if you got confused with the above line its basically all the files are numbered from 1-180 and the file types are mixed JPG and GIF. I have a prog

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Jason Wong
On Wednesday 29 May 2002 05:03, Kevin Stone wrote: > Hrm.. that's possible. I'm running v4.12 Works fine on v4.0.6 -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Th

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Ed Gorski
Well it looks like they got half of it right by changing the /* */ issue ed At 03:06 PM 5/28/2002 -0600, Johnson, Kirk wrote: >Well, one thing I know for sure is that there are members of the PHP >develpment team that monitor this list. Maybe one of them will clear this up >for us ;) > >Kir

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Johnson, Kirk
Well, one thing I know for sure is that there are members of the PHP develpment team that monitor this list. Maybe one of them will clear this up for us ;) Kirk > -Original Message- > From: Ed Gorski [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 3:04 PM > To: Kevin Stone; [EMA

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Ed Gorski
From my experience the PHP parser acts much like the HTML parser in the fact that it doesn't give a damn about carriage returns ed At 03:01 PM 5/28/2002 -0600, Kevin Stone wrote: >Exactly.. it doesn't seem to make any sense. Esspecially since it's such as >absolutely incredibly undeniably

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Jonathan Rosenberg
This seems to me to be inconsistent/buggy behavior on the part of the PHP parser. To be consistent, I would think that it would want to act like an HTML parser (browser), which will recognize the first ?>, regardless of where it occurs. The idea being that if the PHP code is passed through a ser

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Kevin Stone
Hrm.. that's possible. I'm running v4.12 -Kevin - Original Message - From: "Ed Gorski" <[EMAIL PROTECTED]> To: "Kevin Stone" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 3:01 PM Subject: Re: [PHP] comment followed by ?> fails to parse > What version of php are y

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Ed Gorski
What version of php are you using? I just pasted that code in test script and it came out fine with 4.2.1.maybe it wasn't the case in earlier versions... ed At 02:57 PM 5/28/2002 -0600, Kevin Stone wrote: >OH NO IT WON'T.It'll comment out the and give you a >parse error. > >/**/ > >

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Kevin Stone
Exactly.. it doesn't seem to make any sense. Esspecially since it's such as absolutely incredibly undeniably easy thing to check for. :) If the code doesn't end with an uncommented ?> then just parse the code as text. That's what it does anyway so why catch commented code at all? - Origin

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Johnson, Kirk
Which begs the question, why does PHP see a '?>' in a '//' comment line, but not in a multi-line comment, e.g., /* ?> */ ? > -Original Message- > From: Ed Gorski [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 2:46 PM > To: Leotta Natalie (NCI/IMS); 'Jonathan Rosenberg'; Johnson,

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Kevin Stone
OH NO IT WON'T.It'll comment out the and give you a parse error. */ echo "hello"; ?> - Original Message - From: "Ed Gorski" <[EMAIL PROTECTED]> To: "Kevin Stone" <[EMAIL PROTECTED]>; "Jonathan Rosenberg" <[EMAIL PROTECTED]>; "Johnson Kirk" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Ed Gorski
No, if you use /* ? */ as a comment the parser will skip right over it.if you want to use sample code in your script just use: /* */ that'll work fine ed At 02:48 PM 5/28/2002 -0600, Kevin Stone wrote: >I've run into this before as well. Pain in the ass when you want to put >example cod

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Jonathan Rosenberg
The parser needs to "emulate" the behavior of the HTML parser, which will match the first ?> with the opening -Original Message- > From: Leotta, Natalie (NCI/IMS) > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 4:41 PM > To: 'Jonathan Rosenberg'; Johnson, Kirk; > [EMAIL PROTECT

Re: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Kevin Stone
I've run into this before as well. Pain in the ass when you want to put example code in your header. It's gotta be a deisgn flaw. // literal.. legal $tmp = '?>'; // reg ex.. legal ereg('?>', $tmp); // Comment.. illegal. Why? Makes no sense. /*?>*/ -Kevin - Original Message - From

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Leotta, Natalie (NCI/IMS)
That makes sense. Thanks! -Natalie -Original Message- From: Ed Gorski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 4:46 PM To: Leotta, Natalie (NCI/IMS); 'Jonathan Rosenberg'; Johnson Kirk; [EMAIL PROTECTED] Subject: RE: [PHP] comment followed by ?> fails to parse No the pa

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Ed Gorski
No the parser sees the ?> after a // because it needs to see when to quit out (unlike traditional, compiled languages) but it won't have this same effect in a string literal. ed At 04:40 PM 5/28/2002 -0400, Leotta, Natalie (NCI/IMS) wrote: >But why wouldn't the parser skip right over a //

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Leotta, Natalie (NCI/IMS)
But why wouldn't the parser skip right over a // line? it shouldn't even see anything in it. -Original Message- From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 4:46 PM To: Johnson, Kirk; [EMAIL PROTECTED] Subject: RE: [PHP] comment followed by ?> fails to

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Jonathan Rosenberg
BTW: if my last message was correct, this means that an occurrence of ?> embedded in a string literal will also cause problems. > -Original Message- > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 4:08 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] comment

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Jonathan Rosenberg
I would think that the first occurrence of ?> would/should terminate the PHP code. This makes sense because the surrounding text is HTML & the HTML parser does not understand PHP comments. Yes? > -Original Message- > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28

RE: [PHP] auto_increment

2002-05-28 Thread Scott Hurring
Look at Sequences for Postgres. --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: webmaster [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 7:12 AM > To: [EMAIL PROTECTED] > Subject: [PHP] au

RE: [PHP] comment followed by ?> fails to parse

2002-05-28 Thread Johnson, Kirk
I have wondered for some time if this is a bug or just an interesting design choice ;) I agree with you, I was surprised when I first encountered this. But it is what it is, so code accordingly. Kirk > -Original Message- > From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] > Sent:

RE: [PHP] Efficient PHP

2002-05-28 Thread Ed Gorski
Yeah I saw thatbut it did make some good pointsthanks SP. ed At 02:27 PM 5/28/2002 -0500, Miguel Cruz wrote: >But I wouldn't bet my children on advice found there. I just glanced at it >quickly but it was riddled with errors large and small. > >miguel > >On Tue, 28 May 2002, SP wrote: >

RE: [PHP] Efficient PHP

2002-05-28 Thread Miguel Cruz
Though on further examination the tweaks section at the end seems good and solid. I'd only gotten to the OS portion when I barked out my complaint. miguel On Tue, 28 May 2002, Miguel Cruz wrote: > But I wouldn't bet my children on advice found there. I just glanced at it > quickly but it was ri

RE: [PHP] Efficient PHP

2002-05-28 Thread Miguel Cruz
But I wouldn't bet my children on advice found there. I just glanced at it quickly but it was riddled with errors large and small. miguel On Tue, 28 May 2002, SP wrote: > Here's an article you might want to read > http://phplens.com/lens/php-book/optimizing-debugging-php.php > > > -Origina

Re: [PHP] Multiple variables

2002-05-28 Thread Thalis A. Kalfigopoulos
>From my understanding of what you wrote: foreach($textBoxArray as $tBox=>$tVal){ if(empty($tVal)){ echo("Found empty textBox: $tBox\n"); } } Read in manual about isset() and empty() cheers, thalis On Tue, 28 May 2002, Morten Nielsen wrote: > Hi, > I got a tab

Re: [PHP] Multiple variables

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Morten Nielsen wrote: > I got a table, which contains a lot of text-boxes. Each textbox has a name: > > Text1 > Text2 > Text3 > etc. > > Is it possible to check if they are all set using a for-loop? > I think of something like: > > for($i=1;$i<10;$i++) > { >

RE: [PHP] Efficient PHP

2002-05-28 Thread SP
Here's an article you might want to read http://phplens.com/lens/php-book/optimizing-debugg ing-php.php -Original Message- From: Ed Gorski [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP] Efficient PHP Anyone know any good links on papers/artic

Re: [PHP] (Unlink(file) == rm file) ? (ignore this mail):(explain diffs);

2002-05-28 Thread Dan Lowe
Previously, Jimmy Lantz wrote: > > (Unlink(file) == rm file) ? (ignore this mail):(explain diffs); > > Does PHP unlink function handle deletion of files equally as the "rm" > command on the system in my case FreeBSD. > Or does it involve caching/handling files in any different way? It just use

[PHP] comment followed by ?> fails to parse

2002-05-28 Thread Thalis A. Kalfigopoulos
If I write a comment line with // and I include in it ?> then it fails to parse the rest of the page because (i'm guessing) the parser gets confused and goes off PHP mode. Is this normal? Shouldn't I be able to write literally ANYTHING on a comment line? Sample Code: $var=1; ?> Output: $va

[PHP] Multiple variables

2002-05-28 Thread Morten Nielsen
Hi, I got a table, which contains a lot of text-boxes. Each textbox has a name: Text1 Text2 Text3 etc. Is it possible to check if they are all set using a for-loop? I think of something like: for($i=1;$i<10;$i++) { if(empty("Text"+$i)) { do something...

[PHP] auto_increment

2002-05-28 Thread webmaster
I think this is any easy question, but I couldn't find an answer in the php Black Book for PostgreSQL. Does anyone know the equivilant of auto_increment for PostgreSQL? This is the php code that I have: $query = "CREATE table $tablename (id INT NOT NULL PRIMARY KEY, ip TEXT, customer TEXT, dslp

Re: [PHP] Imagecreate and/or GD library not activated

2002-05-28 Thread Dennis Moore
check to see if gd is actually activated by using phpinfo() assuming you are using PHP4... /dkm - Original Message - From: "LeTortorec, Jean-Louis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 2:35 PM Subject: [PHP] Imagecreate and/or GD library not activated

RE: [PHP] Intermediate "Searching..." screen.

2002-05-28 Thread SP
Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate "Searching..."

Re: [PHP] php's variables & javascript

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, burak delice wrote: > I want to make a php that include javascript that use a php variable. Code > is below: > > $size = GetImageSize ("images/$resim"); > echo " > wdth=";$size;echo";"; > echo ""; > ?> > > (I am calling that php file as below) > http://localhost/Aksu/we

Re: [PHP] Missing functions??

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Weston Houghton wrote: > I'm using the Mac OS X binary of PHP 4.2.1 provided by Mark Liyanage > (http://www.entropy.ch/software/macosx/php/), and I am starting to notice > some oddities, I was wondering if anyone else had seen these errors in other > ports. > > I'm getting so

Re: [PHP] Mailing Archieve

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Uma Shankari T. wrote: > Can anyone please tell me how to create a mailing archieve list 1) Get messages delivered to a PHP program. 2) Parse the messages. 3) Add them to the database. 4) Provide a front-end for querying the database. Which part are you having trouble with?

Re: [PHP] Thread safe

2002-05-28 Thread Miguel Cruz
On Mon, 27 May 2002, r wrote: > In java servlets I used to use a "synchronised" block of code to make sure > it was thread safe...how do i do this in PHP? > > Heres what should be thread safe > > { > $r=select max(cno)+1 from MyTable; > (then i insert into the table the new cno plus my name) > i

Re: [PHP] function return

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, W. Enserink wrote: > I have a Q about functions. My function should return 2 values. What > syntax should I use and how do I call these values outside the function? > Are these values returned as en array or something? > > > this is what I have now, > ---

[PHP] Imagecreate and/or GD library not activated

2002-05-28 Thread LeTortorec, Jean-Louis
Hello everyone. I wrote a little code creating PNG images under Apache/PHP windows. As the code works fine, I need to transfer it onto the Linux platform. When I execute the code, PHP replies "Fatal error: Call to undefined function: imagecreate()". I had libgd installed. I just added GD 1.8.4.

  1   2   >