Re: [PHP] html mail

2003-03-10 Thread Mark Heintz PHP Mailing Lists
The PEAR Mail_mime class tends to take the headache out of this sort of thing. See the example at the bottom of the manual page: http://pear.php.net/manual/en/core.mail.mime.php mh. On Mon, 10 Mar 2003, [iso-8859-1] Ian A. Gray wrote: Hi, I am quite new to php and I am trying to find a way

Re: [PHP] form submission and storing variables

2003-03-10 Thread Mark Heintz PHP Mailing Lists
You can initiate a POST from within your script using cURL, assuming your php installation has cURL support enabled. Check http://www.php.net/curl for details. mh. On Mon, 10 Mar 2003, Doug Parker wrote: I'm sending information to be processed by a third party site. I need to store the

Re: [PHP] Multi-select inputs and naming

2003-03-10 Thread Mark Heintz PHP Mailing Lists
On Mon, 10 Mar 2003, Dan Phiffer wrote: Am I correct in my understanding that for a multi-select input, PHP requires that the name attribute end with square brackets (i.e. select name=my_select[] multiple) in order for the submission be handled properly? As far as I know, that is correct.

Re: [PHP] Is the problem a server setting?

2003-03-10 Thread Mark Heintz PHP Mailing Lists
It sounds like either allow_url_fopen is set to false or php was compiled with --disable-url-fopen-wrapper. Either way, checking the output of phpinfo() should give you your answer. mh. On Mon, 10 Mar 2003, Chad Henderson wrote: Thanks for the reply. If they did upgrade PHP, which I am fairly

Re: [PHP] A question of time...

2003-03-10 Thread Mark Heintz PHP Mailing Lists
On Mon, 10 Mar 2003, Robert Cummings wrote: All in all I spent 20 hours total for the client at a rate of $40 USD/hr which I believe is on the low end of freelance. I myself have 3 years experience devloping PHP web applications. So the question I ask is whther this time frame is

Re: [PHP] Multi-select inputs and naming

2003-03-10 Thread Mark Heintz PHP Mailing Lists
On Mon, 10 Mar 2003, Dan Phiffer wrote: I guess this question was coming from a couldn't they have designed in a cleaner way? perspective. Don't get me wrong, I think the way PHP does an outstanding job of handling these particular kinds of form submissions, I just figured there might be an

Re: [PHP] Question

2003-03-10 Thread Mark Heintz PHP Mailing Lists
if($recordcount % 4 == 0) { echo '/tdtd'; } mh. On Mon, 10 Mar 2003, Clint Tredway wrote: I have a display of images that every fourth image I want to start a new column. In ColdFusion I would use the MOD operator like this: if query.recordcount MOD 4 eq 0 /td td /if I

Re: [PHP] Easy Way.

2003-03-09 Thread Mark Heintz PHP Mailing Lists
You're looking for the str_pad function. http://www.php.net/str_pad $i = 3; $i = str_pad($i, 5, '0', STR_PAD_LEFT); echo $i; // outputs '3' Just keep in mind that it won't help you if your input is greater than 5 to begin with, you'll have to check that seperately. $j = 123456; $j =

[PHP] Re: global find and replace

2003-03-08 Thread Mark Heintz PHP Mailing Lists
Actually, in this case str_replace() would be preferred over preg_replace, as it would be faster. foreach($_REQUEST AS $key = $val) { $_REQUEST[$key] = str_replace(';', '', $val); } mh. On Sat, 8 Mar 2003, James wrote: Add an append file to the php.ini file, this script will act the

Re: [PHP] Uploading file problem

2003-03-06 Thread Mark Heintz PHP Mailing Lists
What do you mean by fails at the copy? Have you verified that the filename and path you're copying to is valid? Otherwise, if the filename that is failing is consistently the same, and if it's attempting to overwrite an existing file, it could be a permissions problem. Just a couple of

Re: [PHP] mortgage calculator

2003-03-05 Thread Mark Heintz PHP Mailing Lists
http://dave.imarc.net/ offers one. I haven't used it yet myself, though. mh. On Wed, 5 Mar 2003, Karen E. Lubrecht wrote: I'd like to add a mortgage calculator to a client's site. I've been unable to find the formula. In searching php.net, I found a discussion from back in 2000 related to

RE: [PHP] file upload question

2003-01-24 Thread Mark Heintz PHP Mailing Lists
You have to include a filename along with the path when you're using move_uploaded_file(); if you're only specifying '/usr/local/etc/httpd/htdocs/blast/images' as your destination string, php is trying to create a file named 'images' in '/usr/local/etc/httpd/htdocs/blast'. If there's still a

Re: [PHP] Setting session variables from a MySQL field value.

2003-01-15 Thread Mark Heintz PHP Mailing Lists
The problem may be your variable variable syntax... See if the following works: while ($row = mysql_fetch_array($result)) { session_register('config_'.$row['config_id']); ${'config_'.$row['config_id']} = $row['config_value']; } Although I personally prefer using the session superglobal

[PHP] form arrays not populating $_POST

2002-10-29 Thread Mark Heintz PHP Mailing Lists
I'm having a problem where $_POST is being populated with the values of a set of checkboxes after moving the script to a new server. The checkbox values appear in the raw post data, the proper number of indexes are created, but the data does't make it into the superglobal. The form similar to

Re: [PHP] form arrays not populating $_POST

2002-10-29 Thread Mark Heintz PHP Mailing Lists
from the array. Mark. On Tue, 29 Oct 2002, Kevin Stone wrote: I Copy and Pasted your code directly from this email and tested it. $GLOBALS['HTTP_RAW_POST_DATA'] never gets set, but the rest of it worked fine. Curious. -Kevin - Original Message - From: Mark Heintz PHP Mailing Lists

