[PHP] Re: POST form variables not being sent to destination page

2002-09-10 Thread Erwin
On the PHP Bug board, I managed to find that it was to do with the Apache configuration settings, namely, you should put AddType application/x-httpd-php .php .php3 instead of; FilesMatch \.php$ SetOutputFilter PHP /FilesMatch in the httpd.conf file. This took ages to find and

[PHP] Re: changing session name

2002-09-10 Thread Luke Welling
I want to change the default session name 'PHPSESSID' to say ex. 'seid'. How can I do this without editing to the php.ini since I'm having a site on a virtual host. Try putting this at the start of your scripts: ini_set ('session.name', 'seid'); Luke Welling. -- PHP and MySQL Web

Re: [PHP] Count in PHP

2002-09-10 Thread xdrag
why not: select count(*) as counter from table - Original Message - From: Tyler Longren [EMAIL PROTECTED] To: Chuck PUP Payne [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 10, 2002 1:02 PM Subject: Re: [PHP] Count in PHP $sql = mysql_query(SELECT * FROM

RE: [PHP] dropdown Newbie question

2002-09-10 Thread Mario Ohnewald
Hello, after a little break ( i really needed it ;P), i tried to get this thing wotkig again. I changed action to .$PHP_SELF. and i added the echo to test if it works: echo $_POST['test']; But still emtpy, what do i do wrong? ?php echo ' form name=test action='.$PHP_SELF.' method=POSTbr

[PHP] Re: changing session name

2002-09-10 Thread Erwin
Mohd_q wrote: I want to change the default session name 'PHPSESSID' to say ex. 'seid'. How can I do this without editing to the php.ini since I'm having a site on a virtual host. http://www.php.net/session_name HTH Erwin -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] dropdown Newbie question

2002-09-10 Thread yasin inat
u cannot use form's name as variable . u should replace this row select id=colorPicker like this select name=test id=colorPicker u can see the selected option's value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Generating CSV files on the fly and getting the browser to download

2002-09-10 Thread Henry
Hi All, I suspect this is a commonly asked question but; how do I generate a CSV files on the fly and get the browser to download it. Do I actually need to generate a file or can I just generate a variable contain the data that would be in the file? Any help is greatly appreciated. TIA Henry

[PHP] Re: Generating CSV files on the fly and getting the browser to download

2002-09-10 Thread lallous
Try this: ?php $fileextension=csv; $filename=report; $fnsave = $filename.$fileextension; header(Content-disposition: filename=$fnsave); header(Content-type: application/force-download); // generate your CSV content here and print them to the browser via ECHO echo 'a,b,c,d,1';

[PHP] Re: Generating CSV files on the fly and getting the browser to download

2002-09-10 Thread Henry
It didn'ti work ;-( Just showed a page with the data in! How would I do it with a file in any case? Henry Lallous [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this: ?php $fileextension=csv; $filename=report; $fnsave = $filename.$fileextension;

RE: [PHP] Re: Generating CSV files on the fly and getting the browser to download

2002-09-10 Thread Dave at Sinewaves.net
try making the generated csv file an attachment to the php file... like so... ?php $fileextension=csv; $filename=report; $fnsave = $filename.$fileextension; header(Content-type: application/force-download); header(Content-disposition: attachment; filename=$fnsave); echo '1,2,3,4,5,6,7,8'; ?

[PHP] Re: Generating CSV files on the fly and getting the browser to download

2002-09-10 Thread Erwin
Henry wrote: It didn'ti work ;-( Just showed a page with the data in! How would I do it with a file in any case? You can give the PHP script the extension .csv and use AddType application/x-httpd-php .csv to your httpd.conf or .htaccess file. If you want to use a temporary file, you

[PHP] DPHPEdit new version

2002-09-10 Thread Davor Pleskina
Hi Everyone, specially DPHPEdit users! There is a new version of DPHPEdit - 0.9.4.2, which brings: - Highlighting method for current file can be manually changed in edit session - Custom highlighting support with Keywords and Functions editor - PHP Highlighter now recognizes different code

[PHP] PhpMyAdmin and PHP4.2.* Too many I/Os

2002-09-10 Thread Jean-Pierre Arneodo
Hi, I have some troubles with PhpMyAdmin and PHP4.2.* I experimented these couples of installations: PhpMyAdmin / PHP 2.2.6 / 4.1.2 2.2.7pl1 / 4.1.2 2.3.0 / 4.1.2 2.2.6 / 4.2.1 2.2.7pl1 / 4.2.1 2.3.0 / 4.2.1 2.2.6 / 4.2.3 2.2.7pl1 / 4.2.3 2.3.0 / 4.2.3 with MySQL v3.23.49 on RedHat7.2 PhpMyAdmin

[PHP] Mail() function problem

2002-09-10 Thread Alva Chew
Hi Everyone, I did a simple test with this script: ?php mail([EMAIL PROTECTED], test, this is a test mail); echo done; ? I run the script from web accounts on different servers. I can receive the test mail from some but not from others. Is there any configurations that I am missing here?

Re: [PHP] Upload Progress

2002-09-10 Thread electroteque
http://electroteque.dyndns.org:1023/demo/uploader/ following my other posts i have a working flash progress bar , although i cannot remove the empty arrays in the count how can i remove empty arrays in an array , the empty file inputs seem to still contain something , so instead of 1 as the

[PHP] Re: checkbox question

2002-09-10 Thread B.C. Lance
if you can't use [] for the checkbox, the only way out is to have unique name for each checkbox. otherwise, php will always be returning the value of the last checked checkbox if all checkboxes share the same name without the []. --lance Alex Shi wrote: How to ontain data from a group of

[PHP] Trying to add table prefix variable to query

2002-09-10 Thread Verdon Vaillancourt
This query worked until I tried to add support for a table prefix in the config file. Now it canĀ¹t seem to find the table. Any pointers to what I am doing wrong? Thanks, v Original query: ?php ... include(config.php); $open = mysql_pconnect($hostname,$user,$password);

RE: [PHP] Trying to add table prefix variable to query

2002-09-10 Thread Jay Blanchard
[snip] This is my query: ?php ... include(config.php); $open = mysql_pconnect($hostname,$user,$password); mysql_select_db($db,$open); $result = mysql($db,SELECT * FROM . $table_prefix . teams WHERE username = 'admin'); $i = 0; $total_rows =

Re: [PHP] Trying to add table prefix variable to query

2002-09-10 Thread bbonkosk
Maybe you should assign the query to is's own value doing your string concatenation... i.e. $query = select * ...; then echo out the query: echo $query; I think you will see the problem them, I would guess that when you are adding the table_prefix to the table name that you are getting an

[PHP] Populating Other People's Forms

2002-09-10 Thread Mike At Spy
I would like to write a script that would populate someone else's form on the net and get the results. Off hand, I imagine I would use fopen() to open up the web page and pass some variables to it. The problem I have is that the form I want to populate is a multi-step CGI. Is this possible?

Re: [PHP] Trying to add table prefix variable to query (solved)

2002-09-10 Thread Verdon Vaillancourt
Doh,... Thanks to all who replied so promptly with similar answers. :) vern On 9/10/02 9:13 AM, Jacob Miller [EMAIL PROTECTED] wrote: Make sure you don't have a space before the 2nd half of the table name Wrong: .. FROM . $table_prefix . teams this will produce FROM ccl_ teams

[PHP] Re: checkbox question

2002-09-10 Thread Craig Donnelly
This will work: http://www.php.net/array_merge Call your checkboxes like so: a.php == form action=b.php method=post input type=checkbox name=a1 value=Abr input type=checkbox name=a2 value=Bbr input type=checkbox

[PHP] random array sort

2002-09-10 Thread ROBERT MCPEAK
Could someone show me a quick and simple way to randomly sort array elements? I can't seem to pinpoint the correct parameters in the docs. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail() function problem

2002-09-10 Thread Pekka Saarinen
At 9/10/2002, you wrote: Hi Everyone, I did a simple test with this script: ?php mail([EMAIL PROTECTED], test, this is a test mail); echo done; ? I run the script from web accounts on different servers. I can receive the test mail from some but not from others. Is there any configurations that

RE: [PHP] random array sort

2002-09-10 Thread Mike At Spy
You could use array_rand() to take stuff out of the array at random and then stuff it all back into another array. -Mike -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: [PHP] random array

Re: [PHP] random array sort

2002-09-10 Thread David Rice
But if array_rand() truly pulls out random keys, how do you guarantee that you are not randomly pulling out the same key as you iterate through the array? Perhaps you could set the number of keys to return, to the size of the array, and somehow, magically, all the keys would be included in

RE: [PHP] random array sort

2002-09-10 Thread Mike At Spy
From what I understand about array_rand() and the example in the manual, it does only pull one of each element of the array. You could easily set up a script to compare what it is pulling to what the array you putting it into currently has in it if it didn't. -Mike -Original

Re: [PHP] random array sort

2002-09-10 Thread Jacob Miller
This appears to work // Normal array $a1 = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); srand((float) microtime() * 1000); $a_temp = array_rand($a1, sizeof($a1)); // Random array while (list(, $value) = each($a_temp)) { $a2[] = $a1[$value]; } print_r($a2); - jacob At 22:22 09/10/2002,

[PHP] Handling variables POSTed from form

2002-09-10 Thread Wm
I'm working on a project for a javascript class, but am having trouble with passing variables. Unfortunately, I can't do this with PHP (that would be too easy), but I have to use Javascript to do some calculations and output based on input from a form on a previous page. I am trying to

[PHP] Verify phone format?

2002-09-10 Thread Jeff Lewis
Just wondering what the best way to validate an entered phone format is? Is anyone doing this currently? I have a form field that people enter in information and I want to force phone entries to XXX-XXX-. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] random array sort -- array() selection quant??

