[PHP] Access GAH

2003-02-04 Thread Todd Barr
Hello folks, I was wondering if anyone had anyluck with empty fields in Access. Basically, I have an update page, and sometimes items are left blank on purpose. but when I click to update, it gives me an error, as some fields are left blank. Is this an access thing, or can I code around it.

Re: [PHP] include

2003-02-04 Thread Philip Olson
On Tue, 4 Feb 2003, Bob Lockie wrote: On 02/04/03 13:16 Philip Olson spoke thusly On Tue, 4 Feb 2003, Bob Lockie wrote: I don't appear to be able to use this variable in an include directive because the variable is empty: include $_SERVER['DOCUMENT_ROOT'] Do I have the syntax

Re: [PHP] Access GAH

2003-02-04 Thread 1LT John W. Holmes
It probably depends on how you're creating your SQL statement... ---John Holmes... - Original Message - From: Todd Barr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 04, 2003 2:56 PM Subject: [PHP] Access GAH Hello folks, I was wondering if anyone had anyluck with

[PHP] Function to make a select box

2003-02-04 Thread Leonard Burton
Greetings, In several scripts that I have written I have had to have a similar select box. It will select from a table an auto number field and a name field (like an id # and a customer name) and then it will display the name on the screen and the variable posted will be the auto #. Could

[PHP] Protect Access to a Directory

2003-02-04 Thread Pushpinder Singh Garcha
Hi, I am using PHP and MySQL in my application. I have created a Login System for using Sessions. The problem that I am facing is that I need to protect a large number of pages in my website. So I have tried to use this method and it works fine for me : ? session_start(); if

Re: [PHP] php3 + HTTP_POST_FILES

2003-02-04 Thread Maxim Maletsky
same as what $_FILES since PHP 4.1.0 gives you -- Maxim Maletsky [EMAIL PROTECTED] Dan Rossi [EMAIL PROTECTED] wrote... : i looked there i'm sure i didnt see that :| what a pain , another reason to get them to upgrade ;) what information can i get out of the file then ? -Original

[PHP] testing a query for success--code doesnt work

2003-02-04 Thread Sunfire
hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were updated it still reports the success message... heres the code i have: $query=mysql_query(update members set

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
I believe as long as the update was successful (no errors) it will say 'message if successful'...I think you are wanting to know if rows were updated or not...not whether or not the query ran ok. Eddie -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
I think you want to use mysql_affected_rows -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:51 PM To: [EMAIL PROTECTED] Subject: [PHP] testing a query for success--code doesnt work hi.. posted a message about what the code was to test an

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Chris Hayes
At 21:51 4-2-2003, you wrote: hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were updated it still reports the success message... heres the code i have:

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Sunfire
yes that is what i needed.. how many rows were changed as well as how did the query run in general... i want the: if($query){ ok message } else{ fail message } but i also want a query test that goes something like this: if(0 rows were updated){ message saying nothing happened }else{ message saying

[PHP] In Need of a PHP freelancer...

2003-02-04 Thread Shane
-Original Message- Greetings... I am in need of a freelancer to write an additional function to our company's extranet. Before I go and post a request to this list, I would like to know if there is a more appropriate place to post such a request, and still get quality folks who know

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Kevin Stone
FYI, I replied to a similar problem just a few threads down. Next time please consider searching before you post. You'll find you can answer your own question 9 out of 10 times. $result = mysql_query(UPDATE or INSERT or DELETE... ) or die(Invalid query: . mysql_error()); if

Fwd: Re: [PHP] Function to make a select box

2003-02-04 Thread Chris Hayes
Date: Tue, 04 Feb 2003 22:02:12 +0100 To: Leonard Burton [EMAIL PROTECTED] From: Chris Hayes [EMAIL PROTECTED] Subject: Re: [PHP] Function to make a select box Could anyone offer any suggestions? The following function prints a blank select box. $result= select auto, '$field' from '$table'

Re: [PHP] In Need of a PHP freelancer...

2003-02-04 Thread 1LT John W. Holmes
-Original Message- Greetings... I am in need of a freelancer to write an additional function to our company's extranet. Before I go and post a request to this list, I would like to know if there is a more appropriate place to post such a request, and still get quality folks who know

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
Just grab your qu ? $affected_rows = mysql_affected_rows($query); if ($affected_rows==0){ print No rows updated; } else{ print $affected_rows. rows have beenupdated.; } ? or something along those lines...but also add in your check to see if the query ran

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Chris Shiflett
* if the update does not have anything to work on it does not mean it is a failure! except when you EXPECTED it to update something. Right, and the function doesn't care what you expect anyway. :-) * i'm not sure whether if ($query) is the proper way to check this. for trapping

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Kevin Stone
FYI unlike the other mysql result functions mysql_affected_rows() works on the last query *only* and does not accept a results pointer as input. So this will result in an error... $result = mysql_query(UPDATE.. whatever); $affected_rows = mysql_affected_rows($result); //== invalid identifier

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
thanks!...my fault... I had never used it...been using mysql_num_rows so that is where I took the example. Thanks! Eddie -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 4:53 PM To: Edward Peloke; [EMAIL PROTECTED] Subject: Re: [PHP]

[PHP] PhpMyADmin Help

2003-02-04 Thread Pushpinder Singh Garcha
Hello , I am using PhpMyAdmin to control my MySQL Database. Untill now I had been using the Local Apache webserver to test my scripts, so I had installed PhpMyAdmin in the 'Sites' Folder of my Mac. Now I need to beta test the Application on the Live Server. Do I need to upload PhpMyAdmin on

[PHP] PHP 4.3.0 and Sablotron 0.97

2003-02-04 Thread Dirk van Lyrop
Hi, I' trying to install the version 4.3.0 of PHP with xslt via sablotron on a linux system. Already installed are expat 1.95.6, JS 1.5.x and Sablotron 0.97. When I run ./configure in the PHP source directory everything seems to be okay. But on calling make I've got the following error messages

[PHP] Re: How to get a certain line from a file

2003-02-04 Thread Goetz Lohmann
The New Source schrieb: How can I get a certain line from a file? If I get a file in this way: $f = fopen(http://www.url.com/index.htm,r;); How can I get a certain line of the file index.htm? I would need to get the line number 232, or lines from 232 to 238. How can I get this

Re: [PHP] Socket error connecting to mySQL

2003-02-04 Thread victor
did u turn mysql on? end of mysql installation output: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h CPE00022af118a5-CM024330008757.cpe.net.cable.rogers.com password

[PHP] unexpected warnings - what do they mean? - phpMyAdmin - also postedon the phpMyAdmin mailing list...

2003-02-04 Thread victor
i am getting the following warnings after i try to inser data into some table cells i created. i have PHP Version 4.1.2 and MySQL 3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0 installed, but i dont know how to make apche see it or use it. its ina different directory than the

Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread Steve Keller
At 2/4/2003 06:46 PM, you wrote: i am getting the following warnings after i try to inser data into some table cells i created. i have PHP Version 4.1.2 and MySQL 3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0 installed, but i dont know how to make apche see it or use it. its

[PHP] reading file into a keyword-indexed array

2003-02-04 Thread Durwood Gafford
I would like to read and write user-settings to a keyword-value file and be able to extract it. The following code works fine but i wondered if there was a more elegant/direct way of doing this. -Durwood $file = user_settings.txt; // Read user settings from file if it exists, otherwise set to

Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
they the default lines of code form phpMyAdmin the newest one stable. just installed it today, the lines are not modified they what the devs made them... - Vic Steve Keller wrote: At 2/4/2003 06:46 PM, you wrote: i am getting the following warnings after i try to inser data into some table

[PHP] overriding php.ini path in cgi

2003-02-04 Thread Dmitri
Hi! I am trying to override php.ini filename for cgi scripts running through the following setup: AddType php-script .php Action php-script /php4/php It is all working fine, but specifying alternative php.ini path does not work! I have tried the following solution: over.c: #include stdio.h int

RE: [PHP] [SOLVED] Socket error connecting to mySQL

2003-02-04 Thread Bryan Lipscy
Thank you everyone for your help. The cause of this problem was the user account was set up for localhost rather then the server. What threw me was the /tmp/mysql.sock part of the error when MySQL is installed on a Windows box. I was looking for something wrong in the PHP script or on the

[PHP] Re: reading file into a keyword-indexed array

2003-02-04 Thread Philip Hallstrom
You could just serialize $param and write it out to a file then read it back in and unserialize it... simpler in PHP... not sure whether it's more efficient or not. On Tue, 4 Feb 2003, Durwood Gafford wrote: I would like to read and write user-settings to a keyword-value file and be able to

[PHP] Good success with sysvmsg!

2003-02-04 Thread Mattias Nilsson
Hi Just wanted to tell you all that I've had good sucess with using the new (PHP 4.3.0) sysvmsg support. I'm using an ad-delivery php script to write to a sysvmsg-queue (impressions/clicks) and a running background process that reads from the same queue. We're doing well above 100 writes/reads

Re: [PHP] overriding php.ini path in cgi

2003-02-04 Thread Dmitri
This worked, problem solved: (apparently it only understands a path but not a filename. and command-line arguments didn't work for some reason.) #include stdio.h int main(int argc, char *argv[]){ putenv(PHPRC=/a/custom/path/to/); execl(./php,argv[0],argv[1],0); return 0;

RE: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread John W. Holmes
PHPMyAdmin probably requires a lower error_reporting level than you have. You're just seeing NOTICES, not errors. Either adjust the error_reporting in php.ini, an .htaccess file for this directory, or use the error_reporting() function in the PHPMyAdmin script. ---John W. Holmes... PHP Architect

RE: [PHP] reading file into a keyword-indexed array

2003-02-04 Thread John W. Holmes
I would like to read and write user-settings to a keyword-value file and be able to extract it. The following code works fine but i wondered if there was a more elegant/direct way of doing this. For reading, parse_ini_file() is elegant and direct. Writing is another matter. If you are

Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
the error reportin value is marked specifically not to be touched, plus there are other things that are wroong like the values that i am inserting though the forms is not picked up... - i will try an older relase see if it works better. - vic John W. Holmes wrote: PHPMyAdmin probably requires

RE: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread John W. Holmes
Is it a register_globals problem, then? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 7:48 PM To: [EMAIL

RE: [PHP] HTML if no PHP

2003-02-04 Thread John W. Holmes
3) Include and execute capturing critical errors: $hf = fopen($incfile, 'r'); if ($hf) { $buffer = fread($hf, filesize($incfile)); fclose($hf); } if ($buffer) { global $php_errormsg; $php_errormsg = null; @eval($buffer); $err = $php_errormsg; } The rest

Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
WHOHOO!!! probme solved! (read: worked around) i downloaded the older phpMyAdmin release and it worked perfectly! could this be a bug in phpMyAdmin? - Vic victor wrote: the error reportin value is marked specifically not to be touched, plus there are other things that are wroong like the

RE: [PHP] Is my syntax wrong?

2003-02-04 Thread John W. Holmes
I think we are almost there. This code is not producing an error, but it is also not incrementing the database. The value stays at zero. Any idea what could be wrong? $inc_current_ad = WrapMySQLDatabaseResults(macasap, update ads where ad_id = .$current_ad-Value(ad_id). set

Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
And what do you know? it is. damn old redhat php.ini . ok, no onto the next related question. i have installed php 4.30 but apache stilll uses the rpm default redhat php. how do i do this. also i remember that in the olden days i could type apachectl and control apache, but not so in redhat?

[PHP] Array find a element

2003-02-04 Thread Narciso Miguel Rodrigues
Is possible to do something like if ($username in $users) ... or i need to do a foreach($user){...} Thks [MsR] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array find a element

2003-02-04 Thread John W. Holmes
Is possible to do something like if ($username in $users) ... or i need to do a foreach($user){...} www.php.net/in_array www.php.net/array_search ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

[PHP] WYSIWYG Content Management system?

2003-02-04 Thread J J
I've seen CMS systems like phpnuke but it's kind of overkill for what I need and almost more news like. I'm looking for something that would allow the user to change content, change/upload images, all in a wysiwyg style so it's easy to see and use. It'd be cool to be able to login to the admin

[PHP] Making /something/blah work instead of /something.php/blah

2003-02-04 Thread Andrew Brampton
Hi, I did a bit of googling for this, but I was unsure on what to google for, so I came up with nothing :( Anyway I have a 3 servers, windows, freeBSD, and my web hosts. I have used the following style URLs for many of my scripts, ie: www.mysite.com/something/blah/blah/blah where something is

[PHP] Re: Array find a element

2003-02-04 Thread Bobby Patel
look at array_key_exists Narciso Miguel Rodrigues [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is possible to do something like if ($username in $users) ... or i need to do a foreach($user){...} Thks [MsR] -- PHP General Mailing List

[PHP] Printing

2003-02-04 Thread Chris Kay
I am thinking of running a print job from one system via the internet to a network printer, this can be done... Question 1.. Anyway had experience with a certain printer that would be goof for this... Question 2.. Could some one point me to the right place I may learn how to print to a network

[PHP] php problem

2003-02-04 Thread Aaron Downes
Dear Sir/Madam, trying to displaying records by php get error : Parse error: parse error in /hsphere/local/home/ozhomene/ardownes.com/ViewContacts.php on line 30 see below for code for ViewContacts.php : html body ? $connection=mysql_connect(localhost,,);#am entering userID password

Re: [PHP] Printing

2003-02-04 Thread Jason Sheets
If you have setup your printer with lpr then you can send print jobs with PHP via lpr (using command line execution) to the printer. You should be able to use other print systems that offer command line printing as well. Look at the PHP process execution functions for actually executing the

Re: [PHP] php problem

2003-02-04 Thread Jason Sheets
Hi Aaron, I noticed several things, first you are fetching your database row into $rows but you are referencing the data in $row, and second you do not have a $ in front of your $row variable name, in order to get the contents of a variable you must use $variable. I've included modified code to

Re: [PHP] php problem

2003-02-04 Thread Jason k Larson
changed $rows to $row on line 29 added variable identifier $ to 'row' variables on others. while ($row=mysql_fetch_array($mysql_result)) { $ID=$row['ID']; # this is line 30 $first_name=$row['first_name']; $surname=$row['surname'];

[PHP] Sessions and Cookies

2003-02-04 Thread acleave
I'm trying to use cookies in PHP4 (.whatever the latest release is). I want to use them for validation (ensuring a user has logged in) but all I can find is setcookie, which seems only to create the cookie. In trying to use PHP sessions, I end up with odd errors. When I try to use sessions I

Re: [PHP] Sessions and Cookies

2003-02-04 Thread Leif K-Brooks
acleave wrote: My Questions: If I create a cookie with set_cookie how do I read it/check it? $_COOKIE superglobal array. How do I use sessions if they can't be sent in the code? The session_start function has to be at the VERY top of the of the code, below ANY output (even blank spaces

Re: [PHP] Sessions and Cookies

2003-02-04 Thread Dmitri
Well, that is natural - cookies can only be set before any output is produced by the script. And since sessions in this case use cookies, it follows that sessions can also be started before any output is produced. Why is that? Because cookies are transmitted by means of http headers, and http

[PHP] inserting datas through table

2003-02-04 Thread kumar
Dear Sir/Madam, I have create table for reservation system in that table i need to save all the values but it couldn`t save all the values it saves only the last value. Please help me! html ?php if($submit) { $db = mysql_connect("localhost", "kumar","");

[PHP] Best way to include multi-lingual support in an application.

2003-02-04 Thread JJ Harrison
I am currently planning an application. I would like to include multiple language support so that I can have a german or french version down the track if need be. What are your views on the best way to include the ability to add languages after it is complete? -- --- JJ Harrison [EMAIL

Re: [PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Ananth Kesari
Thanks for your inputs. Will proceed from here. Well, if you did not know, NetWare is an operating system brought out by Novell. We are working on porting PHP onto NetWare. In fact, we already have ported PHP 4.2.3 onto NetWare and we have synched up our souces for the 4.3 branch. Thanks,

Re: [PHP] Security question with PHP on Unix / Linux.

2003-02-04 Thread Ananth Kesari
Thanks for your inputs. Will proceed from here. Well, I first posted this query on this list. But seeing no response, I thought probably it should have gone into PHP-dev list. When I posted there, I was discouraged to post such mails there. So, I came back to the general list. Thanks, Ananth.

Re: [PHP] Making /something/blah work instead of /something.php/blah

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 09:55, Andrew Brampton wrote: If I try www.mysite.com/something.php/blah/blah/blah It works as expected, but I don't really want to keep the .php in the URL (just to make things look prettier/smaller) So I was wondering if anyone knows what I need to change

Re: [PHP] WYSIWYG Content Management system?

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 09:43, J J wrote: I've seen CMS systems like phpnuke but it's kind of overkill for what I need and almost more news like. I'm looking for something that would allow the user to change content, change/upload images, all in a wysiwyg style so it's easy to see and

[PHP] fputs / fwrites

2003-02-04 Thread Lee Herron
Okay, so I want to open a file, get a small number from it (less than 3 digits) then overwrite a new number (incremented the original by 1) and close the file. The goal is to do this in the fastest way possible .. it seems that there should be a way of doing this without having to open and close

Re: [PHP] Protect Access to a Directory

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 04:06, Pushpinder Singh Garcha wrote: Hi, I am using PHP and MySQL in my application. I have created a Login System for using Sessions. The problem that I am facing is that I need to protect a large number of pages in my website. So I have tried to use this

Re: [PHP] fputs / fwrites

2003-02-04 Thread Jason Wong
On Wednesday 05 February 2003 15:00, Lee Herron wrote: Okay, so I want to open a file, get a small number from it (less than 3 digits) then overwrite a new number (incremented the original by 1) and close the file. The goal is to do this in the fastest way possible .. it seems that there

<    1   2