RE: [PHP] PHP-JavaScript

2002-01-21 Thread Sukumar S.
You can store the data which is in JS to PHP when submiting the page. From the Web Page which has the form, include some hidden type variables in the html form. On submit call the JS function and store the JS Data into the WEB form hidden variable and then submit it. so that your php applicatio

[PHP] Writing to text file from Radio Buttons

2002-01-21 Thread Harphajan Singh
Greeting dudes ! I`m a fresh user of PHP and need some technical assistance from you folks. I`m creating a survey form(using radio buttons) and it looks like this :- Q1) How do you register for the hostel ? By Phone By E-Mail Walk-In to office Q2)Do the authorities respond to y

Re: [PHP] PHP Security - "view source code"

2002-01-21 Thread Sukumar S.
Dear all, One more measure thing to stop getting the source code with .inc is to deny the files which has "inc" extension in Apache httpd.conf itself with "DIRECTORY" configuration. with regards, Sukumar .S On Thu, 17 Jan 2002, Radu Filip wrote: > Date: Thu, 17 Jan 2002 02:10:01 +0200 (EET)

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Peter Janett
I hate mention another language, but query caching is one area where Cold Fusion shines. (I'm a huge PHP fan and user, I'm just sharing my experience.) I have worked on sites with high traffic, and been able to greatly reduce the page load times and database load by using "cached queries". Here

Re: [PHP] Passing. Which method to use?

2002-01-21 Thread Richard Baskett
I vote for sessions! Rick "We should be careful to get out of an experience only the wisdom that is in it - and stop there; lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again--and that is well; but also she will never sit down on a cold on

[PHP] Passing. Which method to use?

2002-01-21 Thread Floyd Baker
Hi once again. What's the consensus on the best way to pass arrays from page to page? By serializing? But I think it's not recommended? By writing then reading to a text file? Maybe? By inputting to and pulling from db records? Possibilities? Any other? Thanks in advance. Floyd --

[PHP] New Metabase Aniversary release

2002-01-21 Thread Manuel Lemos
Hello, Finally I made time to put a new Metabase release together celebrating the 2nd aniversary since its first public release which is also the 3rd aniversary since I started developing it. For this release I added new features that either were requested or contributed: - Query result bulk da

[PHP] public xml repository?

2002-01-21 Thread Vincent Stoessel
I have found this wonderful xml resourse for the US house of Representatives but I cannot find an equivent for the Senate. Does anyone know where a current xml file of the Senate membership might be online? Thanks. -- Vincent Stoessel [EMAIL PROTECTED] Linux and Java Appli

Re: [PHP] How to call Calling Non-Existing function

2002-01-21 Thread S. Murali Krishna
Thanks This is also a quite good idea to do that. Thanks again. If you found some other method please mail me. On Mon, 21 Jan 2002, val petruchek wrote: > Not sure this is exactly what you need but try this: > > @Draw_Table() or default_func(); > > > Valentin Petruchek (aki Zliy Pes

[PHP] session_register and class variables

2002-01-21 Thread Bradley Goldsmith
Hi All, I am having problems with a class and session_register(). I define a class (parital implimentation below) with some variables and call session_register at the top of each page. After I change pages, I end up with all three variables containing the data from szAff

RE: [PHP] How should I cache database data for php?

2002-01-21 Thread Matt Friedman
My experience has been that large sites that need lots of db and file access and that are heavily trafficked use a file caching solution. Results of db queries and dynamic pages are loaded into flat files which the client then browses. This is the type of system used by sites that get in the mil

Re: [PHP] Best way to get the remote IP address?

2002-01-21 Thread Jimmy
> either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use > $REMOTE_ADDR in functions make sure you do a global on it first) - I > personally use $REMOTE_ADDR, but you should read the docs for details... using $REMOTE_ADDR directly is fine as long as the "register_global" setti

[PHP] yahoo servers for hosting

