[PHP] Re: php3/php4 difference

2002-02-23 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > $numresult=mysql_query($sql) > or die( "4 QUERY ERR $sql"); > > echo "numresult = $numresult"; > > $numrows=mysql_num_rows($numresult); > mysql_free_result($numresult); > echo "You have selected " .$numrows ." > record(s)."; >

php-general Digest 24 Feb 2002 04:46:46 -0000 Issue 1190

2002-02-23 Thread php-general-digest-help
php-general Digest 24 Feb 2002 04:46:46 - Issue 1190 Topics (messages 85942 through 85980): Re: php 4.1.1 vs 4.0.6 85942 by: John Lim 85949 by: Jason Wong 85950 by: Andrey Hristov Novice question 85943 by: brendan conroy Associative array key as a variable

Re: [PHP] help a newbie out... FIXED

2002-02-23 Thread Michael Zornek
Twas 2/23/02 11:27 PM, when "Michael Zornek" <[EMAIL PROTECTED]> said: > I'm getting a parse error with the following on line 9 > > http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps > > any clue? Fixed, I figured it out.. I forgot to replace a bunch of vars with the new nam

Re: [PHP] help a newbie out...

2002-02-23 Thread Bogdan Stancescu
Michael Zornek wrote: >I'm getting a parse error with the following on line 9 > >http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps > >any clue? > >~ Mike > |$full_anchor_tag = "mailto:\"; ;| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

[PHP] help a newbie out...

2002-02-23 Thread Michael Zornek
I'm getting a parse error with the following on line 9 http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps any clue? ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Perso

[PHP] Re: Sendmail

2002-02-23 Thread Erica Douglass
Do you have a specific reason for calling Sendmail directly? If not, try http://www.php.net/manual/en/function.mail.php Erica "Uma Shankari T." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hello, > > > Can anyone help me in solving this problem..

[PHP] sessions

2002-02-23 Thread Alexander P. Javier
ok, i got i working now, thanx to all who helped especially michael, chris & edward alyx - Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games

Re: [PHP] I need a random number eather one or two

2002-02-23 Thread Bogdan Stancescu
He was probably looking for an "alternative" solution, such as $heads=(microtime() % 2) :-) Bogdan Duncan Hill wrote: >On Sun, 24 Feb 2002, Philip J. Newman wrote: > >>I'm trying to make a random number kind of a coin toss, >> >>heads = 1 = left >>tales = 2 = right >> > >Google is your friend