Re: [PHP] passing variable arguments from select

2002-06-27 Thread Mark Heintz PHP Mailing Lists
On Thu, 27 Jun 2002, Haddad Said wrote: in query.php i have this piece of code; echo form action='test2.php' action='post' select name='language' option value='0'selected='yes'one/option option value='1'two/option /select input type=text name=query input type=submit name=submit /form;

Re: [PHP] How to put a new line character with fputs($birthday_file,$content);

2002-06-23 Thread Mark Heintz PHP Mailing Lists
\n is a newline character, \r is a carriage return. $line = This is a line with a newline character.\n; You can find it in the manual here: http://www.php.net/manual/en/language.types.string.php mh. On Fri, 21 Jun 2002, Alfredo wrote: Hi, I am saving the result of a query on a text

Re: [PHP] POST Arrays with register globals..

2002-06-12 Thread Mark Heintz PHP Mailing Lists
$groups = $_POST['groups']; or if(isset($_POST['groups']) is_array($_POST['groups'])) $groups = $_POST['groups']; else $groups = array(); so that groups is an (empty) array even if no checkboxes were checked mh. On Wed, 12 Jun 2002, Adam Plocher wrote: input type=checkbox

Re: [PHP] PHP code in a database

2002-06-07 Thread Mark Heintz PHP Mailing Lists
You want the eval() function. manual entry: http://www.php.net/eval mh. On Fri, 7 Jun 2002, Jean-Rene Cormier wrote: I'm trying to make a script that'll take some pages from a database but I want it to execute the PHP that's in the pages that it'll fetch from the database. Say it gets

Re: [PHP] PHP (CLI) + CURL + SSL Problem...

2002-06-07 Thread Mark Heintz PHP Mailing Lists
Are you sure curl was included with the CLI installation? Try running this through the CLI to check... if(extension_loaded('curl')){ echo 'curl support present'; } else { echo 'curl not found'; } mh. On 7 Jun 2002, Matthew Walker wrote: I have PHP installed both as a module, and as a

Re: [PHP] Comparing array elements

2002-06-05 Thread Mark Heintz PHP Mailing Lists
Well, it sounds like something that could be done through the db query, but if you want to use arrays, it'd be something like this... $servers = arrray('s1','s2','s3','s4','s5'); $group1 = array('s1','s4','s5'); $in_group = array_intersect($servers, $group1); $not_in_group =

Re: [PHP] Re: Parsing file's

2002-05-31 Thread Mark Heintz PHP Mailing Lists
You may have been heading in the right direction originally with array_slice... This is off the top of my head, I don't guaruntee it will work... $start = 34; $interval = 15; $max = 303; // hop across orig. array 15 columns at a time for($offset = $start; $offset $max

Re: [PHP] help with date formatting

2002-03-18 Thread Mark Heintz PHP Mailing Lists
Since you're using phpmyadmin, I'm assuming you're using mysql. You could use the built-in date and time functions to do the formatting when selecting your date field. Check here: http://www.mysql.com/doc/D/a/Date_and_time_functions.html mh. On Mon, 18 Mar 2002, Ryan wrote: Hi, I'm trying

Re: [PHP] Creating arrays using results from MySQL query

2002-03-18 Thread Mark Heintz PHP Mailing Lists
You have to call mysql_fetch_array for each record in your result set... $emp_login_wkgrp_id = array (); $emp_login_grp_id = array (); $emp_login_role_id = array (); $i = 0; while($employee_2 = mysql_fetch_array($result_2)){ $emp_login_wkgrp_id[$i] = $employee_2[wkgrp_id];

RE: [PHP] Creating arrays using results from MySQL query

2002-03-18 Thread Mark Heintz PHP Mailing Lists
I should have been more exact in my original reply. The second query isn't necessary. Try this: File: login.php # if $employee_1, query db workgroups table to check if $emp_login_id belongs to any groups $sql_2 = SELECT * FROM workgroups WHERE emp_id='$emp_login_id'; $result_2 =

Re: [PHP] how to send a file to the user's browser?

2002-03-18 Thread Mark Heintz PHP Mailing Lists
A couple more headers than absolutely necessary, but this should work: ?php // open file and send to user if($fp = fopen($downloadfile, r)){ // output headers $downloadsize = filesize($downloadfile); header ( Expires: Mon, 1 Apr 1974 05:00:00 GMT ); header ( Last-Modified: . gmdate(D,d

Re: [PHP] how to send a file to the user's browser?

2002-03-18 Thread Mark Heintz PHP Mailing Lists
On Mon, 18 Mar 2002, Mark Heintz PHP Mailing Lists wrote: header ( Content-Disposition: attachment; filename=$downloadfile ); erg... typo... header ( Content-Disposition: attachment; filename=$downloadfile ); mh. -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Must results from MySQL fetches always be an Array??

2002-01-25 Thread Mark Heintz PHP Mailing Lists
On Fri, 25 Jan 2002, [ISO-8859-1] René Fournier wrote: $series = mysql_fetch_array(mysql_query(SELECT key2 FROM models WHERE lang='$lang' AND recordname='$model',$db)); Now I realize that with this function $series will always be an array, even if it contains just one element (which it

[PHP] fread via ftp to NT fails

2001-05-21 Thread Mark Heintz PHP Mailing Lists
I'm attempting to read a file from a remote server and save it to a variable. The code below works fine if the remote server is unix based, but fails with the server I actually need to retrieve data from (NT4 SP4, beyond my control). When trying to fread from the NT server, $invoice_contents