[PHP] problems with looping array

2001-12-03 Thread Jordan
here's the situation. I'm making a shopping cart, when an item is added it's item number is added into an array. I then want this array's items to be compared agains the database. Unfortunately I haven't been able to use a variable in the query string of MySQL. something along the lines

[PHP] Re: problems with looping array

2001-12-03 Thread Fred
Strings in your sql query must be quoted. Try this instead: $result = mysql_query(SELECT * FROM ar LEFT JOIN company on ar.company_id=company.company_id LEFT JOIN scale on ar.scale_id=scale.scale_id WHERE item_number = \$item[$index]\); Fred Jordan [EMAIL PROTECTED] wrote in

[PHP] Re: problems with looping array

2001-12-03 Thread Jordan
I tried but nothing different happened. I'm still playing though and I'll see if I can make it work. I'm new to all of this...so we'll see how it goes. Thanks for your help. -jordan Fred [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Strings in your sql

Re: [PHP] Re: best way to handle a form with 60 fields !!!

2001-12-03 Thread Krzysztof Kocjan
Fred wrote: Third, it is ineffecient and unneccessary to put 60 fields in a single form. If you are using the GET method it probably will not work since it passes the variable names and values in the URL, which has a maximum length of 255 In my mind maximum length 255 is not true. There

php-general Digest 3 Dec 2001 10:32:24 -0000 Issue 1030

2001-12-03 Thread php-general-digest-help
php-general Digest 3 Dec 2001 10:32:24 - Issue 1030 Topics (messages 76352 through 76370): Question about adding library to use with php 76352 by: Joelmon2001.aol.com SQL state S1090: Almost connected to mysql via PHP/odbc 76353 by: mweb 76357 by: Venu

Re: [PHP] Re: best way to handle a form with 60 fields !!!

2001-12-03 Thread Remigiusz Sokolowski
Krzysztof Kocjan wrote: Fred wrote: Third, it is ineffecient and unneccessary to put 60 fields in a single form. If you are using the GET method it probably will not work since it passes the variable names and values in the URL, which has a maximum length of 255 In my mind

[PHP] P3P Implementation and PHP-Sessions

2001-12-03 Thread Bruno Baketaric
Hi, I assume everyone has heard of P3P (Platform for Privacy Preferences), so I'll skip explaining in detail what it is. If you don't know, just skip this message *g*. I've got one Problem with this, and PHP may solve it: P3P has absolutely no Application-Server/Scripting support. It's just a

[PHP] Re: call_user_func problem

2001-12-03 Thread Bruno Baketaric
Hi, just do it like this - the result will be the same, and $bar is still passed by reference: $result = call_user_func(foo, $bar); function foo( $bar ) { $bar .= 'foobar'; return 1; } _ This error just tells you, that you have to declare

[PHP] howto run shell script

2001-12-03 Thread Danar Prabandaru
hello php-general, how do I run a shell script from PHP web interface?? assume /path/to/my/script.sh as the path and the owner and group of this script are belong to apache Regards, -- Danar PrObOndaru -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

[PHP] variable scope / preg_replace_callback question

2001-12-03 Thread Peter Bowyer
Hi, Does anyone know of a way of passing other variables to the function being called by preg_replace_callback? For instance, I have the following code: function smarty_compile_lang($tpl_source) { // en.php contains a very large array, $_lang include_once '/home/test/en.php';

Re: [PHP] variable scope / preg_replace_callback question

2001-12-03 Thread Andrey Hristov
function _compile_lang($key){ global $_lang; return $_lang[$key[1]]; } // End _compile_lang HTH Regards, Andrey Hristov - Original Message - From: Peter Bowyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 3:45 PM Subject: [PHP] variable scope /

[PHP] Multiple database seeking

2001-12-03 Thread Alen Nonkovi
Hello, I am trying to make a something like a cooking recipe with some calculations. My problem is too much database querying. Is it really a problem??? Let's suppose there is a table with items and prices: item1price1 item2price2 item3price3 ... Then I have to calculate some new

Re: [PHP] php without the php.ini

2001-12-03 Thread Erik Price
Isn't it called php.ini-dist first? Excerpt from the INSTALL file that accompanied my PHP 4.0.6 dist: Next you must copy php.ini-dist to the appropriate place (normally /usr/local/lib/php.ini) and edit it as necessary to set PHP options. Of course, this doesn't matter if you're appending a

Re: [PHP] Multiple database seeking

2001-12-03 Thread Miles Thompson
Allen, Have you a table of recipes, like so: recipe1 item1 recipe1 item2 ... recipe1 itemn recipe2 item1 You could then fetch all the items for a given recipe, and loop through the returned results (an array), concatenating the prices. Alternately, you store all your items in an array for

Re: [PHP] Multiple database seeking

2001-12-03 Thread Valentin V. Petruchek
Use smth like this - $need_prices = '01,02'; $prices = new Array(); $sql = select * from price_list where id in ($need_prices) $result = mysql_query ($sql); {//cycle while $result is not empty - for every record $row = mysql_fetch_array($result); $prices[$row[id]] =

Re: [PHP] How to set file extension php Mac OSX and PHP 4.0.6

2001-12-03 Thread Erik Price
I don't think that Sherlock can recognize any file in the /etc directories. If you never use Terminal, then Sherlock is okay, but if you do stuff in the Terminal then you are working in levels of your computer that Apple has decided to hide from most users. The /etc directory is one example

Re: [PHP] howto run shell script

2001-12-03 Thread Steve Werby
Danar Prabandaru [EMAIL PROTECTED] wrote: how do I run a shell script from PHP web interface?? assume /path/to/my/script.sh as the path and the owner and group of this script are belong to apache See exec(), system(), etc. -- Steve Werby President, Befriend Internet Services LLC

[PHP] Some clients can't see PDF

2001-12-03 Thread Miles Thompson
I'm using this in a script to send pdf files from Apache: ? // get the $pdf_name and $len of the $pdf_name // stuff up here, and then ... header(Content-Type: application/pdf); header(Content-Disposition: inline; filename=$pdf_name); header(Content-Length: $len); readfile($pdf_name); ? About 6

Re: [PHP] How to set file extension php Mac OSX and PHP 4.0.6

2001-12-03 Thread Stefan Rusterholz
- Original Message - From: Erik Price [EMAIL PROTECTED] To: René Fournier [EMAIL PROTECTED] Cc: Michael B. Weiner [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 03, 2001 4:23 PM Subject: Re: [PHP] How to set file extension php Mac OSX and PHP 4.0.6 I don't think that

[PHP] which merchant account

2001-12-03 Thread Daniel Guerrier
Can anyone suggest a bank and/or merchant account provider that you've used successfully in the past. __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/)

[PHP] PHP problem with freetype

2001-12-03 Thread MDowling
I've installed PHP-4.0.6 using the following configuration: './configure' '--prefix=/ECommerce/bin/apache/1.3.22' '--with-oci8=/opt/apps/oracle/8.1.7' '--with-apxs=/ECommerce/bin/apache/1.3.22/bin/apxs' '--without-mysql' '--with-zlib-dir=/usr/local' '--with-jpeg-dir=/usr/local'

[PHP] Something wrong with the file() command.

2001-12-03 Thread Jose
I try to give it a value with a var, but it doesn't work. The code is something like this. $y=str_pad($y,5,.txt); \\ To give it a filename from a var that contains only 1 number (with 1 digit) If in this step I do a echo $y, it shows the correct string. Suposing it is 2, it shows 2.txt

[PHP] Re: problems with looping array

2001-12-03 Thread Jim Musil
First, make sure $item[$index] has anything in it by inserting an echo $item[$index]. You also have to prepend item_number with the table name as in ar.item_number. Try single quotes around $item[$index], too. If $index is a name, I've had trouble in the past getting associative arrays to

[PHP] Re: PHP Bulletin Boards...how they work.

2001-12-03 Thread Jonathan Chum
If you are just starting into PHP, try some something more basic. If you have some background into another language such as PERL, then you shouldn't have too much trouble. However, if you insist to taking on a bulletin board script for analyzing purposes, head over to hotscripts.com where I'm

[PHP] ereg help

2001-12-03 Thread Valentin V. Petruchek
- Original Message - From: Valentin V. Petruchek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 6:35 PM Subject: [PHP] ereg help I'm not new for php, but have no experience working with ereg functions. My problem is the following: i have string.. for

Re: [PHP] ereg help

2001-12-03 Thread Jim
This is a good starter about PHP and regular expressions. http://www.phpbuilder.com/columns/dario19990616.php3 - Original Message - From: Valentin V. Petruchek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 6:35 PM Subject: [PHP] ereg help I'm not new for

[PHP] RealMedia

2001-12-03 Thread Randum Ian
Hi guys, I want to write a script that inputs a file variable then it sends out a RealMedia header so that it sends the file location to RealPlayer. EG: If I click on http://www.randumian.co.uk/getsample.php?file=1234.rm, it should send the headers so that the computer thinks its a .rpm file

Re: [PHP] RealMedia

2001-12-03 Thread Jim
This must be the first output of your script. header (Content-type: audio/x-pn-realaudio); and then your output should be in .ram file output. Is this what you are asking? Hi guys, I want to write a script that inputs a file variable then it sends out a RealMedia header so that it sends

[PHP] Anyone got PHP to work under RedHat 7.2

2001-12-03 Thread Hai Nguyen
I am having trouble with php to display from the Netscape. I installed both Apache and PHP using RPM. I modified httpd.conf file. Can anyone help me with this? Where should the php.ini be located? Mine is located in /etc dir. Should it be somewhere else? Thanks. Hai Nguyen -- PHP

[PHP] Re: Something wrong with the file() command.

2001-12-03 Thread Fred
When you attempt to print or echo an array the result is simply array. You have to iterate through the elements of the array to see what each element contains. Read the array chapter in the manual for more information. Fred Jose [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

RE: [PHP] Anyone got PHP to work under RedHat 7.2

2001-12-03 Thread Mark Charette
Yes, I have PHP running just fine under 7.2 (source compile). PHP doesn't care one whit about your browser; however, Netscape is picky (as it should be) about end tags. The most common problem when pages display under IE but not under Netscape is the lask of a /table or /tr tag. Mark C.

RE: [PHP] Something wrong with the file() command.

2001-12-03 Thread Mark Charette
From: Jose [mailto:[EMAIL PROTECTED]] $temp[]=file($y); \\ To load the file into the array. --- file() returns an array! So, you ended up with an array ($temp) with element 0 an array (returned from file() ). Read the manual very carefully ... You probably meant to say

Re: [PHP] Re: Something wrong with the file() command.

2001-12-03 Thread Valentin V. Petruchek
Try this: ?php echo pre; print_r ($temp); echo /pre; ? and look for $temp content. Zliy Pes http://zliypes.com.ua - Original Message - From: Fred [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 7:58 PM Subject: [PHP] Re: Something wrong with the file() command.

[PHP] Session_start() issue??

2001-12-03 Thread Chris Seymour
Hi all, Has anyone seen this. I have a login form (login.htm) which calls a login handler (check_login.php). If the login is sucessfull the check_login.php will set a couple session variables, then redirect the user to a menu page. The problem I am seeing is that when I call session_start()

[PHP] problem with ImageCreateJPEG ...

2001-12-03 Thread Miguel Loureiro
Hello all, anyone can help me in line command to configure php : './configure' '--with-mysql' '--with-apache=/usr/src/packages/SOURCES/apache_1.3.9/' '--with-zlib-dir=/usr/src/packages/SOURCES/zlib/'

[PHP] Session confusion

2001-12-03 Thread Jon Drukman
I have a file called sessionvars.php that I require() as the very first thing on all my pages, it has session_register(blah...) and about 40 or 50 variable names after that. sometimes I am seeing behavior where a form on one page that references a session variable doesn't carry over the change

Re: [PHP] problem with ImageCreateJPEG ...

2001-12-03 Thread Jim
It is difficult to know where your problem is without more information. It would appear that your jpeg file is not valid. Try another .jpg file. Post the problem code, too. Hello all, anyone can help me in line command to configure php :

Re[2]: [PHP] Re: Something wrong with the file() command.

2001-12-03 Thread faeton
Hello Valentin, Hehe, Valentin. Send my regards to beloved Zaporozhye and it's ppl :) Haven't been there for ages. Eh... VVP Try this: VVP ?php VVP echo pre; VVP print_r ($temp); VVP echo /pre; ? VVP and look for $temp content. -- Ivan 'Faeton aka xetrix'

Re: [PHP] Session_start() issue??

2001-12-03 Thread Jim
If you redirect using the full (http://foo.bar/rex...) URL, it may be restarting your session. Try using relative URLs. Hi all, Has anyone seen this. I have a login form (login.htm) which calls a login handler (check_login.php). If the login is sucessfull the check_login.php will set a

Re: [PHP] Session_start() issue??

2001-12-03 Thread Jim
Also read about session management at http://php.net/session Hi all, Has anyone seen this. I have a login form (login.htm) which calls a login handler (check_login.php). If the login is sucessfull the check_login.php will set a couple session variables, then redirect the user to a menu page.

[PHP] wordwrap

2001-12-03 Thread Scott Aikin
Hey Hey! I've got a question about wordwrap. It seems that when I run this on a string that contains spaces, if my replacement string happens to fall on a space, the space is removed completely from the string. This isn't good :-\ Any way around this? Thanks! - Scott -- PHP General

[PHP] Duplicating a mySQL row

2001-12-03 Thread Jim
What's the best way to duplicate a mysql row with PHP and MYSQL? -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP] Re: Duplicating a mySQL row

2001-12-03 Thread Julio Nobrega Trabalhando
I don't know if it is the best but here's an idea: INSERT INTO table SELECT ha, he, hi, ho, hu FROM table LIMIT 1; -- Julio Nobrega Don't eat the yellow snow. Jim [EMAIL PROTECTED] wrote in message news:p0510100fb8318736de56@[192.168.1.17]... What's the best way to duplicate a mysql row

[PHP] Re: Session confusion

2001-12-03 Thread Jon Drukman
Jon Drukman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sometimes I am seeing behavior where a form on one page that references a session variable doesn't carry over the change to the next page. i just figured this out from reading the user comments at

[PHP] Re: Duplicating a mySQL row

2001-12-03 Thread Jim
It appears that this is forbidden ... From mysql.com: The target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query because it's forbidden in ANSI SQL to SELECT from the same table into which you are inserting. (The problem is that the SELECT

[PHP] Uploading to Apache server from VB

2001-12-03 Thread Henk Sandkuyl
Hello, I have a VB program which can download files from a web-site. The webserver is running Apache where we use PHP scripting. That is all working OK. Now I want to let certain people upload data from their PC's. I don't want to use FTP, because I don't want to hand out password's (also not

Re: [PHP] Re: Duplicating a mySQL row

2001-12-03 Thread Julio Nobrega Trabalhando
Well, I skiped this manual part :-) Maybe the simple select and insert is the simplest form. -- Julio Nobrega Don't eat the yellow snow. Jim [EMAIL PROTECTED] wrote in message news:p05101010b8318afec141@[192.168.1.17]... It appears that this is forbidden ... From mysql.com: The

Re: [PHP] Uploading to Apache server from VB

2001-12-03 Thread Jim
http://www.php.net/manual/en/features.file-upload.php I've done this successfully both with PHP and VB/ASP. I think PHP is the easiest, but there are several things that could go wrong. There is usually a 2MB limit to the file size and the safe mode setting also affects the outcome. On the

Re: [PHP] Session_start() issue??

2001-12-03 Thread Chris Seymour
Hi Jim, Thanks for you replies. I was using relative paths and still I got the seperate sessions being opened. The interesting part was this was only happening on my dev machine (win32), when I moved the files to a Linux box, I did not have the same problem. Must be something in the IIS or

[PHP] newbie: Supplied argument is not a valid MySQL result..?

2001-12-03 Thread Lee Philip Reilly
Hi, I wonder if someone could point out what is wrong with the following piece of code (taken directly from the 'PHP - fast easy web development' book) , which gives the following warning : Warning: Supplied argument is not a valid MySQL result resource in c:\program files\apache

[PHP] Re: newbie: Supplied argument is not a valid MySQL result..?

2001-12-03 Thread Lee Philip Reilly
No reply required; I see the problem. -- 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]

[PHP] Using urlencode to pass varfiables in a URL

2001-12-03 Thread Don
Is there a limit to the number of variables once can pass in a URL using urlencode()? I seem to be hitting a wall where the browser returns a page not found once I go past a limit and I can't find any bugs in the code. Thanks, Don

[PHP] Zend Encoder

2001-12-03 Thread Mark
Hi, My company is looking into using the Zend Encoder to enforce licensing of some tools that I'm developing and I have a few questions that I hope someone who's used it can answer: 1) I understand that when you encode your files, they will stop working when the zend license expires. how easy is

RE: [PHP] Using urlencode to pass varfiables in a URL

2001-12-03 Thread Martin Towell
There is a limit to the size of a GET request - can't remember what it is though POST's can be any size however. Maybe a search of the RFC's might tell you the limit of GET's http://sunsite.dk/RFC/ -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001

[PHP] RE: MySQL ORDER BY or PHP Sort?

2001-12-03 Thread Rick Emery
SELECT * FROM mytable ORDER BY series,price; -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 4:27 PM To: [EMAIL PROTECTED] Subject: MySQL ORDER BY or PHP Sort? I want to select about 25 rows from a table, and sort them by two

Re: [PHP] RE: MySQL ORDER BY or PHP Sort?

2001-12-03 Thread Mike Eheler
Don't forget LIMIT 0,25 (I want to select about 25 rows from a table...) SELECT * FROM mytable ORDER BY series,price LIMIT 0,25 Mike Rick Emery wrote: SELECT * FROM mytable ORDER BY series,price; -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED]] Sent: Monday,

php-general Digest 3 Dec 2001 22:35:43 -0000 Issue 1031

2001-12-03 Thread php-general-digest-help
php-general Digest 3 Dec 2001 22:35:43 - Issue 1031 Topics (messages 76371 through 76425): Re: best way to handle a form with 60 fields !!! 76371 by: Remigiusz Sokolowski P3P Implementation and PHP-Sessions 76372 by: Bruno Baketaric Re: call_user_func problem

Re: [PHP] Mass Mailing

2001-12-03 Thread Michael Cronström
OK Nathan, I have a couple of scripts that will do the job for you, if you are interested! Web inventor Michael Cronstrom At 22:51 02/12/01, you wrote: I started writing a set of scripts that would send out mutiple emails to a list of customers. I then realized that most likely this

[PHP] php_xmldom.dll

2001-12-03 Thread Antwnhs T.
I have a problem with this dll, the dll exists on my hd and php does not load it. I have win2k pro with iis5, has anyone any kind of solutions ? Every morning is the dawn of a new error... narcotic

Re: [PHP] newbie: Supplied argument is not a valid MySQL result..?

2001-12-03 Thread David Robley
On Tue, 4 Dec 2001 08:29, Lee Philip Reilly wrote: Hi, I wonder if someone could point out what is wrong with the following piece of code (taken directly from the 'PHP - fast easy web development' book) , which gives the following warning : Warning: Supplied argument is not a valid MySQL

[PHP] PHP LDAP

2001-12-03 Thread Hafiz Malik
hi there.. i'm succesfully add ldap entry(jpegphoto) using PHP via below codes.. but failed to modify it.. any ideas? ADD LDAP ENTRY VIA PHP $userfile = addpicture.jpg; $fd = fopen ($userfile, r); $fsize = filesize ($userfile); $jpegStr = fread ($fd, $fsize); fclose ($fd); $ds =

[PHP] Multidimensional array construction

2001-12-03 Thread Darren Gamble
Here's a question for the list: I have a two-dimensional array; essentially a list of arrays. Each element (an array) can have any number of elements. As a small example: ( ( foo , bar , red , apple ), ( foo , bar , red , car), ( foo , green ) ) I would like to traverse this array and

[PHP] Why are slashes automatically stripped from db result?

2001-12-03 Thread Steve Cayford
Hey all. I'm storing some jpeg images in a mysql database using the PEAR classes. Before inserting the image into the db I call addslashes() on the data, I was, accordingly, calling stripslashes() on the data after pulling the image back out of the database, but the image was getting mangled.

[PHP] Problem with round

2001-12-03 Thread Diego Pérez
Hi to all: I can't understand, but i have a simple problem with round. I use the function round($value,2) to round a number with 2 decimals. But when i put the result in the screen, if $value don't have more or equal than 2 decimal numbers, the result only have one o none

RE: [PHP] Multidimensional array construction

2001-12-03 Thread Martin Towell
I was thinking that you could use a pointer to var, eg: $var = 'myarray[foo][bar][red][apple]'; // this would obviously be created dynamically, hard coded for testing $$var = $some_value1; echo $myarray[foo][bar][red][apple]; but when I tried it, it didn't work :( looks like

RE: [PHP] Why are slashes automatically stripped from db result?

2001-12-03 Thread Martin Towell
maybe mysql is stripping the slashes and not php ?? -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 10:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Why are slashes automatically stripped from db result? Hey all. I'm storing some jpeg

RE: [PHP] Problem with round

2001-12-03 Thread Martin Towell
to print two decimal points always, use : printf(%.2f,$value); round() just rounds the number and doesn't store extra zeros. -Original Message- From: Diego Pérez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: [PHP] Problem with round

Re: [PHP] Why are slashes automatically stripped from db result?

2001-12-03 Thread Tyler Longren
I believe you're correct Martin. I think newer versions of MySQL automatically strip them out. Just use php's stripslashes() and addslashes() functions when you need them. Good luck Steve, Tyler Longren - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Steve Cayford'

Re: [PHP] Why are slashes automatically stripped from db result?

2001-12-03 Thread Mike Eheler
It's been my experience that there is no need for calling stripslashes when pulling the data out of the database. This is probably an effect of having magic_quotes_runtime off. Mike Martin Towell wrote: maybe mysql is stripping the slashes and not php ?? -Original Message- From:

RE: [PHP] Multidimensional array construction

2001-12-03 Thread Jim
This might be interesting ... The function extract() allows you to extract all values from an array and prefix them with a specified string. What I didn't know until just a second ago was that you can supply a function as a string, so ... $my_array = array(a,b,c,d,array(a,b,c,d)); $i = 1;

RE: [PHP] Multidimensional array construction

2001-12-03 Thread Jim
oops. That's not correct. I wish it was though! ;) This might be interesting ... The function extract() allows you to extract all values from an array and prefix them with a specified string. What I didn't know until just a second ago was that you can supply a function as a string, so ...

Re: [PHP] Multidimensional array construction

2001-12-03 Thread Mike Eheler
I did something like this recently. Here's how I did it: $some_value1 = 'Hello World'; $myarray['foo']['bar']['green']['apple'] = $some_value1; function get_opt($arr, $keys,$sep=':') { $var = $arr; $tmp = split($sep,$keys); foreach ($tmp as $k = $v) { $var = $var[$v]; }

Re: [PHP] ereg help

2001-12-03 Thread J Smith
Something like this will work: eregi(^id \{([a-z]*),([a-z]+),([a-z]+)\} \[(.+)\]$, $str, $regs); $regs will be an array containing: [0] = id {name,title,nick} [http://www.php.net]; [1] = name [2] = title [3] = nick [4] = http://www.php.net; If course this isn't very foolproof or generic. For

[PHP] Running a perl script from PHP

2001-12-03 Thread Tank
echo system(perl /usr/local/site/domain.com/cgi-bin/script.pl -c test -cname testname -passwd testword); That's my code, however it does nothing. No feedback from the echo, no actions, nothing. I've also tried exec(), but again, no luck. When I run exactly the same code from the command line, it

[PHP] Pull from mysql_fetch_array at a given time

2001-12-03 Thread Tom Beidler
I'm trying to pull three results from a database and then display them in a page. The HTML is clugey so I would like to place print statements in three different places, rather then in a while loop and try and rewrite the HTML for each item. So far I have; $gethot_query = SELECT title FROM

[PHP] Taking PHP out of safe mode - for one domain/user

2001-12-03 Thread Tank
How on earth do you do it? I know how to do it completely (php.ini), but I need to keep PHP in safe mode for all the other users. -- 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

Re: [PHP] Pull from mysql_fetch_array at a given time

2001-12-03 Thread David Robley
On Tue, 4 Dec 2001 11:30, Tom Beidler wrote: I'm trying to pull three results from a database and then display them in a page. The HTML is clugey so I would like to place print statements in three different places, rather then in a while loop and try and rewrite the HTML for each item. So

[PHP] odrer by alphabet

2001-12-03 Thread Rambo Amadeus
hi, i have about 100 names in my database. How should i list them by alphabet. 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 PROTECTED]

RE: [PHP] odrer by alphabet

2001-12-03 Thread Smith, Benjamin
You can simply order by that field in your SQL string...ie: SELECT * FROM TABLENAME ORDER BY FIELDNAME; And to switch the order: SELECT * FROM TABLENAME ORDER BY FIELDNAME DESC; -Original Message- From: Rambo Amadeus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 December 2001 1:15 PM

[PHP] Parsing RSS

2001-12-03 Thread Tom Malone
Hi to all Does anyone know of any good books or online tutorials on parsing RSS feeds with PHP (or parsing XML in general in PHP)? Tom Malone Web Designer http://www.tom-malone.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] howto run shell script

2001-12-03 Thread Michael A. Peters
On Mon, 3 Dec 2001 20:46:06 +0700 Danar Prabandaru [EMAIL PROTECTED] mentioned: $command=/path/to/my/script.sh; exec($command); hello php-general, how do I run a shell script from PHP web interface?? assume /path/to/my/script.sh as the path and the owner and group of this

RE: [PHP] Multiple database seeking

2001-12-03 Thread Jason Lotito
Something like this for the SQL SELECT ( t1.price + t2.price ) as total FROM table t1, table t2 WHERE t1.id=1 AND t2.id=5; Jason Lotito [EMAIL PROTECTED] www.NewbieNetwork.net -Original Message- From: Alen Nonkoviè [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 9:31 AM

[PHP] Re: Parsing RSS

2001-12-03 Thread Manuel Lemos
Hello, Tom Malone wrote: Hi to all Does anyone know of any good books or online tutorials on parsing RSS feeds with PHP (or parsing XML in general in PHP)? You may find a few here: http://phpclasses.upperdesign.com/browse.html/class/4 Regards, Manuel Lemos -- PHP General Mailing List

[PHP] Re: odrer by alphabet

2001-12-03 Thread Julio Nobrega
SELECT column FROM table ORDER BY name; -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=1767 Rambo Amadeus [EMAIL PROTECTED] wrote in message

[PHP] URGENT-HELP !!!!!!

2001-12-03 Thread Chamarty Prasanna Kumar
Hi All, Thanks very much for all who suggested ways to help me out. I sthere any better way of doing this [ please read the following ] using some code in PHP. Regards, Kumar. On Fri, 30 Nov 2001 Chamarty Prasanna Kumar wrote : Hi, Want to send mail through

[PHP] Apache Php SSL

2001-12-03 Thread Chris Allen
Hey, When rebuilding Apache/Php/Modssl etc can I re-use my existing server key and server certificate ? Do I need to get a new certificate from Thawte/Verisign even if its for the same host? Thanks, CCMA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Apache Php SSL

2001-12-03 Thread Brian Clark
* Chris Allen [EMAIL PROTECTED] [Dec 03. 2001 23:09]: When rebuilding Apache/Php/Modssl etc can I re-use my existing server key and server certificate ? Do I need to get a new certificate from Thawte/Verisign even if its for the same host? As long as the cert is still valid, it should work

[PHP] Minimum Apache CD-ROM root

2001-12-03 Thread John Monfort
Hello all, I'm writing a PHP application that will run on a cd-rom. I have two questions: 1) Apache Server I wanted to add the apache server on the disk. What are the minimum files that I need, for apache to run? i.e. apache.exe httpd.conf etc. 2) Configuration File

Re: [PHP] zip.exe files

2001-12-03 Thread Jim Lucas
check out the www.php.net and look into the using the header function to force the down load instead of trying to executing the file. www.php.net/header Jim - Original Message - From: AAustin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 4:26 PM Subject:

Re: [PHP] Apache Php SSL

2001-12-03 Thread Chris Allen
Ya thanks...I needed to make sure what I was reading was *what* I was reading... Thanks Again, ccma As long as the cert is still valid, it should work just fine. You'll need to point your httpd.conf to the right (previous) certificates though. That is explained pretty nicely in the mod_ssl

[PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Monty
I'm a PHP and MySQL beginner. What's the best book I can buy that will get me started using both these technologies? 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

[PHP] The BEST Content Management Script?

2001-12-03 Thread Monty
Hi, I'm looking for a really good content management system written in PHP that's free or very little money. I looked on HotScripts.com, but, there are SO many of them! Can someone recommend one or two good ones? Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Kurt Lieber
There's dozens upon dozens of messages in the archive about this topic, which comes up at least once per month. I believe there's also a blurb or two about PHP books on the PHP web site, php.net. Please check those resources. --kurt On Monday 03 December 2001 08:35 pm, Monty wrote: I'm a

Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Monty
Sorry, I did a search here and found only one message with book recommendations. Where's the archive? Is it a separate newsgroup? I looked on php.net, but, only found a long list of books available, no recommendations. Monty From: [EMAIL PROTECTED] (Kurt Lieber) Reply-To: [EMAIL PROTECTED]

Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Brian Clark
* Monty [EMAIL PROTECTED] [Dec 03. 2001 23:37]: I'm a PHP and MySQL beginner. What's the best book I can buy that will get me started using both these technologies? Thanks! http://www.php.net/books.php Take the time to look around the site. -- -Brian Clark -- PHP General Mailing List

Re: [PHP] The BEST Content Management Script?

2001-12-03 Thread Brian Clark
* Monty [EMAIL PROTECTED] [Dec 03. 2001 23:39]: Hi, I'm looking for a really good content management system written in PHP that's free or very little money. I looked on HotScripts.com, but, there are SO many of them! Can someone recommend one or two good ones? I like phpWebsite. google.com

Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Kurt Lieber
On Monday 03 December 2001 08:45 pm, Monty wrote: Sorry, I did a search here and found only one message with book recommendations. Where's the archive? Is it a separate newsgroup? I looked on php.net, but, only found a long list of books available, no recommendations. The archive is linked

[PHP] New Page Escape Sequence

2001-12-03 Thread Robert Samuel White
I wish to take some information out of a database and create a text file with the information, nicely formatted. Does any one know of an escape sequence that works as a new page indicator for printing??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP] popen

2001-12-03 Thread Richard Lynch
Please Cc: me with responses. I dunno how soon I'll be able to read php-general again... Short version: If a program doesn't take data from stdin, and you want to get data to it more securely than writing it to a file, is there some combination of exec/popen and/or Un*x redirection | that

[PHP] automatic forward URL to other URL

2001-12-03 Thread Manu Verhaegen
I want automatic forward URL (www.mydomain.com) to (www.mydomain2.com) If i type in my brower www.mydomain.com the i will see www.mydomain2.com Greetings, Manu

  1   2   >