2002-01-21 Thread Vincent Stoessel
Hello, Has anyone used Yahoo's cobalt server to host a php/mysql website? What are some good alternatives for php/mysql hosting? Thanks. -- Vincent Stoessel [EMAIL PROTECTED] Linux and Java Application Developer (301) 362-1750 AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica -- PHP Gener

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Manuel Lemos
Hello, Jeff Bearer wrote: > I want the app to query the caching layer just about the same way it > queries the database, but add a few other details, time to live, cache > name etc. The caching layer will check to see if the query is cached, > make sure it's not expired, and return the data just

[PHP] Re: How should I cache database data for php?

2002-01-21 Thread Manuel Lemos
Hello, Jeff Bearer wrote: > > Hello, > > I have a PHP content management application that I've developed. I'm > looking to add data caching to it so the database doesn't get pounded > all day long, the content on the site changes slowly, once or twice a > day. > > Does anyone

RE: [PHP] file upload with story

2002-01-21 Thread Martin Towell
I'm assuming all this data is coming in from a form - somewhere in the manual (too lazy at the monent to look where) there's a section on how to upload files. Once a file is uploaded (in your case, an image), just move it to somewhere accessable. Have field in the database that contains the name o

Re: [PHP] Uploads

2002-01-21 Thread Bogdan Stancescu
Ok, I've run into this myself. Two possible reasons: 1. PHP 2. MySQL NOT POSSIBLE REASON: execution time. You only get to execution time after uploading the data, so that doesn't count - you may take long to send the actual file, not afterwards. Ok, the two possibilities: 1. PHP php.ini, as you

[PHP] domxml: getting a node's XML (using xmlDumpNode)

2002-01-21 Thread Thomas Gagne
Sure, documents can call dumpmem(), but there's no way to get the XML of a node. Until now! Not knowing at all what I was doing, I copied code from the function unlink_node and modified it to call xmlDumpNode(). It works for me, though I expect there's probably a memory leak in it since I don't

Re: [PHP] file upload with story

2002-01-21 Thread Jason Wong
On Tuesday 22 January 2002 07:00, will hives wrote: > Please can someone help, I can't find any answers anywhere > > I have this code: > [snip] > > it's really just an online contacts book, what I want to do as have the > ability to upload an image with the record. > > Then when the contact d

Re: [PHP] Uploads

2002-01-21 Thread Jason Wong
On Tuesday 22 January 2002 07:35, Ronald Tezuka wrote: > I've got it set to 100 megs for both the browser and the php.ini file, I > just set a really high limit as not to come close to the files I am trying > to upload. However it still seems to load up a blank page and doesn't > upload the file

[PHP] Re: foreach array into mail isn´t working

2002-01-21 Thread Ken Gregg
Blank lines are important to the parsing of mail messages. File does not strip newlines. Try your code and strip the newlines off the email addresses. If you still have problems try it and drop the newlines from the subject. Ken Gregg Enhanced Data Systems, Inc. http://www.rwre.com for the best

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Bogdan Stancescu
...or if you don't know where it's going to end up and you don't know if you're able to disable them you can use this function instead of addslashes() - which is what I do: // Bogdan Stancescu <[EMAIL PROTECTED]>, 2001 function gpc_slashes($unslashed) { if (phpversion()>=4) { if (

[PHP] Re: How should I cache database data for php?

2002-01-21 Thread Garth Dahlstrom
my two cents... I used to work at a newspaper we used a very elaborate caching system, it used to function at the at the page subcomponent level (i.e. header, footer, left nav, articles were all stored separately) AND page level. The page subcomponents were cached together as pages. This w

[PHP] Re: PHP vs Java reliability

2002-01-21 Thread Michael Kimsal
Philip Hallstrom wrote: > http://www.zend.com/zend/art/php-over-java.php > > the "Why PHP" on zend.com is a great place to go for this sort of stuff... > Honestly, it doesn't seem all that professional a resource paper for some reason. It's not technical enough, primarily, and I don't think

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Michael Sims
> > Just curious, but why are you having to stripslashes() on the data coming > > out of the database? Do you have magic_quotes_runtime enabled on your > server? > >I honestly don't know... all I know is that I'm adding slashes on the >way into the database, and stripping them on the way out, b

