[PHP] Xemacs indentation for php

2004-12-30 Thread Song Ken Vern-E11804
Hi, I would like the behaviour of turning on the cc-mode indentation in the ?php ? tags but turning off when escaping and doing html. I have been looking at the cc-engine.el source and can't seem to find the place where I should change. Is this behaviour possible? thanx -- PHP General

[PHP] String: Arrays of arrays.

2004-12-22 Thread Song Ken Vern-E11804
Hi, I have an array of array of strings :- $g1 = array(453, 592); $g2 = array(e14, e15, e13); $groups = array($g1, $g2); I traverse and print out the value using :- for ($i = 0; $i sizeof($groups); $i++) { for ($j = 0; $j sizeof($groups[$i]); $j++) { print

[PHP] assignment

2004-12-11 Thread Song Ken Vern
Hi, Tried searching for what this $$ operator means. But can't get the right results by using $$ as search string in php manual. $temp = $$temp2; Is this an array assignment? Thanx. Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] No GD Support

2004-12-05 Thread Vern
I have just installed a new Fedora Core box and do not have GD support in PHP. Can anyone tell me how to add that? The GD library is installed however when I do phpinfo() I do not get the GD support listed. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: No GD Support

2004-12-05 Thread Vern
In case anyone wants to know the answer to this you must install the php-gd rpm. Vern [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have just installed a new Fedora Core box and do not have GD support in PHP. Can anyone tell me how to add that? The GD library is installed

[PHP] arrays() current() next() who to use

2004-08-19 Thread Vern
I'm setting up an array based on recordset that does a loop as follows: do { //SET ARRAYS $z['username'][$k] = $row_rsUSERIDID['uname']; $z['distance'][$k++] = $totaldist; } while ($row_rsUSERIDID = mysql_fetch_assoc($rsUSERIDID)); //SET NEW ARRAY $z['user'] =

Re: [PHP] arrays() current() next() who to use

2004-08-19 Thread Vern
Problem with that is it sorts according the results of the recordset range. For instance: It will show the user 1 trhough 10 sorted by miles then 20 - 30 sorted by miles, however, in 1 through 10 could have a range of 0 to 1000 miles and the next set will have 5 to 200 miles. What I need is to

Re: [PHP] arrays() current() next() who to use

2004-08-19 Thread Vern
The miles are being caluculated during the loop that is created using the recordset not in the database. First I create a do..while loop to get the miles do { $k = 0; //SET FIRST ARRAY OF ONLINE USERS AND CALCULATE MILES do { //GEOZIP $zip2 = $row_rsUSERIDID['zip'];

Re: [PHP] arrays() current() next() who to use

2004-08-19 Thread Vern
Well, this is the hard way to do things, and very inefficient but: foreach(array_slice($z['distance'], $start, 10) { //... } If you think there's a better way of doing it I would like to hear it. However this is resulting in an Parse error on the foreach line:

[PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I'm trying to write data to a file from a Postgres database using the following code ?php //LOOP THROUGH RECORDSET while (!$rsITEMS-EOF) { //CREATE CSV //OPEN DUMP FILE $fp = fopen(./dump.sql, w); //WRITE DATA TO DUMP fwrite($fp,

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
Sorry the previous post got sent prematurely. It does work, however, the problem is in the fwrite($fp, $rsITEMS-Fields('item_id')\n); what gets written to the file is exactly $rsITEMS-Fields('item_id') for as many records are return when I want the value to be inserted in the file.

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I got it. In case anyone is interested. I changed the code so that the field value was a became the variable $name and it worked. $name = $rsITEMS-Fields('item_id'); fwrite($fp, $name\n); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I did. ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I knew that ;) Some times it takes another set of eyes... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Ignoring carriage returns from data field

2004-08-13 Thread Vern
I am creating a datadump to a csv file and have noticed that text fields that contain carriage returns are causing trouble when opening the csv file in an Excel spreadsheet. I'm sure there's a away to ignore those extra characters but for the life of me I can't recall what it is. Anyone know how

Re: [PHP] Ignoring carriage returns from data field

2004-08-13 Thread Vern
Sorry, I must be somewhat dense today but I can't make heads nor tails of your response. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Printing using php script CRON

2004-07-27 Thread Vern
I hate to keep beating a dead horse, but this horse is not quite dead yet. I need to print a php script from a web site using CRON. I'm thinking something like this should work but I don't know enough about it to say that it would. I know that I can run a php script using CRON as such: lynx

Re: [PHP] Printing using php script CRON

2004-07-27 Thread Vern
If you have a printer attached to the server from where the cron is running you might try lynx --dump http://yoursite.com/cronjob.php lpt1 or something similar. Not tested. Actually it's a netwotl printer and in order to print the job I need to type the following on the box: lpr -P

Re: [PHP] Printing using php script CRON

2004-07-27 Thread Vern
One would think this should be really simple but it's not. I need to retrieve the file somewhere on the internet. I read somewhere in order to read a php script's output you need to add the php command in front, as such: php http://yoursite.com/cronjob.php | lpr -P hp1300n however I am getting

Re: [PHP] Printing using php script CRON

2004-07-27 Thread Vern
I feel like I taking a hammer and well I'm sure you all know the feeling. cURL does help me to get the file and save the file somewhere locally, however printing a page like this gives me all the html code (i.e. html, etc) and I need the report that is being displayed to the browser in all

Re: [PHP] Printing using php script CRON

2004-07-27 Thread Vern
Seems to me that this needs XWindows or something install, am I incorrect? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Printing using php script CRON

2004-07-27 Thread Vern
I get: # wget -O -q http://www.comp-wiz.com/index.html | lpr -P hp1300n --16:49:59-- http://www.comp-wiz.com/index.html = `-q' Resolving www.comp-wiz.com... done. Connecting to www.comp-wiz.com[207.234.154.95]:80... connected. HTTP request sent, awaiting response... 200 OK Length:

[PHP] Retain form values on using javascript:window.opener.location.reload()

2004-07-22 Thread Vern
I have a page where a user comes to the page and submits a form after filling it out with dropdown menus that are dynamically driven and get their info form out tables. Now there are times when some one needs to add to this drop down list so I have a separate page open up that allows the user to

Re: [PHP] Retain form values on using javascript:window.opener.location.reload()

2004-07-22 Thread Vern
POST data from form fields are usually only sent through a submit request. Maybe changing you Javascript refresh to a submit that redirects back to the same page might help? Is there a way to do that? Any examples? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
Hey all... I have a new one I haven't encounter before. I need to send the output of a web page to a printer on a schedule (obviously I'll use a cron job for scheduling) and am wondering if I can do this through php. I know you can use the command line lpr in SSH but can I use PHP do do it?

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
($handle); Hope this can help you a bit. To see what I used it for, check this out: http://www.wobbled.org/printer/ Regards, Jan Tore Morken On Wed, 21 Jul 2004 12:16:31 -0400, Vern [EMAIL PROTECTED] wrote: I need to send the output of a web page to a printer on a schedule (obviously I'll

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
OK, welll this may be off topic then, but is there any way I can print a php page to a printer from the command line in SSH so I can use a CRON job to print it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
That will print the page's html code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
That would be helpful. Could you give me an example please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Sending the output of a web page to a printer

2004-07-21 Thread Vern
Yes but if you print a php page it prints out the code for the php. I need to print out a report that is written in php and uses a MySQL database. If only I could just hit the print button in the browser!!! LOL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: