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

2002-01-21 Thread Jim Lucas [php]
Try this: ? $maildb = file(mailaddr.txt); foreach ($maildb as $address) { mail($address, This is the subject., This is the message, From: \Jose Pablo\ [EMAIL PROTECTED] \nTo: \To Name\ $address); } ? Jim Lucas bend.com - Original Message - From: DL Neil [EMAIL PROTECTED] To: Josepablo

[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.

[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

[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 this

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

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] =

[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

[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]');

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

[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: ? $db_name = name; $table_name = my_contacts; $connection = @mysql_connect(www.myserver.net, username, password) or die (couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die (couldn't select

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:

[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

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

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 create an

Re: [PHP] Uploads

2002-01-21 Thread Dennis Moore
make sure you set the max_file_size in your form. ie input type=hidden name=MAX_FILE_SIZE value=800 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:

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] [EMAIL

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 thisOut the window

[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] 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] 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] 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) -

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,

[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 data

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

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] 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 of

[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 =

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 into

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

[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

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, because

[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 it

[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

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: 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

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 if

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 details

[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

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

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

[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 know of

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] 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

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 setting

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

[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

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] public xml repository?

2002-01-21 Thread Vincent Stoessel
I have found this wonderful xml resourse for the US house of Representatives http://xml.house.gov/ 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

[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

[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

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

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.

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)

[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 ? input type=radio name=reg_method value=phone By Phone INPUT type=radio

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

<    1   2