[PHP] Problem with INSERT Query

2003-12-30 Thread irinchiang
Hi all: Well, when i bring out the page with the drop down list it was able to display all tutors' names from "tutor_name" column. Anyway here's a review of my code (snip) again before i continue: --- $sql = "INSERT I

[PHP] SV: [PHP-DB] Selecting between using letters

2003-12-30 Thread Henrik Hornemann
How about Select LastName from sometable where LastName >= 'A' and LastName <'F' Hth Henrik Hornemann -Oprindelig meddelelse- Fra: Doug Parker [mailto:[EMAIL PROTECTED] Sendt: 29. december 2003 23:18 Til: [EMAIL PROTECTED]; [EMAIL PROTECTED] Emne: [PHP-DB] Selecting between using letter

[PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread Dave G
PHP Gurus, I currently run a few newsletters that go out to small groups of 50 to 100 people. I use a while loop to send out the emails. I chose a while loop as opposed to just taking all the emails and putting them in the CC field because I wanted to personalize each email with a greeting

Re: [PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread Miles Thompson
At 05:37 PM 12/30/2003 +0900, Dave G wrote: PHP Gurus, I currently run a few newsletters that go out to small groups of 50 to 100 people. I use a while loop to send out the emails. I chose a while loop as opposed to just taking all the emails and putting them in the CC field because I wante

Re: [PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread Marek Kilimajer
Dave G wrote: So my question is, is there a way more efficient than while loops to send out multiple emails with personalized information? Is it the mail() command that takes time, or the mysql_fetch_array(), or both? Any suggestions would be greatly appreciated. It's the mail() fun

Re: [PHP] Problem with INSERT Query

2003-12-30 Thread Marek Kilimajer
Do you understand the request - response process? User requests a page, php buids the page and sends it to the user, user's browser displays the page, users views it and takes some action (follows a link, submits a form) and the whole process repeats. [EMAIL PROTECTED] wrote: Hi all: Well, whe

[PHP] Testing for Well-Formed XML

2003-12-30 Thread Ian Williams
Hi I'm trying to build a validator in PHP, to check that XML documents are well-formed. Does anyone have an algorithm for doing this? KR ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread David T-G
Dave -- ...and then Dave G said... % % PHP Gurus, % I currently run a few newsletters that go out to small groups of % 50 to 100 people. I use a while loop to send out the emails. I chose a ... % about 50 people. I'm not sure exactly, but maybe ten seconds, possibly % as high as twenty. %

php-general Digest 30 Dec 2003 11:32:19 -0000 Issue 2502

2003-12-30 Thread php-general-digest-help
php-general Digest 30 Dec 2003 11:32:19 - Issue 2502 Topics (messages 173454 through 173477): Re: Selecting between using letters 173454 by: Vail, Warren Has anyone installed AWF 1.10?? I need some help 173455 by: Student HTML via echo or not 173456 by: Robin Kopet

[PHP] Problem with fmod() function

2003-12-30 Thread Andy Higgins
Hello, My understanding from the documentation is that the fmod() function should work with floating point numbers however the following snippet of code: "; echo "y: $y "; echo "fmod: " . fmod($x, $y) . ""; ?> outputs the following: x: 1.05 y: 0.05 fmod: 0.05 I would have expected to get an a

[PHP] Evaluating Variables at the correct time

2003-12-30 Thread Ben Wrigley
Hi There, I'm a bit of a newbie here I'm afraid so I'm sorry if this is an obvious question. I have a script which read includes an html file. The html makes a call so a function in the main script. This call passes a string which includes variables i.e. : $title$name in the function that gets

Re: [PHP] Is a while loop the most efficient way to send out multiple emails?

2003-12-30 Thread lists
> I currently run a few newsletters that go out to small groups of > % 50 to 100 people. I use a while loop to send out the emails. I chose I have a module that does about about 100 emails (10Kb of data per email, which is a decent sized email) in 8 - 10 seconds. (Does around 610 - 625 e

[PHP] best way to specify path to a file in a $variable?

2003-12-30 Thread Danny Anderson
Hola, PHP folk- I am using $page_title="some page title here"; require('header.inc'); to include a common header for all my pages. I am using $page_title so I can have unique names for the different pages. //---header.inc ... I want to be able to also define the path to th

Re: [PHP] best way to specify path to a file in a $variable?

2003-12-30 Thread Tristan . Pretty
I personally link my css files using the root dir... eg: host/myaccount/mywebsite/mycssfile.css That way, it's always pointing to the correct file... hope it helps/// Danny Anderson <[EMAIL PROTECTED]> 30/12/2003 14:15 To [EMAIL PROTECTED] cc Subject [PHP] best way to specify path to a fil

Re: [PHP] best way to specify path to a file in a $variable?

2003-12-30 Thread Blake Schroeder
The way my server is setup it depends on your web root dir. If your css dir and file are located in: /userid/public_html/css/css1.css My web root is: /userid/public_html/ So the path I would use to get to the css file is: /css/css1.css -Blake Danny Anderson wrote: Hola, PHP folk- I am using $

[PHP] Still Racking My Brain

2003-12-30 Thread [EMAIL PROTECTED]
Okay, I got my pathname straightened out, but I'm still showing the "unexpected $" message. But that's after doing $[var name] = $_POST['var name']; for everything with a $ in front of it. Can someone please let me know what I'm not understanding here? The code is, again, below. Thank you very m

RE: [PHP] Migrating from SSI and Perl

2003-12-30 Thread Philip Pawley
Have I got this right? I am doing "$BRPHP" ); exec (' ../cgi-bin/browser.pl', $arr ); echo $arr[2]; echo $arr[3]; echo $arr[4]; echo $arr[5]; echo $arr[6]; ?> 1. Am I passing $arr[1] to the perl script? 2. If no, what should I do instead? 3. If ye

Re: [PHP] Still Racking My Brain

2003-12-30 Thread Richard Davey
Hello stiano, Tuesday, December 30, 2003, 3:24:04 PM, you wrote: son> Okay, I got my pathname straightened out, but I'm still showing the son> "unexpected $" message. The following works fine for me (on a Windows XP box + PHP4 + Apache) Image List

[PHP] creating a very simple cms with one login and one mySQL database

2003-12-30 Thread Charlie Fiskeaux II
I'm new to php and am trying to create a very basic content management system to let my client update a popup on their homepage. I'm using mySQL and have a good idea of how to do the login and set & read cookies, as well as accessing the database during the admin process. The part I'm not too

RE: [PHP] creating a very simple cms with one login and one mySQL database

2003-12-30 Thread Jay Blanchard
[snip] Is there a tutorial or article on stuff like this somewhere? [/snip] Search for an article on evolt.org called the ABC's of CMS, it is a fair starting point. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] looping problem?

2003-12-30 Thread Jas
Problem with looping over a CSV file (3 results for each line)? Here is the CSV file contents... MTPC-01,00:02:B3:A2:9D:ED,155.97.15.11 MTPC-02,00:02:B3:A2:B6:F4,155.97.15.12 MTPC-03,00:02:B3:A2:A1:A7,155.97.15.13 MTPC-04,00:02:B3:A2:07:F2,155.97.15.14 MTPC-05,00:02:B3:A2:B8:4D,155.97.15.15 Here

Re: [PHP] looping problem?

2003-12-30 Thread Mike Migurski
>Problem with looping over a CSV file (3 results for each line)? > >Here is the script... >$row = 1; >$file = "fa.csv"; >$id = fopen("$file","r"); > while($data = fgetcsv($id,100,",")) { > $num = count($data); > $row++; > for($c = 0; $c < $num; $c++) { >echo "host $data[0] {\nhard

[PHP] Re: Problem with INSERT Query

2003-12-30 Thread Hadi
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Hi all: > > Well, when i bring out the page with the drop down list it was able to display > all tutors' names from "tutor_name" column. Anyway here's a review of my code > (snip) again before i continue: > -

[PHP] A new PHP/JAVA module

2003-12-30 Thread Jost Boekemeier
Hi, attached is a php/java bridge which uses sockets to communicate with java instead of creating a new JVM for each request. The protocol that is used is very simple but efficient and the Apache/PHP/JAVA solution should be as efficient as Apache/Tomcat/Java for example. This module is based on

[PHP] function problem?

2003-12-30 Thread Jas
Not sure why the last section won't work... /* Function to search for hosts */ function search_dhcp() { if ((empty($_POST['search'])) && (empty($_POST['hosts01'])) && (empty($_POST['hn'])) && (empty($_POST['ma'])) && (empty($_POST['i'])) && (empty($_POST['v']))) { unset($_SESSION['search']);

RE: [PHP] function problem?

2003-12-30 Thread Jay Blanchard
[snip] Not sure why the last section won't work... ...so much code it made my head hurt [/snip] Not sure either. Did you have a question? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] looping problem?

2003-12-30 Thread Hitek
Shorter version of the script: $line = file("fa.csv"); for($i=0;$i $data = explode(",", $line[$i]); echo "host $data[0] {\nhardware ethernet $data[1];\nfixed-address $data[2];\n}\n"; } ?> At 08:10 AM 12/30/2003, Jas wrote: Problem with looping over a CSV file (3 results for each l

[PHP] How do I protect downloadable files?

2003-12-30 Thread news.php.net
Hello, I have wrtten a PHP based web site with a MySql backend and now I want to password protect downloadable files. I have logon and session handling taken care of but I can't figure out how to only allowed those who are currently logged in and above a certain security level to access the downlo

Re: [PHP] How do I protect downloadable files?

2003-12-30 Thread apz
On Tue, 30 Dec 2003, news.php.net wrote: > Creating unique symlinks would be easier but my development machine is > Windows and my server is FreeBSD and I can't create file links under > Windows. Plus, my FreeBSD server is not near me so remote development is > difficult. 1) windows has symlinks

[PHP] saving variables and including files.

2003-12-30 Thread Joe
I used to program in Miva some because it was fairly easy. I got used to using some things and was wondering if there is a PHP equivalent. ")> The first MvEXPORT would at a the new data to the top of the list. The the MvIMPORT with the nested MvEXPORT would add the rest

RE: [PHP] saving variables and including files.

2003-12-30 Thread Jay Blanchard
[snip] Since my webspace limits the number of databases, i'd rather do it without the use of that. [/snip] see file functions in the manual like fopen, fwrite, etc. [snip] My second question is about including pages. would | include the file the same way a SSI include would? [/snip] Like this

[PHP] A hint...

2003-12-30 Thread Jeremy Russell
Hello list.. I was needing a small hint on how to make a sort of status page... What I have is a function that takes a few minutes to complete... It send an snmp signal out then waits a bit and then gets the status via snmp. I would like to have some sort of graphic or page for the status,

RE: [PHP] A hint...

2003-12-30 Thread Jay Blanchard
[snip] I was needing a small hint on how to make a sort of status page... What I have is a function that takes a few minutes to complete... It send an snmp signal out then waits a bit and then gets the status via snmp. I would like to have some sort of graphic or page for the status, e.g. Pe

[PHP] "Secure programmer: Keep an eye on inputs"

2003-12-30 Thread Mike Migurski
This was posted to Slashdot not too long ago, and seems applicable to php-general given the frequent mentions of register_globals and usage of the get and post arrays. It's a detailed explanation of many common ways that software which is overly trusting of its input can be exploited, and underscor

[PHP] connecting to progress db

2003-12-30 Thread php
Hi, I am not sure how to go about this. =( I think my problems are twofold. problem 1. I have to connect to a progress database, for which there is no built-in php support. I have been looking at the unified ODBC functions, but progress isn't one of the supported dbs there either. problem 2. the

Re: [PHP] How to use anchor with php post string to jump to a page???

2003-12-30 Thread Scott Fletcher
Sorry! Here's a better example to what I meant from the last posting when I said something about color=red#RowNum3. --snip-- //Example #1 http://www.yourserver.com/yourpage.htm#RowNum3"; target="doc">Jump //Example #2 http://www.yourserver.com/yourpage.htm?color=red&color1=blue"; target="doc"

[PHP] Flag Options before Compiling PHP...

2003-12-30 Thread Scott Fletcher
Hi! I'm encountering an interesting situation. I can do with one file path in a flag for the compiler without a problem, but with 2 file paths in one flag. What is needed to combine those two paths into one flags? --snip-- LDFLAGS='-L/usr/local/ssl/lib' LDFLAGS="CUSTOMER_ODBC_LIBS='-L/usr/

[PHP] MySQL Sub search - Is there such a thing?

2003-12-30 Thread Vernon
Some one is asking me to create a sub search on a search that has already been done. For instance, the database has 50,000 records, a user does a search for two keywords which yielded 1700 records. They want to now filter that list with other keywords. The logic is that searching 1700 records has

[PHP] What is the Basic function to encode the password upon the authentication..

2003-12-30 Thread Scott Fletcher
Hi! What is the function exactly for encoding the user's typed password in PHP after the HTTP Authentication pop-up window by Apache was submitted? I tried the base64_encode() but it is not the right function. The authentication header here is .. --snip-- header('WWW-Authenticate: Basi

[PHP] Mysql management programme for windows?

2003-12-30 Thread pehepe php
Hi. Do you know any mysql management programme as phpmyadmin but not works on the server. i want to install on my PC. then i connect my database on server from my PC at home. Do you know it? _ The new MSN 8: advanced junk mail prot

Re: [PHP] How do I protect downloadable files?

2003-12-30 Thread Kim Steinhaug
I would go for the 3rd alternative. There are several ways to "stream" the file with the use of headers. This way you can validate the user securely with your logon system, and you can place the files outside the viewable web content. Typically oputside your www / public_html folder. I use this m

RE: [PHP] How do I protect downloadable files?

2003-12-30 Thread Larry Brown
You could have your authorization info in the mysql db including file locations that are stored along with the authorization level necessary to download them. If the person is authenticated to download the file, the php script uses the file location info from the db to open the file and generate t

Re: [PHP] Mysql management programme for windows?

2003-12-30 Thread John W. Holmes
pehepe php wrote: Do you know any mysql management programme as phpmyadmin but not works on the server. i want to install on my PC. then i connect my database on server from my PC at home. Do you know it? Well, you could just run PHPMyAdmin on your own computer and just have it connect to the r

Re: [PHP] What is the Basic function to encode the password upon the authentication..

2003-12-30 Thread John W. Holmes
Scott Fletcher wrote: What is the function exactly for encoding the user's typed password in PHP after the HTTP Authentication pop-up window by Apache was submitted? I tried the base64_encode() but it is not the right function. The authentication header here is .. --snip-- header('WWW-A

Re: [PHP] MySQL Sub search - Is there such a thing?

2003-12-30 Thread John W. Holmes
Vernon wrote: Some one is asking me to create a sub search on a search that has already been done. For instance, the database has 50,000 records, a user does a search for two keywords which yielded 1700 records. They want to now filter that list with other keywords. The logic is that searching 17

Re: [PHP] How to use anchor with php post string to jump to a page???

2003-12-30 Thread Mike Migurski
>Here's a better example to what I meant from the last posting when I said >something about color=red#RowNum3. >--snip-- >As in example #3, PHP seem to be able to distingush the difference when >there is a pound symbol, or "#" in it and know that '#RowNum3' is not part >of the post string to the va

Re: [PHP] MySQL Sub search - Is there such a thing?

2003-12-30 Thread Raditha Dissanayake
Vernon wrote: The logic is that searching 1700 records has got to be faster than searching 50,000 records. No. Not according to theory. If you want to discuss theory it will have to be in database news group this is php. -- Raditha Dissanayake. --

Re: [PHP] How do I protect downloadable files?

2003-12-30 Thread Raditha Dissanayake
Hi, Larry has made a good suggestion. This is something that works because i have also used something simiar. If you really want to get a sophisticated you can use a a simple shopping cart. In our site when we give free downloads for selected users we just inject a zero valued order into the

Re: [PHP] How do I protect downloadable files?

2003-12-30 Thread Kim Steinhaug
However I forgot to mention, all theese header tricks are real swell indeed, but you should get hold of a friend on a macintosh. The method I use doesnt work on the macintosh, so for the mac users we just serve the files "as is", meaning they accually dont get protected... The other methods aswel

[PHP] Re: Testing for Well-Formed XML

2003-12-30 Thread Al
"Ian Williams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > I'm trying to build a validator in PHP, to check that XML documents are > well-formed. As a starting point I'd check out the excellent, open-source PEAR modules available for XML manipulation at http://pear.php.net/p

RE: [PHP] How do I protect downloadable files?

2003-12-30 Thread Larry Brown
Time for them to upgrade to OSX... I've not tried to crack that nut. Is there anyone here who has successfully managed headers for Mac users? It's hard to believe it hasn't been done. -Original Message- From: Kim Steinhaug [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 8:04

[PHP] PHP forms that are valid XHTML

2003-12-30 Thread Tim Burgan
Hello, I'm *very* new to PHP. I am working through the 'Professional PHP Programming' book by Worx. In their forms they use the name attribute (ie. name="example") instead of XHTML's id attribute (ie. id="example"). If I use 'name' my results display on the next page after the submit button is p

Re: [PHP] PHP forms that are valid XHTML

2003-12-30 Thread Tom Rogers
Hi, Wednesday, December 31, 2003, 11:45:37 AM, you wrote: TB> Hello, TB> I'm *very* new to PHP. I am working through the 'Professional PHP TB> Programming' book by Worx. TB> In their forms they use the name attribute (ie. name="example") instead of TB> XHTML's id attribute (ie. id="example"). T

Re: [PHP] PHP forms that are valid XHTML

2003-12-30 Thread Leif K-Brooks
Tim Burgan wrote: In their forms they use the name attribute (ie. name="example") instead of XHTML's id attribute (ie. id="example"). How can I fix this? (X)HTML still requires name to be used for forms. It's usually best to use both name and ID for forms. -- PHP General Mailing List (http://ww

Re: [PHP] PHP forms that are valid XHTML

2003-12-30 Thread Tim Burgan
Thanks for your replies. The name attribute is depreciated in XHTML for use with the input tag and has been replaced with the id attribute. The name element can still be used in the form tag though. What I'm looking for is something similar to ASP's GetElementByID("example"); Thanks Tim Burgan

RE: [PHP] How do I protect downloadable files?

2003-12-30 Thread Andrew Séguin
I have not tested with mac but I had problems with certain versions of IE in a similar script where it would basicaly show the binary content within IE rather then initiate a download. What I saw was when I verified the headers returned, the headers were repeated. Therefore I had something like:

Re: [PHP] How do I protect downloadable files?

2003-12-30 Thread Andrew Séguin
Quite true. I typed away from memory my sample headers, the actual script was done about 3 months ago and is on a protected intranet server I don't have access to quite at the moment ;). My apologies for the mistake, Thank you for pointing that out :) Andrew. > In a message dated 12/30/2003 9:3

[PHP] Re: Selecting between using letters

2003-12-30 Thread Kim Steinhaug
Im on my way to bed so short do it yourself answer, but you should look up the regex part of mySQL. I think you can match the beginning and end of a coloumns entry. And using the power of the regex function you could make a WHERE statement for somethink like [a-e] if it was a-e you were looking fo

[PHP] Re: connecting to progress db

2003-12-30 Thread Aidan Lister
Hi, "Php" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am not sure how to go about this. =( I think my problems are twofold. > > problem 1. I have to connect to a progress database, for which there is > no built-in php > support. I have been looking at the unified ODBC fun

[PHP] Re: PHP5 XML functions

2003-12-30 Thread Aidan Lister
I wish, I'm interested as well :/ <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've just gotten PHP5 B3 working using the precompiled binaries under Win XP, > but the dom xml functions of PHP4 don't seem to be immediately available. > Does anyone have suggestions on how to learn t

[PHP] Re: Failed error_log directive

2003-12-30 Thread Aidan Lister
I still have not found a solution to this problem. What are some debugging steps I could take? "Aidan Lister" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I am trying to log all php script errors from a virtualhost to a file. > A callback function is not the solution I

Re: [PHP] Re: PHP5 XML functions

2003-12-30 Thread Ray Hunter
Make sure that in your php.ini file that you have uncommented that the php_dom extensions and any other extensions that you want to use. Also make sure that php and your web server have access to the extensions. I usually place my extensions in the system path where they can be accessed. Also, I

[PHP] Securing Free Scripts

2003-12-30 Thread Ian
If I am putting out a couple free scripts to the public, is there any way I can make sure people dont remove the copyright? Any ideas welcome - Ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing Free Scripts

2003-12-30 Thread John W. Holmes
Ian wrote: If I am putting out a couple free scripts to the public, is there any way I can make sure people dont remove the copyright? No. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP G

RE: [PHP] Securing Free Scripts

2003-12-30 Thread Ugo Bellavance
> -Message d'origine- > De : Ian [mailto:[EMAIL PROTECTED] > Envoyé : Wednesday, December 31, 2003 12:21 AM > À : [EMAIL PROTECTED] > Objet : [PHP] Securing Free Scripts > > > If I am putting out a couple free scripts to the public, is there any > way I can make sure people dont remove

RE: [PHP] Securing Free Scripts

2003-12-30 Thread Jake McHenry
> -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 31, 2003 12:39 AM > To: Ian > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Securing Free Scripts > > > Ian wrote: > > > If I am putting out a couple free scripts to the public, is > there an