2002-09-10 Thread ROBERT MCPEAK
Thanks all for you submissions. This is what I came up with, where $this_key is a random selection from the array $the_exploded_ids. I don't know why, but, array_rand() won't work with selection quanity parameter of less than 2. Anybody know why? srand ((float) microtime() * 1000);

php-general Digest 10 Sep 2002 15:53:46 -0000 Issue 1577

2002-09-10 Thread php-general-digest-help
php-general Digest 10 Sep 2002 15:53:46 - Issue 1577 Topics (messages 115806 through 115859): E-mail a submit 115806 by: Chuck \PUP\ Payne Re: QUery success, but blank results/variables 115807 by: Tom Rogers 115809 by: David Freeman Brainfart while uploading

Re: [PHP] Verify phone format?

2002-09-10 Thread David Rice
http://www.webreference.com/programming/php/regexps/5.html Here's a short article that shows how to write a function to validate an ausie phone number (2nd example). Should be easy to modify to suit. perhaps using something like ereg([0-9]{3}-[0-9]{3}-[0-9]{4}$, $phoneNum); Another at

[PHP] Server date and time

2002-09-10 Thread Christian Ista
Hello, When a use insert the row in a table, I'd like to know the date and time of this insertion. Is there a function to know the server date and time, not the local time user ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Server date and time

