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] Finding out what week it is

2002-05-15 Thread PHP lists
$week = date(W); DOJ Is there any way to determin what week of the year it is, for example to DOJ day it is the 20th week of the year. DOJ Thanks DOJ http://www.atom.is/ DOJ Davíð Örn Jóhannssson DOJ Vefforritari DOJ DOJ Atómstöðin hf. DOJ

[PHP] ereg_replace Help

2002-03-21 Thread lists
Hi all, I have a large file that I am trying to parse. I have a many lines that look like this \\text1 I need an expression that will change \\text1 to text1= so if I have something like this \\text1 asdfkjaslkfj asdlfkjasljkf asdlkfjasldfkj asldkfjalskfj \\text2 erweiurwoeir werqwer

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

[PHP] Session --trans-id

2002-03-17 Thread lists
I have complied PHP with the enable trans id option However, when I start a session and go to a relivtive link , (./page.php) I do not get a session id in my URI. Any Ideas? Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sessions and enable-trans-sid

2002-03-16 Thread lists
I have compiled php with the enable-trans-sid (for the site I am using I can NOT use cookies) when I start a session or store something in _SESSION['varname'] varname can not be accessed on other pages nor is there a file in the /tmp file nor does my URI change with a session id Any

[PHP] Perl and PHP

2002-03-06 Thread lists
I need to pass a variable to Perl from a PHP script. I am somewhat know PHP but I do NOT know perlI am running my perl script off of the command line. I tried /path/to/somewhere/script.pl?var=var but it did not work. I would love any help you could provide me Thanks, Michael -- PHP

Re: [PHP] Perl and PHP

2002-03-06 Thread lists
Ok, I got it to work.now how do I take a varaible back into PHP I do a $var = system(/path/to/cgi $varforCGI) and in the CGI script I do a print $varforPHP however it prints the varforPHP to the broswer, I need it saved it var Any (more) help would be great!! Michael On Wed, 6 Mar 2002

[PHP] VeriSign

2002-03-05 Thread lists
I have tried compling in the VeriSign support for phpI just downloaded the newest version of the VeriSign SDK, however, after I complie it with apxs and I restart httpd it will not start If I removed the --with-pfpro statment it works fine Any ideas? Michael -- PHP General Mailing List

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

2002-01-24 Thread lists
Does anyone have a good script for uploading an image and storing it in a mySQL database. Thanks -- 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] Flash jpeg/gif/bmp

2001-12-08 Thread lists
Does anyone know of a tool to export a frame of a Flash movie to a flat image file on the client-side? I want users to be able to set the last frame of my flash movie as their wallpaper. The only way I know of doing this is to use PHP to re-build the Flash frame by receiving coordinates from the

[PHP] Group by Howto

2001-11-12 Thread lists
I have a database with 2 colums in it -|--| Place of work| Name | -|--| I want to print out a listing of peoples name by the place their work from a php script so Place 1 person a person b person c Place 2 person d Place 3 person F person G This

[PHP] How to get Usernames

2001-11-02 Thread lists
I have a setup where users can access their own pages using a /~username here account I need to put a PHP script in their directoies that will be able to tell me what their username is. I was thinking about $REQUEST_URI however if I go to /~username/dir/page it will return it all. all I

Re: [PHP] How to get Usernames

2001-11-02 Thread lists
Ok, How do I do that? Hi Michael How about explode()ing it using '/' as the seperator, then finding the element in the resulting array that begins with '~', strip that first character using substr() and bod's your uncle... I'd write the code but I've had a long day... Shane On

[PHP] Password File

2001-11-02 Thread lists
I have a redhat 7.1 system, I am using shadow passwords. Is there a way to authenticate people using thier shadow password? Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] PHP/CGI problem: #!/path/php at top of CGI script appears in output

2001-10-19 Thread Pour Mailings Lists - pass huitre
Hi, I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6 I've installed PHP in Apache, it works very well I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think it's the problem) but I've a problem. In CGI mode, the path of PHP is always written at the top of the result I'll take for

RE: [PHP] Writting to files.?

2001-07-05 Thread lists
On Thu, 5 Jul 2001, Don Read wrote: Anyone know how I can write and read to different lines in a file rather than just adding to the text already on the first line of the file? A. suck the whole thing up in memory, change it there, write it back out. Just as a note: for large (text or

Re: [PHP] Interpreting PHP in dynamic generated web-pages

2001-07-05 Thread lists
On Thu, 5 Jul 2001, Dieter Stolpmann wrote: Hi, I'm trying to solve the following issue in a (hopefully) simply way: - I'm creating web-pages using php and perl (using a page template) - the dynamically created pages may contain php code which I like to get interpreted in a normal

[PHP] PHP/Apache security question

2001-07-05 Thread lists
Hello list, I have a security problem to solve with my apache setup and I am clueless at this moment... My web server holds multiple domains and uses name-based virtual servers to direct requests to different portions of the html tree for different domain names (we presume only one IP is

Re: [PHP] Sessions and redundant servers

2001-07-05 Thread lists
On Fri, 6 Jul 2001, Daniel Baldoni wrote: G'day folks, Here's a theoretical question for those of you using PHP's inbuilt session facilities... How do you keep your variables across redundant servers? Or, isn't anybody out there hosting PHP-based services on grouped

Re: [PHP] Sessions and redundant servers

2001-07-05 Thread lists
On Fri, 6 Jul 2001, Daniel Baldoni wrote: Considering NFS is stateless, why do you consider it to be a more acceptable solution to, say, rsync (which I personally don't like - but that's another matter)? Ok, sorry, I should have explained my reasoning. Afaik rsync executes periodically to

[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

[PHP] Attachment problem with web based mail

2001-03-20 Thread lists
We hired a developer about a year ago to develop a web based email system for us in php. The developer is no longer around, so I am having to pick up the development on the project...When clicking on the attachment link of an email in Internet Explorer 5.5 in Windows 98, I get the save as dialog

[PHP] PHP and Mod_auth_mysql.

2001-02-28 Thread Lists
Hi, Mod_auth_mysql uses a persistant connection to mysql. Will php use the same connection for any given apache child or does that then mean to mysqlds for each child, one used with mod_auth_mysql and one when php does requests ? Hope I'm making myself clear. -- PHP General

[PHP] Upgrading to 4.04 question, but won't stick

2001-01-21 Thread Team JUMP Lists
We've had 4.01 running since July so I thought I'd upgrade to 4.04 from the tarball last night. Everything went fine w/ the compile, no errors. Install said all OK, Then i went and HUP'd apache but when I run phpinfo() the old module is still loaded. What am I doing wrong? Where should I look

<    2   3   4   5   6   7