[PHP] Ughh not a cookie :(

2002-02-23 Thread John Cuthbert
Below is included part of a script for a polls (simple yes no) I am trying to use cookies to determin if they have already voted or not. No errors are displaed but, I have tried to vote, and it gives no errors, nor does it give an increase in the database, fine you might think its doing its job ri

[PHP] Re: I need a random number eather one or two

2002-02-23 Thread jtjohnston
rand (1, 2) http://www.php.net/manual/en/function.rand.php ? J "Philip J. Newman" wrote: > I'm trying to make a random number kind of a coin toss, > > heads = 1 = left > tales = 2 = right > > any solutions > > Philip J. Newman > Philip's Domain - Internet Project. > http://www.philipsdomain.com/

Re: [PHP] I need a random number eather one or two

2002-02-23 Thread Duncan Hill
On Sun, 24 Feb 2002, Philip J. Newman wrote: > I'm trying to make a random number kind of a coin toss, > > heads = 1 = left > tales = 2 = right Google is your friend. 'php rand' http://www.alt-php-faq.org/local/90/ Other details in PHP manual, Mathematical functions section. -- PHP Gener

[PHP] I need a random number eather one or two

2002-02-23 Thread Philip J. Newman
I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right any solutions Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012

[PHP] Sendmail

2002-02-23 Thread Uma Shankari T.
Hello, Can anyone help me in solving this problem.. For sending mail using sendmail i have written the code like this but it is giving some error messages in the From address instead of address $TO=Me; $[EMAIL PROTECTED]; $fd = popen("/usr/sbin/sendmail -t","w"); fputs(

[PHP] countless

2002-02-23 Thread jtjohnston
Success. After a bit of tinkering :) and reading up. Thanks for the ideas. Now one last question. here is my array $authors: http://ccl.flsh.usherb.ca/db/authors_under_study.php sorted alphabetically. How do I go about sorting again it so it renders: Aguiar, Flavio1 Andrade, Mario d

[PHP] upload a file

2002-02-23 Thread czeslaw
hi, I try to upload a file using a form. When I use INPUT TYPE="text" it is ok, but when i change it to "hidden" it doesn't work :( This is a part of the form: where $dir is a directory where I want ot place the file. The script to copy a file looks like that: copy($userfile, $dir.$userfile_name)

[PHP] php - mail() and sendmails clientmqueue directory

2002-02-23 Thread Luke Vogel
I'm setting up a contact page on a site. Typically I use form inputs to assemble the data and then use the mail() function to send the data to the appropriate user. Whenever I submit the form data, I immediately see a system error reporting that sendmail (version 8.12.1) cant chdir to /var/spool

[PHP] PHP 5?

2002-02-23 Thread Weston Houghton
Are there rumblings of what to look for in the next major release of PHP yet? Is there a different, better place to ask? I'm just curious... Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] encryption and HTTP

2002-02-23 Thread Johnson, Kirk
The PHPLIB auth class has some code to do this. You might want to look there for ideas. If I recall correctly, they sent a hidden random string along with the form that was different on each request. They then did an md5 hash of the post data concatenated with the random string. Kirk > -Orig

[PHP] Unknown column when column does exist.

2002-02-23 Thread [EMAIL PROTECTED]
I've just created a "add record to table" type of page - basically copied a working php file I have on hand, and changed the values etc. Now, I am having problems trying to troubleshoot something. Basically my mySQL query is: INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE, DATE, REG_DAT

[PHP] REDIRECT_QUERY_STRING weirdness ... redirecting from one file to another

2002-02-23 Thread Erica Douglass
Hi, I would like any file under the root of a certain domain name to redirect to a PHP template file. For instance, I would like a request for /services/ to redirect to http://myhost/index.php?path=/services/ . This is similar to what PHP.Net does with their function lookup shortcut (where you c

Re: [PHP] adding 'vote' mechanism

2002-02-23 Thread Steven Walker
I personally prefer voting mechanisms that display how many votes have been cast. If you keep the thumbs_up separate from thumbs_down, you can figure the total number of votes. Otherwise, you will not be able to know whether the author is *really* average or just never voted for. Steven J. Wal

Re: [PHP] Redirecting with PHP if JS is disabled?

2002-02-23 Thread Bogdan Stancescu
Why don't you do it the other way round: redirect if JS *is* available? Bogdan Andy wrote: >Hi there, > >I am wondering if it is anyhow possible to check if the client has activated >JavaScript and in case he has not to redirect him to another page? > >The thing is, as soon as the noscipt tap d

Re: [PHP] Not Quite: how to build an array

2002-02-23 Thread jtjohnston
I'm splitting mysql entries to build an array of author names called $authors. > As someone already suggested, you could use: > array_push($authors, explode(";", $mydata->AS)); http://ccl.flsh.usherb.ca/db/authors_under_study.php It works, but still gets "First argument to array_push() needs t

Re: [PHP] adding 'vote' mechanism

2002-02-23 Thread Erik Price
On Saturday, February 23, 2002, at 02:42 PM, Nick Wilson wrote: > I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it. > The (simplified) table looks like this: > > id | authId | title | tip > > > The only way I've come up with so far is to add two more fields > (thumbs_up and

[PHP] Redirecting with PHP if JS is disabled?

2002-02-23 Thread Andy
Hi there, I am wondering if it is anyhow possible to check if the client has activated JavaScript and in case he has not to redirect him to another page? The thing is, as soon as the noscipt tap detects it, php is already parsed and withouth JS I don not see a possibility to redirect him. Does

[PHP] adding 'vote' mechanism

2002-02-23 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have an SQL table that holds 'tips' and is linked to a table containing the authors details. I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it. The (simplified) table looks like this: id | authId | title | tip The o

Re: [PHP] using PHP to access another site - stock quotes ??

2002-02-23 Thread Erik Price
You might be interested in learning more about XML-RPC, which will allow cross-platform language-neutral XML documents to generate events or perform remote procedural calls (RPC). You can use any language that can parse XML documents, which of course includes our beloved PHP. This article foc

[PHP] encryption and HTTP

2002-02-23 Thread Erik Price
Without using SSL or JavaScript, is there any way to make an md5 hash or encrypt a string before sending it out as a POST request? It seems that without encrypting the data before sending it, it can still be intercepted. Once intercepted, it doesn't matter if I use md5() on the $_POST['passwo

[PHP] Re: using PHP to access another site - stock quotes ??

2002-02-23 Thread Jim Winstead
Pax <[EMAIL PROTECTED]> wrote: > I am developing site that needs to have stock quotes retrieved and > placed into the database. Perhaps someone know if there is a site that > would supply me with quotes? - I just do not want to do it manually :-(( http://www.google.com/search?q=php%20stock%20quot

[PHP] using PHP to access another site - stock quotes ??

2002-02-23 Thread Pax
Hi, I am developing site that needs to have stock quotes retrieved and placed into the database. Perhaps someone know if there is a site that would supply me with quotes? - I just do not want to do it manually :-(( I guess I could setup a cron job to run @ midnight and update quotes for selecte

Re: [PHP] Not Quite: how to build an array

2002-02-23 Thread Philip Olson
Let's work on some debugging. By using mysql_error() you'd eventually find out that AS is a reserved word in mysql, see: http://www.mysql.com/doc/R/e/Reserved_words.html That said, here's some example code to play with, untested but should work. if (!$conn = mysql_connect($host, $user, $

Re: [PHP] Not Quite: how to build an array

2002-02-23 Thread Jason Wong
On Saturday 23 February 2002 14:43, jtjohnston wrote: > OK. I use: > > while ($mydata = mysql_fetch_object($news)) > { > $authors = explode(";", $mydata->AS); > } > > Then why "Invalid argument supplied for foreach()" Have you checked that $authors is indeed an array? Try print_r($authors), i

Re: [PHP] Re: php 4.1.1 vs 4.0.6

2002-02-23 Thread Andrey Hristov
In 4.1.x series there are new vars (global scope) $_GET,$_POST,$_COOKIE,$_FILES,$_SESSION not available in 4.0.x versions. For old scripts could be problem that register_globals is off in the 4.1.x tree(for new installations, not upgrades). But this is for good. Regards, Andrey Hristov -- PH

Re: [PHP] Re: php 4.1.1 vs 4.0.6

2002-02-23 Thread Jason Wong
On Sunday 24 February 2002 01:14, John Lim wrote: > Cc Zona <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > In article <[EMAIL PROTECTED]>, > > > > [EMAIL PROTECTED] (Ezra Nugroho) wrote: > > > I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's

[PHP] Re: fork?

2002-02-23 Thread Jim Winstead
Paul Roberts <[EMAIL PROTECTED]> wrote: > how do i do two things at the same time, i'm thinking of the > equivalent of fork in perl you need to enable the pcntl extension, and then you can use pcntl_fork (http://php.net/pcntl_fork). you may also be able to use the 'ticks' mechanism (http://www.ph

[PHP] Re: uploading files | how to avoid submitting twice?

2002-02-23 Thread Jim Winstead
Andy <[EMAIL PROTECTED]> wrote: > Is there a way to redirect imediatelly to a waiting page? I tryed to > redirect, but somehow the server is first uploading the file before > something else happens. unfortunately, no. one thing you can do is use javascript to pop up a small window in your form's

[PHP] phpnuke site down?

2002-02-23 Thread Thalis A. Kalfigopoulos
Anyone have any idea what's wrong with www.phpnuke.org? No response neither yesterday, nor today :-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Associative array key as a variable

2002-02-23 Thread Andrey Hristov
Use global. Read the docs about variable scoping. If you use php >=4.1.0 then use $_POST, $_GET,... they not need to use global. Global scope. "; } show("countries"); show("cities"); ?> Regards, Andrey Hristov - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

[PHP] Associative array key as a variable

2002-02-23 Thread ejfs
Hi. I have the following PHP program executed from an HTML form where I pass the associative array key name as a variable: "; } show("countries"); show("cities"); ?> The result is always 0. The form fields do have name=countries[] and name=cities[] to indicate an array. When I hardcode the coun

[PHP] Novice question

2002-02-23 Thread brendan conroy
Hi, thanks for reading this, Im just going to say it cos i dont want to waste your time. Im looking for a really big favour here(cos I think it may take time to spot this, although it might only take five seconds to spot, but I dunno,the problem area of code is only four lines long), so dont s

[PHP] Re: php 4.1.1 vs 4.0.6

2002-02-23 Thread John Lim
Cc Zona <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Ezra Nugroho) wrote: > > > I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's comming soon). > > I heard that there is some significant diff

php-general Digest 23 Feb 2002 16:42:47 -0000 Issue 1189

2002-02-23 Thread php-general-digest-help
php-general Digest 23 Feb 2002 16:42:47 - Issue 1189 Topics (messages 85925 through 85941): Re: sometimes browser just recieves half the page 85925 by: Gary Re: how to build an array 85926 by: Steven Walker 85928 by: jtjohnston Not Quite: how to build an array

[PHP] uploading files | how to avoid submitting twice?

2002-02-23 Thread Andy
Hi there, I would like to upload files using a form. Unfortunatelly it takes a while till the file is uploaded to the server. During this time the same page with the submit button is viewed. If the user clicks another time on the submit button, I get wrong records and sometimes the same file twi

Re: [PHP] Re: Newbie on Sessions/Pages Management

2002-02-23 Thread Edward van Bilderbeek - Bean IT
every script you use the variable should contain a "session_start()" statement... - Original Message - From: "Michael Kimsal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 23, 2002 5:26 PM Subject: [PHP] Re: Newbie on Sessions/Pages Management > Alexander P. Javie

[PHP] Re: Newbie on Sessions/Pages Management

2002-02-23 Thread Michael Kimsal
Alexander P. Javier wrote: > I'm very new to PHP, as a matter of fact, I never had any experience anything about >web-enabled applications development. I've been more into local Visual Basic and MS >SQL Serve devt. If there's any kind soul out there, please HLP > > The question

[PHP] Re: mysql_db_query and the future?

2002-02-23 Thread Eric Thelin
You can add the database to your query. Such as: SELECT * FROM database.table WHERE stuff=other_stuff; I am not sure what other databases support this notation but I know that MySQL does. Eric On Sat, 23 Feb 2002, Thomas Seifert wrote: > Hi folks, > > just wondering, why the mysql_db_query

[PHP] mysql_db_query and the future?

2002-02-23 Thread Thomas Seifert
Hi folks, just wondering, why the mysql_db_query is being abandoned and called "deprecated" ? With the current implementation of the mysql_connect I have a problem with using 2 databases with the same username/password. PHP will use the same connection and so only use one of the two databases

[PHP] Output buffering behaviour

2002-02-23 Thread hassan
hi, I'm working on content management system entirely written in Object oriented PHP using templates i used output buffering to be able to send header calls in the middle of my classes i have noticed that performance has become "random" meaning that the same script could take from 1 up to 30

[PHP] Unix Authentication

2002-02-23 Thread developer
For one of my php applications I want to check user's UNIX[Linux] account. If his / her username password pair matches with that of /etc/passwd or samba or NIS then only the user will be allowed to access the contents. How to achieve this ? TIA Shekhar ___ V I I

[PHP] Newbie on Sessions/Pages Management

2002-02-23 Thread Alexander P. Javier
I'm very new to PHP, as a matter of fact, I never had any experience anything about web-enabled applications development. I've been more into local Visual Basic and MS SQL Serve devt. If there's any kind soul out there, please HLP The question is: why do the values of my sessi

Re: [PHP] fork?

2002-02-23 Thread Andrey Hristov
Vulcan Logic SRM www.vl-srm.net Every your task is a banana. Regards, Andrey Hristov - Original Message - From: "Paul Roberts" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 23, 2002 1:05 PM Subject: [PHP] fork? how do i do two things at the same time, i'm think

[PHP] fork?

2002-02-23 Thread Paul Roberts
how do i do two things at the same time, i'm thinking of the equivalent of fork in perl Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Subject: [PHP] imagecreate with Windows .exe installer

2002-02-23 Thread Mike Brackenridge
The php_gd.dll is in the extension folder, the error does not show in Apache, it opens with php 4.1.1 running. The error shows on the page in the browser when the page is loaded? I restarted Apache after altering the .ini file? Mike > You need to have that dll installed on your system. Yo