2002-09-10 Thread Richard Black
Hi Christian, PHP code runs on the server, so any of the date/time functions which the language provides will give you the date/time on the server, rather than the client. HTH, Richy == Richard Black Senior Developer, DataVisibility Ltd -

[PHP] mysql query

2002-09-10 Thread Chris Schoeman
I use the script below to get one value out of a database: $result = mysql_query(select euro from brandstofprijzen where id=2) or die (mysql_error()); while ($row = mysql_fetch_array($result)) { $euro = $row[euro]; } mysql_free_result($result); This is working fine, but is there an easier (less

[PHP] links into DB

2002-09-10 Thread Juan Pablo Aqueveque
Hi all, I want to do this: When somebody do click in this url : http://somehost.somedomain/mailtolinks.php?id=45 the script 'mailtolinks.php' should open my e-mail client (like mailto:[EMAIL PROTECTED] sentence) Any idea? thanks Juan

Re: [PHP] links into DB

2002-09-10 Thread Jacob Miller
I don't think its possible to make a normal link open the default email as mailto: is a special trigger built into the browsers. The only way I can think of would be using javascript in the page.. something like body onLoad=document.location='mailto:[EMAIL PROTECTED]'; /body - jacob At

Re: [PHP] links into DB

2002-09-10 Thread Juan Pablo Aqueveque
Oh yeah ...I thought this same, I simply wanted to know if somebody could give a better solution. Thank you for your quick answer Jacob!.. greetings!, --jp At 00:55 11-09-2002 +0800, Jacob Miller wrote: I don't think its possible to make a normal link open the default email as mailto: is a

Fw: [PHP] mysql query

2002-09-10 Thread Kevin Stone
Try mysql_result(); in place of that entire while() loop. http://www.php.net/manual/en/function.mysql-result.php Also there's no reason for you to use mysql_free_result() unless you're going to be performing multiple massive SELECTS before the script exits. -Kevin - Original Message -

Re: [PHP] Need more memory... possible to set?

2002-09-10 Thread Steve Edberg
Several ways: (1) PHP still reads a php.ini file, so you could set it there; try a php -i | grep php.ini to find out where the commandline php thinks it is (and/or do php -i | grep memory_limit to find the default memory limit setting. (2) You can set it at execution time

[PHP] Strore Data in File

2002-09-10 Thread Ram K
Hi I want to store the data of a table in a file and read that file just as one would read a table. For e.g. I have a table t_data with cols name,number,cost and my data file data.txt would have the following data: --- john,1,100 mark,2,200 spencer,3,200 --- Now on the web page when

Re: [PHP] links into DB

2002-09-10 Thread Kevin Stone
It's a GET request right? So it'll be just like any other Location header. mailtolinks.php will contain.. ? extract($_GET); // get email $addy that corresponds to $id. // header(Location: mailto:$addy;); ? -Kevin - Original Message - From: Juan Pablo Aqueveque [EMAIL PROTECTED] To:

Re: [PHP] Server date and time

2002-09-10 Thread Adam Williams
If you are using mysql, you can use the NOW() function to insert the time into a date field. It will insert the time that is on the server's clock. Adam On Tue, 10 Sep 2002, Christian Ista wrote: Hello, When a use insert the row in a table, I'd like to know the date

[PHP] ODBC text file connection problem

2002-09-10 Thread Ethan Nelson
Good morning... I've got one for ya. I've been trying to conenct to a csv text file = (comma delimited, \r\n row separators, and text qualifiers) using the = odbc_connect command and then run simple select statements through it. = It doesn't work and I'm at a loss for why. Here's the meat (I

[PHP] 4.2.3, apache 2.0.40 file access problem

2002-09-10 Thread Vadim Akselrod
Hi Folks, I upgraded to 4.2.3, but am having file access problems. Here's the code that fails: $file = test; if(!is_readable(getcwd() . / . $file))... // works if(!is_readable($file))... // fails If I access a file by full path, it works fine. If I access a file in the local dir, it fails.

[PHP] ODBC text file connect problem

2002-09-10 Thread Ethan Nelson
Good morning... I've got one for ya. I've been trying to conenct to a csv text file (comma delimited, \r\n row separators, and text qualifiers) using the odbc_connect command and then run simple select statements through it. It doesn't work and I'm at a loss for why. Here's the meat (I

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Jay Blanchard
[snip] I've got one for ya. I've been trying to conenct to a csv text file = (comma delimited, \r\n row separators, and text qualifiers) using the = odbc_connect command and then run simple select statements through it. = It doesn't work and I'm at a loss for why. [/snip] Why not use fopen()?

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Ethan Nelson
I actually do use fopen to connect to the file and create a table based on the column names I gather from the first line. However, actaully parsing through the file and trying to dynamically create insert statements for each row seems like it would be a regular expression nightmare. I really

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Jay Blanchard
[snip] As you can see, If I'm going to preserve the double quotes in the third column, I would have to come up with a script that would deal with escaped characters. I was hoping that I could just establish an ODBC connection to the text file, which it appears that I can, and then select stuff

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Ethan Nelson
I know that the connection works because the following command ODBC_tables into which I feed my connection accurately searches the connection and returns an array with some table information. [snip] // ODBC commands to explore connection: $result = odbc_tables($odbc);

[PHP] Help, Parse error caused by quotes andapostrophes in function, How do I fix this?

2002-09-10 Thread Kurtis Harper
The following is the format needed in order to run the convert command from command line, but I have a problem in exec() format: convert picture.jpg -font Arial-Bold -pointsize 20 -fill red -gravity southeast -draw text 10,10 'my text to add to picture' text-overlay.jpg this causes

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Jay Blanchard
[snip] // ODBC commands to explore connection: $result = odbc_tables($odbc); odbc_fetch_into($result,$row); print_r($row); [/snip] Have you tried a WHILE loop to print out each row? I am not sure of the exact syntax but something like; ?php while(odbc_fetch_into($result, $fields)){

Re: [PHP] dropdown Newbie question

2002-09-10 Thread timo stamm
Hi Mario, you can set error_reporting to E_ALL to give you more hints to bugs and to produce clean code. You are having two problems. The first was related to your form and has been addressed by Yasin. The second is that you have autoglobals off. That means you have to use

Re: [PHP] Compiling as BOTH DSO and CGI under apache.

2002-09-10 Thread timo stamm
Hi Dan, I am not able to answer your question directly, but maybe you could simply use the CLI command 'chown' to change the owner of the files? Timo Am Dienstag den, 10. September 2002, um 03:35, schrieb [EMAIL PROTECTED]: I need to build php as a CGI for some scripts that need to run

Re: [PHP] Server date and time

2002-09-10 Thread timo stamm
Hi Christian, Assuming that you use MySQL: Read up 6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types in the MySQL manual. Hint: Add a column to hold the timestamps. Timo Am Dienstag den, 10. September 2002, um 18:08, schrieb Christian Ista: When a use insert the row in a table, I'd like to

Re: [PHP] dropdown Newbie question

2002-09-10 Thread timo stamm
Hi Mario, you can set error_reporting to E_ALL to give you more hints to bugs and to produce clean code. You are having two problems. The first was related to your form and has been addressed by Yasin. The second is that you have autoglobals off. That means you have to use

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Ethan Nelson
So this code: $odbc = odbc_connect(cvalcoinput,,) OR die(There is an error connecting to the CSV file.); $result = odbc_tables($odbc); while(odbc_fetch_into($result, $fields)){ for ($i = 0; $i sizeof($fields); $i++) { echo $fields[$i] . br; } } Derives the following results:

RE: [PHP] ODBC text file connection problem

2002-09-10 Thread Jay Blanchard
[snip] $odbc = odbc_connect(cvalcoinput,,) OR die(There is an error connecting to the CSV file.); $result = odbc_tables($odbc); while(odbc_fetch_into($result, $fields)){ for ($i = 0; $i sizeof($fields); $i++) { echo $fields[$i] . br; } } Derives the following results:

Fw: [PHP] Help, Parse error caused by quotes andapostrophes in function, How do I fix this?

2002-09-10 Thread Kevin Stone
Hi. Try the backticks (execution) operator instead so you're not fighting yourself with quotes. I think it should work but this is untested. Let me know if it doesn't.. $out = `convert picture.jpg -font Arial-Bold -pointsize 20 -fill red -gravity southeast -draw text 10,10 'my text to add to

[PHP] Re: Escape characters won't go away

2002-09-10 Thread Richard Lynch
Well, I appreciate your input. But the backslashes are (well, were) there. And I wasn't putting them in. Here's what the sequence was: If you leave the default of Magic Quotes on in php.ini, you are adding the backslashes on every GET/POST/COOKIE data element as it comes in. I have a form

[PHP] Questions regarding inserting and updating data into a MySQL db

2002-09-10 Thread Axis Computers
Hi, I'm developing a web application that uses forms for user input and then after each form is filled shows something like Welcome Bob to our site ... bla. bla... inserts data in a table and on the same page continues with the rest of the data, and goes to another form and so on. I have

Re: [PHP] Strore Data in File

2002-09-10 Thread Kevin Stone
RK, this is ultra-basic stuff. Opening and dealing with files is one of the first things you learn with any language. I would highly recommend buying a beginners guide to PHP book and learning thist stuff on your own. But for now this will get you started... ? //Open a file into an array..

RE: [PHP] Strore Data in File

2002-09-10 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Example (not tested) $fp = fopen('file.csv', 'r'); // open file for reading while ($data = fgetcsv ($fp, 1000, ,)) { // read each line of file if ($data[1] == $key) { // determine if key matches the current row $name = $data[1]; // assign information to variables

[PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Alex Shi
What these two things mean: __FILE__ and __LINE__ ? I searched manul but find nothing about them... Alex -- --- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Fw: [PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Kevin Stone
http://www.php.net/manual/en/language.constants.php -Kevin - Original Message - From: Alex Shi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 10, 2002 2:31 PM Subject: [PHP] What these two things mean: __FILE__ and __LINE__ What these two things mean: __FILE__ and

Re: [PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Alex Shi
I read the link, still don't get what are the exact meaning of those two things. What the link refered is a section from PHP manul that I have a copy on my local computer, and to me it doesn't seems like a formal defination of them. From the messages appending to the ariticle I saw one more thing

[PHP] Re: Web based FTP client

2002-09-10 Thread Jonathan Abbey
Mark McCulligh wrote: I am trying to build or find a web FTP client. I can create a server side FTP app in PHP no problem, but I would like the user to be able to browse their own file system. I thought about using upload functions with PHP FTP functions on the server but I didn't want

Re: [PHP] Populating Other People's Forms

2002-09-10 Thread Chris Shiflett
It sounds like you need to look into using cURL. It helps with automated posting. Now, you need to first determine whether the forms in question use a method of get or post before deciding how to proceed. If they use get, you can simply use a series of fopen() calls with the appropriate

[PHP] Help getting count to show up.

2002-09-10 Thread Chuck Payne
Hi, Last night I asked for help doing counts. One of the answers I got was really great but I can't make it work. The answer I more or less show me a great way to create a stats page, ex. SELECT feild1, field2, COUNT(*) FROM tables GROUP BY category, format. But my problem is I can't get count

RE: [PHP] Help getting count to show up.

2002-09-10 Thread David Buerer
SELECT feild1, field2, COUNT([insert field name here]) FROM tables GROUP BY category,format --or-- SELECT feild1, field2, COUNT([insert field name here]) as mycount FROM tables GROUP BY category,format -Original Message- From: Chuck Payne [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

[PHP] reading email from stdin

2002-09-10 Thread Matthew Miller
I am working on code that will allow me to read email that is directed to a PHP script (via .forward files) for various purposes, as part of an integrated Intranet project. I have hacked a bit at it and came up with code that works for the tests I can throw at it, but I'm not confident enough

[PHP] Apache compile

2002-09-10 Thread William Allmendinger
Hello, I am currently working on compilling php as both a cgi ands as an apache module on the same server. The cgi compile, which I did first with ./configure --with-ldap={ldap dir} --with-mysql, went jsut fine. However, when I try to compile it as an apache module, both as ./configure

RE: [PHP] Help getting count to show up.

2002-09-10 Thread David Freeman
ex. SELECT feild1, field2, COUNT(*) FROM tables GROUP BY category, format. Try this instead: SELECT field1, field2, COUNT(*) AS field3 FROM TABLS GROUP BY category,format Now you'll find your count is available as 'field3'. CYA, Dave -- PHP General Mailing List

RE: [PHP] Apache compile

2002-09-10 Thread MET
Did you delete the config.cache file in the PHP directory after the first configure, make, make install, and make clean commands? Did you add the appropriate info into apache's httpd.conf file so that is knows what .php files are and what to parse them with? Did you add the appropriate command

[PHP] Dependent Dropdown Boxes

2002-09-10 Thread Roger Lewis
The Situation: I'm trying to create a pair of dynamic dropdown boxes where the options in the second box are dependent on the selection in the first box. I call the first box categories and the second, subcategories. I want to store the categories and subcategories in a mysql table(s) so that

[PHP] Confusing array question ...

2002-09-10 Thread John Kelly
Hi, I have 1 primary array called $item containing 20 values each of whose value is part of the name of 20 other arrays containing various number of values. How can I cycle through the primary $item array using a foreach and within that do a for on each of the 20 secondary arrays dynamically

Re: [PHP] random array sort

2002-09-10 Thread Tom Rogers
Hi, Wednesday, September 11, 2002, 12:22:05 AM, you wrote: RM Could someone show me a quick and simple way to randomly sort array RM elements? I can't seem to pinpoint the correct parameters in the docs. RM Thanks! The function you need I think is shuffle() -- regards, Tom -- PHP

Re: [PHP] Verify phone format?

2002-09-10 Thread Justin French
The problem you have is that not all phone numbers share that format... mine for example (Australia) is 61 3 (that is, CountryCode, State, Exchange, Number). So it depends on who will fill out your form... if you're talking international, you may want to think twice. It never ceases

Re: [PHP] Verify phone format?

2002-09-10 Thread Jeff Lewis
If it makes you feel better, it's a site only for Canada. Jeff - Original Message - From: Justin French [EMAIL PROTECTED] To: Jeff Lewis [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 10, 2002 7:35 PM Subject: Re: [PHP] Verify phone format? The problem you have is that

RE: [PHP] Confusing array question ...

2002-09-10 Thread Martin Towell
Try adding curly braces around the var name, like this: for($i=0; $icount(${beginning . $value . end}); $i++) { also, a look at the variable variables manual page will help further HTH Martin -Original Message- From: John Kelly [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11,

RE: [PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Martin Towell
If I remember correctly __FILE__ contains the current file name of the script __LINE__ contails the current line number in the script __PATH__ contains the path to the current script HTH Martin -Original Message- From: Alex Shi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11,

[PHP] Easy Function Question?

2002-09-10 Thread Shane
I have a need to call a function, where all the variables used might not be set. Is there a way to have a variable in a function have a default setting if the variable passed to the function is VOID? EXAMPLE: $name=me; $phone=; //$zip is VOID function myFunction($name, $phone, $zip){

Re: [PHP] Confusing array question ...

2002-09-10 Thread John Kelly
Thanks that did it! Martin Towell [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try adding curly braces around the var name, like this: for($i=0; $icount(${beginning . $value . end}); $i++) { -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Easy Function Question?

2002-09-10 Thread Martin Towell
function myFunction($name, $phone, $zip=){ echo $name.$phone.$zip } is the corrent format, but if you call it like this: myFunction(name, phone, null); then $zip will equal null, not something like this might help function myFunction($name, $phone, $zip=){ if (!$zip) $zip =

RE: [PHP] Easy Function Question?

2002-09-10 Thread Shane
Martin, so if I write... function myFunction($name, $phone, $zip=){ echo $name.$phone.$zip } and $zip is NOT SET then $zip will = . But if $zip IS SET then $zip will = whatever $zip's current value is, and will NOT be changed to ? Please advise. Thanks Martin -Original

RE: [PHP] Easy Function Question?

2002-09-10 Thread Martin Towell
if you pass a third parameter, then $zip will equal that parameter If you only pass two parameters, then $zip will equal eg1. myFunction($var1, $var2); $zip will = eg2. myFunction($var1, $var2, $var3); $zip will = $var3, no matter what $var3 contains $var3 could be null, , or

Re: [PHP] Questions regarding inserting and updating data into aMySQL db

2002-09-10 Thread Chris Shiflett
You should search for some SQL tutorials on the Web. What it sounds like you are looking for is the update SQL statement which modifies an existing row (for your second form, for example). Thus, you insert the row to create it (which assigns the key using the auto increment), then update that

[PHP] Fw: Questions regarding inserting and updating data into a MySQL db

2002-09-10 Thread Axis Computers
- Original Message - From: Axis Computers To: [EMAIL PROTECTED] ; PHP Sent: Tuesday, September 10, 2002 4:51 PM Subject: Questions regarding inserting and updating data into a MySQL db Hi, I'm developing a web application that uses forms for user input and then after each form

[PHP] subdomain

2002-09-10 Thread Liam MacKenzie
G'day everyone, I have a dilemma... I'm running BIND locally, with a wildcard A record. That means that if someone goes to http://somebullshit.mydomain.com/ they'll get my page up. What I want to do is catch that subdomain into a variable... Is there a PHP global that can get that? So, if

Re: [PHP] subdomain

2002-09-10 Thread Tyler Longren
Try this: $subdomain = $_SERVER[SERVER_NAME]; And then get all the text before the first .. Tyler On Wed, 11 Sep 2002 10:55:56 +1000 Liam MacKenzie [EMAIL PROTECTED] wrote: G'day everyone, I have a dilemma... I'm running BIND locally, with a wildcard A record. That means that if someone

[PHP] Thanks...

2002-09-10 Thread Chuck \PUP\ Payne
Many thanks. That was the trick. :) Chuck Payne Magi Design and Support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Capitialisation

2002-09-10 Thread Liam MacKenzie
G'day all... $variable = joe blow; How can I automatically make $variable = Joe Blow; The value's obviously dynamic, so I need to capitalise each letter of each word in the var. Any ideas? For those of you who read my previous post, you may have worked out what I'm doing ;-) Cheers, Liam

Re: [PHP] Capitialisation

2002-09-10 Thread Chris Shiflett
ucwords() Liam MacKenzie wrote: $variable = joe blow; How can I automatically make $variable = Joe Blow; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Capitialisation

2002-09-10 Thread Liam MacKenzie
oh cool, didn't know that existed! thanks! - Original Message - From: Chris Shiflett [EMAIL PROTECTED] To: Liam MacKenzie [EMAIL PROTECTED] Cc: php [EMAIL PROTECTED] Sent: Wednesday, September 11, 2002 11:53 AM Subject: Re: [PHP] Capitialisation ucwords() Liam MacKenzie wrote:

[PHP] Don't read if easily offended...

2002-09-10 Thread Liam MacKenzie
Give a man a day at home sick with nothing to do, and you get some... Interesting results... http://bill.clinton.fuckedyourmum.com/ Try your mate's name in there... =) Thank's for everyone's help in producing this absolutely useless masterpiece! Cheers, Liam -- PHP General Mailing List

Re: [PHP] Don't read if easily offended...

2002-09-10 Thread Tyler Longren
You should check to make sure the variable isn't empty. And if it is put some other name in there (like Bill Clinton). Cuz if you go to just http://fuckedyourmum.com, you just get: fucked your Mum!!! for text. Just a suggestion, Tyler On Wed, 11 Sep 2002 12:08:03 +1000 Liam MacKenzie [EMAIL

Re: [PHP] Don't read if easily offended...

2002-09-10 Thread Liam MacKenzie
Yeah, good idea. I'll do that now, I've got nothing else to do! :-) - Original Message - From: Tyler Longren [EMAIL PROTECTED] To: Liam MacKenzie [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 11, 2002 12:13 PM Subject: Re: [PHP] Don't read if easily offended...

Re: [PHP] subdomain

2002-09-10 Thread Dennis Moore
Grab the $SERVER_NAME environmental variable. Then parse the variable using explode on the period in the domain name. Count the number of elements in the array. and selcct the element you want to use /dkm - Original Message - From: Liam MacKenzie [EMAIL PROTECTED] To: php [EMAIL

Re: [PHP] subdomain

2002-09-10 Thread Liam MacKenzie
Thanks, I tried that but I couldn't get it to work. It only returned fuckedyourmum.com without the subdomain. I used $_SERVER[HTTP_HOST] instead. Look at the source if you like... http://source.fuckedyourmum.com/index.phps - Original Message - From: Dennis Moore [EMAIL PROTECTED]

  1   2   >