[PHP] open php as stream

2002-01-21 Thread Ken Gregg
This is a tough one to explain but here goes. Running php as cgi on apache. I am converting from FirstBase (cgi macro processor) to php and I need to process a php script from Firstbase running as a cgi program. The problem is php ignores the command line (-f and script parameters) passed in pop

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Jim Lucas [php]
function Build_Array($mysql_result_pointer) { if(mysql_num_rows($mysql_result_pointer)) { $res[] = mysql_field_name($mysql_result_pointer); while($row = mysql_fetch_array($mysql_result_pointer)) { $res[] = row; } } return($res); } Jim Lu

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Justin French
Many thanks to both Michael and Bogdan. Michael Sims wrote: > Just curious, but why are you having to stripslashes() on the data coming > out of the database? Do you have magic_quotes_runtime enabled on your server? I honestly don't know... all I know is that I'm adding slashes on the way int

[PHP] Re: counting with dates (help!)

2002-01-21 Thread Ken Gregg
Another macro language I used had a newdate function. Pass it a data and an offset in number of days and it would return the new date. I duplicated it in php here: function newdate( $strdate, $ndays) { # strtotime doesn't like dashes $strdate = str_replace("-","/",$strdate); $temp = strtotime

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Michael Sims
At 11:12 AM 1/22/2002 +1100, Justin French wrote: >Hi all, > >I've got into the habbit of pulling data out of a table something like this: [...] > $id = $sql_myrow["id"]; > $date = $sql_myrow["date"]; [...] >Now, I reckon there must be a way of automating the task of making the >$title var out

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Bogdan Stancescu
function make_vars($result) { $fields = mysql_num_fields($result); if ($myrow = mysql_fetch_array($result)){ for ($i=0; $i < $fields; ++$i){ // > $names = mysql_fieldname($result,$i); global $$names; $$names = $myrow[$names]; } return true; }else{

Re: [PHP] ok, I ask again.. how to encrypt to be able to match database info?

2002-01-21 Thread Tom Rogers
Hi Encrypt the password from the form using the same salt value as the one used for the database then compare them... Tom At 05:36 22/01/02, Hawk wrote: >I've asked this several times but it doesn't seem like anyone understands my >problem, the passwords are encrypted in the database, but I don

[PHP] smarter code (mySQL arrays)

2002-01-21 Thread Justin French
Hi all, I've got into the habbit of pulling data out of a table something like this: $sql = "SELECT * FROM cd_review WHERE publish='yes' ORDER BY id DESC LIMIT 3"; $sql_result = mysql_query($sql); print mysql_error(); while ($sql_myrow = mysql_fetch_array($sql_result)) { // pull out the dat

Re: [PHP] Printer funtions

2002-01-21 Thread Bogdan Stancescu
It most certainly connects to the printer on the server machine. Hints to why that is so: 1. the reference to php.ini 2. the reference to only working under Windows 3. common sense Just my 2c. Bogdan James Mclean wrote: > All, > > I have been reading through the php.net printer function pages

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
Josepablo, > Jim Lucas, i tried your code still same problem. > > DL: Maybe the problem is in sendmail? > I tried all you said.. and yes iam running sendmail on all the servers. Anyways >still doesnt work. =( =ok, so are you saying that the code that I gave you (edited version of your own) -

[PHP] Printer funtions

2002-01-21 Thread James Mclean
All, I have been reading through the php.net printer function pages, but from what I can see it does not look like the docs are that good. basically, I want to run through to see if any one has any pointers before using the PHP printers funtions. IE does printer_open() open a connection to

Re: [PHP] Uploads

2002-01-21 Thread Ronald Tezuka
I've got it set to 100 megs for both the browser and the php.ini file, I just set a really high limit as not to come close to the files I am trying to upload. However it still seems to load up a blank page and doesn't upload the file if greater than 6 megs. Ron >From: "Dennis Moore" <[EMAIL

[PHP] Tree class that can read/write/access/... DB and XML data

2002-01-21 Thread Wolfram Kriesing
as i had announced a while ago on pear-dev that i have a tree class which works on DB-data, now it is more enhanced and also works on XML (for now it can only read but within a week or something it will also be able to write) short description: - this class reads data from

Re: [PHP] 2d array help

2002-01-21 Thread Kurth Bemis
Yes I do... for an online billing system... Kurth Bemis Senior Network Admin/Owner: USAExpress.net Owner: Ozone Computer http://kurth.hardcrypto.com PGP Key Avail. - Uh!.Uh!.Uh!."I'm done with this."...Out the windo

Re: [PHP] Uploads

2002-01-21 Thread Ronald Tezuka
Okay, I changed the max execution time from 30 seconds to 3000 seconds (approximately 50 minutes) It still happens though. Is there a client side timeout (browser) that I need to change? I couldn't find any sort of option like that in Internet Explorer. Ron >From: "Jim Lucas [php]" <[EMAI

Re: [PHP] Uploads

2002-01-21 Thread Dennis Moore
make sure you set the max_file_size in your form. ie or set it in your php.ini or .htaccess file. /dkm - Original Message - From: "Ronald Tezuka" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 5:50 PM Subject: [PHP] Uploads > If anyone can help me out,

Re: [PHP] Uploads

2002-01-21 Thread Jim Lucas [php]
make sure you increase your script timeout limit. Jim Lucas - Original Message - From: "Ronald Tezuka" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 2:50 PM Subject: [PHP] Uploads > If anyone can help me out, that'd be greatly appreciated. I'm trying to > cr

Re: [PHP] 2d array help

2002-01-21 Thread Jim Lucas [php]
$result = mysql_query( "SELECT pkgid FROM plans"); while($row = mysql_fetch_assoc($result)) { $package = mysql_fetch_assoc(mysql_query( "SELECT * FROM plans WHERE pkgid='$row[pkgid]'")); } obviously this will have $package = array("key" => "value", ...); are you wanting to have the above be

[PHP] Uploads

2002-01-21 Thread Ronald Tezuka
If anyone can help me out, that'd be greatly appreciated. I'm trying to create an upload form. Now I've checked both in books and online, and maybe it's becuase I'm trying a weird application, but I can't seem to get uploads greater than 6 megs. If it is greater than 6 megs, it loads up a bl

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
JP, Did so while I was waiting for your response. The original format is exactly as you describe. However removing the newlines works perfectly (on WinNTWS4.0 into STMP). Will send the results (as attachments) to your address/not to the list. Regards, =dn - Original Message - From: "Jo

[PHP] file upload with story

2002-01-21 Thread will hives
Please can someone help, I can't find any answers anywhere I have this code: it's really just an online contacts book, what I want to do as have the ability to upload an image with the record. Then when the contact details are viewed it shows the also uploaded image. How do I add that co

Re: [PHP] 2d array help

2002-01-21 Thread Erik Price
I'm not sure exactly what you need help with, but if you're getting any errors, I'd recommend adding the resource identifier to your mysql_* functions (usually ($db = mysql_connect(), but YMMV). But I wonder if you were trying to do something else? Erik On Monday, January 21, 2002, at 05:51

[PHP] 2d array help

2002-01-21 Thread kurth
arg- trying to get the data that I pull outta my db into a 2d assoc array... any help? ~kurth $result = mysql_query( "SELECT pkgid FROM plans"); while($row = mysql_fetch_assoc($result)){ $resultpkg = mysql_query( "SELECT * FROM plans WHERE pkgid='$row[pkgid]'");

[PHP] templates

2002-01-21 Thread Yorke
I was wondering if anyone knew of alternatives to the TEMPLATES methodology? thanks Yorke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED

Re: [PHP] function trouble: pass by referrence

2002-01-21 Thread Jim Lucas [php]
where ever you are going to referance $HTTP_POST_VARS use $GLOBALS[HTTP_POST_VARS] and then use that inside your function. function myFunc() { foreach($GLOBALS[HTTP_POST_VARS] AS $k => $i) { $GLOBALS[HTTP_POST_VARS][$k] = stripslashes($i); $GLOBALS[HTTP_POST_VARS][$k] = st

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
JP, (and good afternoon to CR!) > Linux =straight into sendmail or some other email server? > Why the admin e-mail? i tested on two diffrent servers didnt work. =because I was wondering where the strange 'from' email address came from. Are they configured to different addresses? > YEah.. i t

[PHP] Re: function trouble: pass by referrence

2002-01-21 Thread David Robley
[EMAIL PROTECTED] (Bryan McCloskey) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: > Hello all, > > I'm trying to pass the $HTTP_POST_VARS array into a > function to run some things like strip_tags, trim, and > htmlspecialchars on all of the variables. If possible, > I would like to pass

[PHP] PHP/HTML Forms and saving files

2002-01-21 Thread laura varney
I have a html form that people enter data into, when they click submit, a php file is called, this displays the data in a desired format, the user then has to click on another submit button...this button needs to save the current file (without the button). My question is how do i save the fil

[PHP] function trouble: pass by referrence

2002-01-21 Thread Bryan McCloskey
Hello all, I'm trying to pass the $HTTP_POST_VARS array into a function to run some things like strip_tags, trim, and htmlspecialchars on all of the variables. If possible, I would like to pass this array by referrence, and have the function make changes to the actual array and not a copy. Accomp

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread Jim Lucas [php]
Try this: \nTo: \"To Name\" <$address>"); } ?> Jim Lucas bend.com - Original Message - From: "DL Neil" <[EMAIL PROTECTED]> To: "Josepablo Pérez" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 1:59 PM Subject: Re: [PHP] foreach array into mail isn´t working > Jos

RE: [PHP] ok, I ask again.. how to encrypt to be able to match database info?

2002-01-21 Thread Martin Towell
whichever way the original password was encrypted, encrypt the incoming password the same way, ie. if the original was encrypted in php, encrypt the incoming password in php before passing it to the sql statement, similarly if the original password was encrypted using mysql. Martin -Original

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
Josepablo, > $maildb = file("mailaddr.txt"); > > foreach ($maildb as $address) > { mail($address, "THis is the subject\n", "This is the message\n", "From: >[EMAIL PROTECTED]\n"); } > ?> > > The mailaddr.txt looks like: > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > However th

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Jeff, Seeing Richard thinks I have blue (?blood) in (my) veins, I'd better respond nobly and quickly... > Yes the db server and the webserver are on the same box, local > connections are much faster than network ones according to mysql. When > the site is busy the percent of the system being u

[PHP] foreach array into mail isn´t working

2002-01-21 Thread Josepablo Pérez
Hello people, I got this script: The mailaddr.txt looks like: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] However the script does send mails BUT they look like this: >From Nobody <[EMAIL PROTECTED]> To [EMAIL PROTECTED] Subject [No Subject] **From here down is the message body*

Re: [PHP] ftp functions

2002-01-21 Thread Jim Lucas [php]
the copy() function is subject to the same problem that the ftp functions are. you are trying to call a function that is on the remote server and you want it to do things to the local machine. unfortunatly you cannot do this. through a web browser you have no direct access to the local client m

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Jeff Bearer
DN, Yes the db server and the webserver are on the same box, local connections are much faster than network ones according to mysql. When the site is busy the percent of the system being used by mysql and that being used by PHP/Apache, I estemate would be around 90%-10% so if I get the db

Re: [PHP] Best way to get the remote IP address?

2002-01-21 Thread Ing. Daniel Manrique
> I can't seem to find any references to HTTP_X_FORWARDED_FOR in the PDF PHP > documentation from January 2001, so you should probably best stick with > either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use > $REMOTE_ADDR in functions make sure you do a global on it first) - I

Re: [PHP] Best way to get the remote IP address?

2002-01-21 Thread Bogdan Stancescu
I can't seem to find any references to HTTP_X_FORWARDED_FOR in the PDF PHP documentation from January 2001, so you should probably best stick with either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use $REMOTE_ADDR in functions make sure you do a global on it first) - I persona

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
> >>>Even with straight HTML, a server's load capacity is not infinite. If > >>>my own server, an old Pentium with 4 GB of hard drive space, and which > >>>serves nothing but static HTML pages, got hit with more than a couple > >>>hundred hits in a short period of time, it would bomb. > >>> > >>>

[PHP] Nobody know nothing about? Php login scripts using PHP4.01, Apache3.01CGI on W2K

2002-01-21 Thread ignacio . estrada
Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 ignacio.estrada@ cfe.gob.mx Para: [EMAIL PROTECTED] cc:

[PHP] Connection to MySQL with SSL.

2002-01-21 Thread Rodolfo Gonzalez
Hi, if a MySQL server is compiled with SSL support (that's for the 4 series), is it possible to use this secure connection from a PHP script (with mysql_connect)?. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP] ok, I ask again.. how to encrypt to be able to matchdatabase info?

2002-01-21 Thread Antonio S. Martins Jr.
On Mon, 21 Jan 2002, Hawk wrote: > I've asked this several times but it doesn't seem like anyone understands my > problem, the passwords are encrypted in the database, but I don't know how > to match an unencrypted password from the login form with the database? > is it possible to encrypt the pa

Re: [PHP] ok, I ask again.. how to encrypt to be able to match database info?

2002-01-21 Thread Mark
what kind of encryption are you talking about? If you mean mysql's password() function, then no you can't do that in php. obviously whatever you use has to match the original encryption. - Mark On Mon, 21 Jan 2002 20:36:59 +0100, Hawk wrote: >I've asked this several times but it doesn't seem li

Re: [PHP] Index.PHP won't load like Index.HTML

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 20:44 * Dion said > I finally got PHP running on Apache in WinXP. I can execute PHP and all > that, but I can't get it to open in "index.php" file like it would open an > "index.html" file.. ie, first file it looks for in a ne

[PHP] Index.PHP won't load like Index.HTML

2002-01-21 Thread Dion
I finally got PHP running on Apache in WinXP. I can execute PHP and all that, but I can't get it to open in "index.php" file like it would open an "index.html" file.. ie, first file it looks for in a new directory is "index.xxx" but it won't open the PHP file... Anyone tell me what i need to chan

[PHP] ok, I ask again.. how to encrypt to be able to match database info?

2002-01-21 Thread Hawk
I've asked this several times but it doesn't seem like anyone understands my problem, the passwords are encrypted in the database, but I don't know how to match an unencrypted password from the login form with the database? is it possible to encrypt the password I sent from the form in php or does

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
DL Neil wrote: >>>Even with straight HTML, a server's load capacity is not infinite. If >>>my own server, an old Pentium with 4 GB of hard drive space, and which >>>serves nothing but static HTML pages, got hit with more than a couple >>>hundred hits in a short period of time, it would bomb. >>>

Re: [PHP] ftp functions

2002-01-21 Thread sundogcurt
Would you suggest that I use the copy function instead? I have tried the copy function in a prelim test and I had trouble with the function "finding" the file on the local machine. From what I have seen in the FAQs on PHPBUILDER and this is not an uncommon problem. One possible solution was tha

Re: [PHP] when 1+1 is not equal to 2... STRANGE float behavior

2002-01-21 Thread Marc Swanson
Answered my own question... rounding using the "round" function to two decimal places did the trick: = $contract_amount)\n\n"; if(($paid_to_date + $billable_this_month) >= $contract_amount) { echo"true"; } else { echo"false"; } ?> now outputs "true". :-) -- --

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
> > Even with straight HTML, a server's load capacity is not infinite. If > > my own server, an old Pentium with 4 GB of hard drive space, and which > > serves nothing but static HTML pages, got hit with more than a couple > > hundred hits in a short period of time, it would bomb. > > > > I must

Re: [PHP] While on array?

2002-01-21 Thread anders nawroth
> ie - i have: > while($myrow=mysql_fetch_array($result)) { etc... > > But i want the loop to run with an array i created earlier ($anotherarray = > [key1] => value1, [key2] => value2). > use foreach($anotherarray as $key => $value) { . A Nawroth -- PHP General Mailing List (http://www.

[PHP] when 1+1 is not equal to 2... STRANGE float behavior

2002-01-21 Thread Marc Swanson
I understand the issues about binary precision for floating point numbers on standard base 2 systems but I'm unsure of the propper way to fix this problem. Here is the base test case: = $contract_amount)\n\n"; if(($paid_to_date + $billable_this_month) >= $contract_amount) { echo"t

Re: [PHP] Re: Programming a state controller for page transitions

2002-01-21 Thread Geoff Caplan
Erik > I can't imagine how a collaborative effort can work with obfuscated > source... Nor can I, but it is surprising how often I download code that is pretty much unreadable. I think a lot of people who try to get projects going just don't think this through, and then wonder why they don't ge

[PHP] Best way to get the remote IP address?

2002-01-21 Thread Alan McFarlane
I'm trying to get the remote IP address of a user in a (PHP) version and server-software independant way, but am having a few problems. Obviously, I've seen $HTTP_SERVER_VARS['REMOTE_ADDR'], but Ive also seen references to $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']. Is there any generic solution

Re: [PHP] Tracking users...

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 19:58 * jas said > I am fairly new to PHP and have setup a site that connects to a MySQL db to > store different information from our users, however what I would like to > setup is something that I could place on a few pages to

Re: [PHP] ftp functions

2002-01-21 Thread Jim Lucas [php]
one problem, the ftp functions that you are trying to use are on the server. therefor you are trying to connect one "server" to another "server". you are not connecting from your workstation to the remote server. for what you are attempting to do, ftp will not work. Jim Lucas - Original Mes

[PHP] Tracking users...

2002-01-21 Thread jas
I am fairly new to PHP and have setup a site that connects to a MySQL db to store different information from our users, however what I would like to setup is something that I could place on a few pages to track users for demographic purposes. What I need to do is as a page is visited I need to ge

[PHP] ftp functions

2002-01-21 Thread sundogcurt
Before I get flamed for not reading the manual or trying on my own, I would just like to say that I have been working on this for a few days and have read the manual and looked at quite a few examples, all of which seem to elude me. I want to upload an image, and I want to use the ftp functi

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
> Even with straight HTML, a server's load capacity is not infinite. If > my own server, an old Pentium with 4 GB of hard drive space, and which > serves nothing but static HTML pages, got hit with more than a couple > hundred hits in a short period of time, it would bomb. > > I must be misunders

RE: [PHP] Error notification and pretty error page

2002-01-21 Thread Alex Dowgailenko
Create a function like error_handling() in it have it do echo "We're sorry, we are currently experiencing technical difficulties" blah blah blah and have it email you whatever mysql_error() says. then do: mysql_query("SELECT whatever FROM whatever") or die(error_handling()); > -Original Me

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be misunderstanding

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
> It seems to me that the major problem with news sites such as cnn.com or > msnbc.com on dates like 9/11 was the sheer number of visitors coming to > the site. No matter how the pages were served up, the load was > unbearable for the servers. You see, giving user static or dynamic pages differs

[PHP] associative arrays..help!

2002-01-21 Thread Sandeep Murphy
Hi, This is a long one so pl bear with me... I have an XML structure as follows: 001 WORD //SUB APPLICATION 002 excel

Re: [PHP] Re: Programming a state controller for page transitions

2002-01-21 Thread Erik Price
Check out phorum's source, I find it very well-documented and educational. I can't imagine how a collaborative effort can work with obfuscated source... On Saturday, January 19, 2002, at 05:03 AM, Geoff Caplan wrote: > Some authors compound the problem by using cryptic variable names, > thou

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
Are you sure that cacheing database data is the right way to approach the problem? How about using a cron job to write static HTML pages from live data? You could set up such a system to run every few hours or so. I haven't done that in PHP, but it's something I'm looking at doing for a Pe

Re: [PHP] File upload

2002-01-21 Thread Bogdan Stancescu
The official way to do this would be using the "accept" attribute: accept = content-type-list [CI] This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. User agents may use this information to filter out non-conforming files when

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
> Since reading your first post I've been racking my brains/teasing my memory. I'm sure there's an article on one > of the popular PHP sites that talks about exactly this: creating a web page dynamically, but serving it as > static HTML (ie with no back-end db access per serving). This idea came

Re: [PHP] PHP-JavaScript

2002-01-21 Thread Richard Crawford
Yes, but only in MSIE. As far as I know, no other browser supports the innerHTML property; at least, I have never managed to get it to work in Netscape, Mozilla, Konquerer, or Opera. And I stand firmly behind my earlier statement that developing code that bombs on non-MSIE browsers is a bad

[PHP] PHP cross referencer

2002-01-21 Thread DL Neil
Is anyone aware if such a debugging/documentation tool exists? What is/do I mean by a "cross referencer"? A tool which will list all of the variables (and function names ?and include files) used within a program/script, together with the line number(s) where they are mentioned - hopefully diffe

RE: [PHP] PHP-JavaScript

2002-01-21 Thread Tim Ward
hence my qualification, but you can alter the contents of elements using javascript on the fly, using the innerHTML property, for example. Tim www.chessish.com > -Original Message- > From: Richard Crawford [SMTP:[EMAIL PROTECTED]] > Sent: 21 January 2002 15:59 > To: Tim

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
> > The greatest way of doing this is > > 1. develope php-script for generating updated html from moved php-script > > and updating index.html (e.g. ;) > > 2. develope another script or program which will call the first one > > periodically (once an hour, e.g.) > > I like that. > It sounds

Re: [PHP] Having a problem with sessions, Part Deux.

2002-01-21 Thread Henrik Hudson
I am using files on both systems. The session "files" are also showing up on both systems. (/tmp) On Monday 21 January 2002 08:15, Jaime Bozza wrote: > Henrik, >Which session handler are you using? Files, mm, User? > > Jaime Bozza > > > > -Original Message- > From: Henrik Hudson [ma

Re: [PHP] File upload

2002-01-21 Thread JSheble
you could write a bit of JavaScript to run on the form's onSubmit event or even the fields onBlur event. Then in your JavaScript, parse out the file name and extension to validate. It's not 100% accurate since users could rename any file to have a JPG extension, but it works for the majority.

Re: [PHP] .php unrecognizable extension

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 17:45 * Dion said > I am running Apache 1.3 on WindowsXP just for some developement stuff that I > do at home. I just installed PHP to the server but I can't get it to > recognize .php as an extension and to have it load those

Re: [PHP] Regex error

2002-01-21 Thread Bas Jochems
use $rgTemp = split('[|]',$szTag); instead of $rgTemp = split("|",$szTag); on line 2 PHP List wrote: > Hi, > Can someone please tell me why the this is happening: > > 1) $szTag = "test|3"; > 2) $rgTemp = split("|",$szTag); > 3) $szTag = $rgTemp[0]; > 4) $nItemID = $rgTemp[1]; > ^lin

  1   2   >