Re: [PHP] MySQL get second row problem

2003-10-02 Thread Petre Agenbag
Either limit your query to return only the second row ( look in mysql manual for the limit caluse), or you will need to move the array counter forward one for the $row_rsLastL = mysql_fetch_assoc($rsLastL) operation.(php manual under array functions) On Thu, 2003-10-02 at 12:10, Joe Harman

Re: [PHP] Accumulated Information in DB??

2003-10-01 Thread Petre Agenbag
As the previous comment states: MySQL is a DB, it's built to store data, so it's pretty good at it, and the limiting factors re usually your hardware/OS. However, just one thought. I am always very protective of my databases. If data is never going to change and no other process will be accessing

Re: [PHP] Returns..

2003-09-19 Thread Petre Agenbag
nl2br() On Fri, 2003-09-19 at 13:27, Chris Mach wrote: I have a simple little script that displays news articles that are stored in mySQL database. However, when the script displays the data, it doesn't recognize the returns/enters. So I have to put brbr when ever I want a new paragraph to

Re: [PHP] navigation question

2003-09-15 Thread Petre Agenbag
The function is correct, BUT, it looks like you are trying to run this script off one server and then attempting to feed the function a directory structure off another server. Your code will work as-is if you run the script off my_domain2, but it won't work if you run it off my_domain asking for

[PHP] reboot pc with PHP

2003-08-28 Thread Petre Agenbag
Hi List I've gone through the list for previous questions and the only one that seems to be a solution is to use sudo, however, I cannot seem to get it right. Just as background: I want to make a small admin utill for an intranet machine, so the security risks don't bother me at all. Instead

RE: [PHP] Nestled 'while's or 'for's or 'foreach's -- I'm lost

2003-08-17 Thread Petre Agenbag
OK, Difficult to see from your pseudo code EXACTLY what it is that you want to do, but I'll take a stab anyway... Firstly, instead of using your elaborate ways of running through the result set and extracting the variables, use something like this: $sql = whatever; $result = mysql_query($sql);

Re: [PHP] What does - mean?

2003-08-14 Thread Petre Agenbag
You should read up on classes and objects in the manual. On Thu, 2003-08-14 at 09:14, James Johnson wrote: Hello, I've searched through Zend and php.net and can't find the answer. In the following code: $this-vendor = $vendor; What does the - mean or do? Thanks, James --

[PHP] Mysql query and PHP loops

2003-07-31 Thread Petre Agenbag
Hi List I've been trying to do something with one MySQL query, but I don't think it is possible, so, I would need to probably do multiple queries, and possibly have queries inside loops, but I am rather weary of that so, I'd like your views/possible solutions to doing the following: Consider

Re: [PHP] Why wouldn't a simple script work on my server thatworks on other servers?

2003-07-30 Thread Petre Agenbag
Look;s like he has short_open_tags = on in php.ini, BUT, as I understand it, this is a supplemental setting, meaning that it does not disable the use of the (proper) ?php tags, it simply ADDS the use of ? to your options. Thus, I don't think it's because of the tags that the script won't run on

RE: [PHP] Bizarre SQl, if issue....

2003-07-29 Thread Petre Agenbag
Hi Mike, List Where is the $place variable coming from that you use in your query's where clause? I hope it is not being POST'ed or GET'ed (sic), cause then you might have the dreaded old register_globals issue. Humour me, echo your sql string in your code and see if it actually has something

[PHP] MySQL query/PHP logic?

2003-07-29 Thread Petre Agenbag
Hi List OK, I've posted this on the MySQL list as well, but it seems a bit quiet there, and arguably it could definately be a PHP rather than mysql question depending on whether it can be done with one query (then it was/is a mysql query), or whether it should be done with some structures and

Re: [PHP] PHP should know my data!

2003-07-25 Thread Petre Agenbag
Quit horsing around fellas, what if the developers take interest in this thread and decide it's a good idea to release PHP6 with cranial electrodes that will detect what I want to do, and instead of me having to code the application, PHP will just spit out the application... That way our bosses

RE: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Petre Agenbag
If you want to use PHP, then you must use the headers() function. BUT, with the header function, you MUST make sure that there will be absolutely NO output to the page before the header() function is called, not even a space... Otherwise, you can simply use a meta refresh... -Original

Re: [PHP] How to execute a bat file on the Apache server

2003-07-22 Thread Petre Agenbag
Well, firstly, you should not have to use the double \\ when using the single quotes, try it without and see if it works... ie, ?php exec('c:\WINNT\system32\cmd.exe /c START c:\test.bat c:\xxx.txt'); ? On Mon, 2003-07-21 at 16:34, Mikael wrote: Hello all, I am trying to execute a bat file,

RE: [PHP] Register Globals

2003-07-21 Thread Petre Agenbag
a simple extract($_POST) or extract($_GET) would also work On Mon, 2003-07-21 at 14:22, stfmoreau wrote: Hi, include this code in your header file : // _GET if (isset($_GET)) while (list($key, $val) = each($_GET)) { eval

Re: [PHP] Protecting files with PHP

2003-07-17 Thread Petre Agenbag
If you place files inside a webfolder, then they are publicly accessible, period. They might not be obvious, ie. you would have to guess that there are files in a specific folder AND know the exact name of the file, but if you do happen to guess correct, then the files are downloadable. There

[PHP] Help with loop inside loop and mysql queries

2003-07-16 Thread Petre Agenbag
Hi List. I cannot see my error: I have relation tables setup. main id entity_name main_type etc etc date_in 1 testtype1 x y 2003-06-02 2 test2 type2 xx yy 2003-03-11 3 test3 type1

Re: [PHP] Help with loop inside loop and mysql queries - SOLVED

2003-07-16 Thread Petre Agenbag
Grr Needed to reset the $XXX and $YYY vars BEFORE the for loop... Anyway, should you have nothing better to do, plz look through and see if there is a better way to do this with possibly less queries made on the db... Ta On Wed, 2003-07-16 at 09:25, Petre Agenbag wrote: Hi List. I cannot

Re: [PHP] elegant way of doing something else the last timethrough a loop? SOLVED

2003-07-16 Thread Petre Agenbag
Hi Yes, I see your point. Guess I'm way too trusting a person, should think like a criminal... So you're basically saying I should always place sensible default values in my script and then compare the $_POST vars, else stick to the default, ie, have the $_POST overwrite your default before the

[PHP] get size of variable n bytes

2003-07-16 Thread Petre Agenbag
Hi List Sorry, tried to find it in manual... I'd like to query a db and and see how big the result is in bytes. How can I do that? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] get size of variable n bytes

2003-07-16 Thread Petre Agenbag
Yes, well, that complicates things. You see, I'm trying to determine the size that the $_POST variable will be in bytes, because there is a byte limit in the php.ini file for POST variable size, so I was hoping for something easy like bytes_size($_POST)... Would also be handy to calculate how

[PHP] really no way to get byte size of variable?

2003-07-16 Thread Petre Agenbag
Hi List Just want to make sure: Is there no way for me to easily determine the byte size occupied by a variable (regardless of type)? It might be trivial, or I'm missing the point (as per usual)... I would like to find the actual byte size that is transmitted when say a $_POST variable is sent,

RE: [PHP] elegant way of doing something else the last time through a loop? SOLVED

2003-07-15 Thread Petre Agenbag
Well, it should never be, it comes from a drop down that only has 3 options, any, all or exact Any caveats there? -Original Message- From: David Otton [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 2:58 PM To: Petre Agenbag Subject: Re: [PHP] elegant way of doing something else

[PHP] elegant way of doing something else the last time through a loop?

2003-07-14 Thread Petre Agenbag
HI list Is there an elegant way to know when the last time through the loop is going to be and to do something else? I want to search through a table by exploding the search string and then compounding my own sql string by working through the array. From my example below, you can see I use a

Re: [PHP] elegant way of doing something else the last timethrough a loop?

2003-07-14 Thread Petre Agenbag
Sheer genius my man! Thanks! On Mon, 2003-07-14 at 13:38, Tom Rogers wrote: Hi, Monday, July 14, 2003, 9:11:11 PM, you wrote: PA HI list PA Is there an elegant way to know when the last time through the loop is PA going to be and to do something else? PA I want to search through a

Re: [PHP] elegant way of doing something else the last timethrough a loop? SOLVED

2003-07-14 Thread Petre Agenbag
Following works nicely for me now, thanks all! ?php include (main_class.php); $db = new my_db_class; $db -connect(localhost,user,password,table); $table_name = main; if ($_POST[any_all] == any) { $logic = or; } elseif ($_POST[any_all] == all) { $logic = and; } elseif

RE: [PHP] XML

2003-07-09 Thread Petre Agenbag
not use it with databases unless it is large amounts of data. However, i have used xml for creating sql queries and setting up configureation files which are extremely reliabe. -- BigDog On Tue, 2003-07-08 at 15:51, Jeff Harris wrote: |-Original Message- |From: Petre Agenbag

[PHP] XML

2003-07-08 Thread Petre Agenbag
Hi List Firstly, this question is arguable more about XML than PHP, but they are interlinked, so I hope it is topical for this list. Firstly, Where I come from: I am VERY comfortable with PHP/MySQL on Linux and understand all those concepts. Now I'm trying to see the benefits of XML, and quite

[PHP] Form 2 PDF 2 Form

2003-07-01 Thread Petre Agenbag
Hi List OK, firstly, sorry if this has been on the list before... What I'd like to do is something like this: I currently have an app that takes user input via a normal html form, and then pops the content into mysql. The problem is that lots of user complain that the submit times out due to

Re: [PHP] Re: Form 2 PDF 2 Form

2003-07-01 Thread Petre Agenbag
form on different pages instead of a single form on one single page. if this cant be done, we'll think of other measures. but this is by far the most simple method -shiva Petre Agenbag [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List OK, firstly, sorry if this has been

Re: [PHP] Re: Form 2 PDF 2 Form

2003-07-01 Thread Petre Agenbag
Well, I'm still a bit concerned about what would happen if the connection got broken while they are busy... The session will time-out (by most defaults, after 1440s), so if they cannot re-connect, and somehow get the same SESSID, then all would be lost that they have done so far..., and that is

Re: [PHP] Re: Form 2 PDF 2 Form

2003-07-01 Thread Petre Agenbag
Hi Kristin Yes, of course that is a possibility, and it would surely address the problem of resuming at a later stage. I'm just rather worried at managing these broken submissions. They might start one, then for some reason don't finish, and forget about it altogether... But, I think my biggest

Re: [PHP] Forms

2003-06-30 Thread Petre Agenbag
Have you checked register_globals = on/off in your php.ini? If register_globals=off, then you must access your POST variables by: $_POST['whatever']; and your get (the stuff you put at the end of your URL's): $_GET['whatever']; On Mon, 2003-06-30 at 15:48, Simon Chappell wrote: Hi can anyone

RE: [PHP] Forms

2003-06-30 Thread Petre Agenbag
, 2003 6:22 PM To: Petre Agenbag Subject: Re: [PHP] Forms thanks for the reply yes I have tried both on and off, it is currently off? Where would i put those in my script? or do I have to start from scratch? The reason I am asking, is that all the books I have seem to be doing the same out of date

RE: [PHP] quotes

2003-06-25 Thread Petre Agenbag
What you also need is to htmlspecialchars() the vars that you echo as form element values, else your HTML will be broken if one of the vars contains . This should work for both text fields and textareas input type=text value=?=htmlspecialchars($var)? or

[PHP] sending headers

2003-06-23 Thread Petre Agenbag
Hi List I am having trouble using headers. I try to include a redirect header in my script, but is fails with the familiar ( headers already sent) error. I KNOW you should put the headers call where it will cause the first output, and I do that, the only thing happening infront of the headers

[PHP] Problems with quotes in URL

2003-06-18 Thread Petre Agenbag
Hi List I don't know what I'm doing wrong: Firstly, I upgraded from 4.0.1 to 4.3.1 and made sure that I have similar settings in php.ini wrt register_globals and magic_quotes. I now have problems with some of my apps: For instance: IN a mysql db, I would have a name like :[ whatever

Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Petre Agenbag
OK, this is the URL that my code produces after it get's the my_var from the mysql table. my_var in the table is = whatever whatever whatever whatever So I do a select and I do a $my_var = $myrow['my_var'] (after all the proper mumbo jumbo about the $myrow = mysql_fetc_assoc...etc.) I then do a

Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread Petre Agenbag
Hi lists ( and all the guys trying to help me) Firstly SORRY, I oversimplified my examples that I posted in the hope that I would get to the solution faster. What i failed to mention in my stupidity, was that I echoed the variable as the value of a form input text field, so I actually messed up

[PHP] magic_quotes_gpc - 4.0.1 to 4.3.1

2003-06-17 Thread Petre Agenbag
Hi List Is there a difference in the way PHP handles the magic_quotes_gpc between these versions? I had 4.0.1 running on my server for a little over a year and all went well, ie, data that contained quotes etc were discreetly handles by PHP and inserted into MySQL with no problems ( when you

[PHP] dealiong with quote's in SQL strings

2003-06-13 Thread Petre Agenbag
Hi List I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with quotes in mysql inserts. However, I think I have run into a problem that might be related, and was wondering if there is an easy way to fix it: I have a script that gets user input from a drop-down, on the action

Re: [PHP] dealiong with quote's in SQL strings

2003-06-13 Thread Petre Agenbag
- From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 2:43 PM Subject: [PHP] dealiong with quote's in SQL strings Hi List I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with quotes in mysql inserts. However, I think I have run

Re: [PHP] dealiong with quote's in SQL strings

2003-06-13 Thread Petre Agenbag
Thanks, it was there right infront of me... Just as a matter of interest, are there security/performance issues with this setting as well as the magic_quotes_gpc or other oddities that it could cause? On Fri, 2003-06-13 at 15:54, CPT John W. Holmes wrote: I recently installed 4.3.1 and enabled

[PHP] How do I display new lines in a textearea?

2003-06-06 Thread Petre Agenbag
Hi I want to have a textarea that contains details read from a mysql table, but I want to echo each row so that it is on a new line. What is the new-line character for a textarea? ( in effect the reverse of nl2br() ) Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] How do I display new lines in a textearea?

2003-06-06 Thread Petre Agenbag
Hi Thanks, I DID use \n, BUT, I made a stupid mistake, I did: textarea ?php echo $word.'\n'; ? /textarea And the literal ' did not parse the \n, replacing with works fine... On Thu, 2003-06-05 at 16:32, CPT John W. Holmes wrote: I want to have a textarea that contains details read from a

[PHP] GEnerating PDF's

2003-06-02 Thread Petre Agenbag
Hi List I'm investigating different possibilities to generate printable and read-only documents, and the best method seems to be generating PDF's, however, I have NO experience with working with PDF's, and the examples in the manual only list a simple one-liner text pdf. Where can I find more

Re: [PHP] Variables don't pass... *sniff*

2003-05-28 Thread Petre Agenbag
RegisterGlobals = Off You need to access these variables by $_POST[aVariable] or in your case ( adding the variables to the end of a URL means you are using the GET method: $_GET[aVAriable] etc. On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: Hi all! I'm using Apache 2.0.45, PHP

Re: [PHP] Variables don't pass... *sniff*

2003-05-28 Thread Petre Agenbag
to, but just to know) Again, thank you! =) Daniel - Original Message - From: Petre Agenbag To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 11:40 AM Subject: Re: [PHP] Variables don't pass... *sniff* RegisterGlobals = Off You need to access

Re: [PHP] Variables don't pass... *sniff*

2003-05-28 Thread Petre Agenbag
- From: Petre Agenbag To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 11:40 AM Subject: Re: [PHP] Variables don't pass... *sniff* RegisterGlobals = Off You need to access these variables by $_POST[aVariable] or in your case ( adding the variables to the end

Re: [PHP] Variables don't pass... *sniff*

2003-05-28 Thread Petre Agenbag
Maybe they could include a quick overview of the latest changes as well as a link to the on-line manual in your sign-up message when joining the list? On Wed, 2003-05-28 at 11:46, Chris Hayes wrote: Could someone with power over php.net please try to make this change in variable handling very

Re: [PHP] newbie help, pressing the submit button returns nothing

2003-04-04 Thread Petre Agenbag
Your problem is not with PHP but with basic HTML. Your FORM tag needs an action=www.somepage.com in order to do something. With PHP, you can call the same page back onto itself. On Fri, 2003-04-04 at 14:37, David McGlone wrote: Hi all, I have a real quick question. I'm trying to learn PHP and

Re: [PHP] Strange Issues

2003-04-01 Thread Petre Agenbag
Hi Nicole First of all you need to tell us where and for which service these users are trying to log in, ie. are they logging in to receive mail, access secure website section etc? And what is the authentication method/dependencies? I think if you can answer these questions, we will know better to

Re: [PHP] PHP Books

2003-03-12 Thread Petre Agenbag
Hi Chris The first book, Teach Yourself PHP and MySQL in 24 Hrs: I got that one myself, but it tends to gather dust nowadays... It was very useful in the beginning with learning the basix syntax etc, but I quickly outgrew it, and rarely use it at all, not even for reference. I got the book

Re: [PHP] session

2003-03-11 Thread Petre Agenbag
Well, I guess it's all about the type of application you're writing and the kind of resources you have at your disposal... Making garbage collection 100% will basically cause the system to go through the steps of determining what should be disposed and what not, and that would be determined by the

Re: [PHP] session

2003-03-10 Thread Petre Agenbag
Garbage collection is a random process. You can however set the probability of it starting on every session call in the php.ini file, along with the elapsed time of a session variable, after which it is considered garbage. On my system, my probability is set to 1, meaning there is a 1% chance of

Re: [PHP] Form input security

2003-03-09 Thread Petre Agenbag
It all depends on what you will do with the data... The use will dictate the level of cleaning up. You MUST clean it up for DB entries as you mentioned, but if you are only going to e-mail the contents as-is to yourself etc, then cleaning up the data becomes of lesser importance. On Sun,

Re: [PHP] [mysq] help with displaying table {off Subject}

2003-03-03 Thread Petre Agenbag
I presume you are talking about phpMyAdmin here. The Browse link only works when there are entries in the tables, ie., it won't work on empty table. You must first insert data into the tables, and for that you uise the INSERT link. You can change the tables by using the PROPERTIES link. On Tue,

[PHP] reminder mail when date is within a month of today.

2003-02-25 Thread Petre Agenbag
HI I'm having a bad thinking day. I know it's going to be a very easy solution, but please humour me. I have a mysql table with a bunch of subscribers and the date that they subscribed. I want to query the table to find all the subscribers who will come up for renewal within the current month. So,

[PHP] reminder mail cont.

2003-02-25 Thread Petre Agenbag
Sorry, forgot to mention, the subscription is annual, so the subscription date I have for the subscriber is lets say 2002-02-28 , so I want to capture that he will need to renew by 2003-02-28 as well as all people past today's date... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] reminder mail when date is within a month of today.

2003-02-25 Thread Petre Agenbag
... - Original Message - From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:07 AM Subject: [PHP] reminder mail when date is within a month of today. HI I'm having a bad thinking day. I know it's going to be a very easy solution, but please humour me

[PHP] script to check if server is up

2003-02-18 Thread Petre Agenbag
Hi I have two servers on two different networks. I would like to implement some sort of a watchdog application between the two to inform me should either of the machines go down or has a connection problem. I was thinking along the line of using a PHP script running from cron on an hourly basis to

[PHP] ftp file to client machine

2003-02-13 Thread Petre Agenbag
HI I am trying to do the following: I have an ftp server configured, but instead of the user having to use an ftp client, I'd like them to use the browser: So I'm trying to make a mini web-based ftp client. Idea is to get their username and password ( and maybe the ftp address as well?) and to

[PHP] encrypt passwords on URL

2003-02-13 Thread Petre Agenbag
HI This is a sort-of continuation on my previous question regarding being able to puch a file to a client machine using PHP. I have created a login page that connects to the ftp server and then lists the contents of the folder. My original hope was that I could somehow have the user just click on

Re: [PHP] Echo # problem

2003-02-12 Thread Petre Agenbag
Two ways: a) echo blabla # $blabla; or b) echo 'blabla # '.$blabla; The # character must just be inside the echo's quotes. On Wed, 2003-02-12 at 13:36, Paul McQ wrote: I am writing an application in which I need to redirect to an url using the Header function. This redirection must

[PHP] best way to save form data on user side

2003-01-28 Thread Petre Agenbag
Hi I have a rather annoying problem regarding forms. I have built an app that allows the users to fill in a rather large form (much like a claim form) and then have the data pumped into a mysql db. The problem is: the users want to be able to save their forms on their systems as a) backup/proof

RE: [PHP] best way to save form data on user side

2003-01-28 Thread Petre Agenbag
in Excel and then figure out a way to import that into your database using a webapp c) client side app :( -Original Message- From: Petre Agenbag [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 2:35 PM To: [EMAIL PROTECTED] Subject: [PHP] best way to save form data on user

Re: [PHP] best way to save form data on user side

2003-01-28 Thread Petre Agenbag
Hi Chris On Tue, 2003-01-28 at 22:09, Chris Shiflett wrote: --- Petre Agenbag [EMAIL PROTECTED] wrote: I have a rather annoying problem regarding forms. I have built an app that allows the users to fill in a rather large form (much like a claim form) and then have the data pumped

Re: [PHP] Mail Function Parameters

2003-01-23 Thread Petre Agenbag
You have to use sendmail with the -f flag. I have written a small test util to do this: ?php $address = recipient@address; $message = Subject: Test\n; $message.= \n message; $result = `echo -e $message | /usr/sbin/sendmail -f your@address $address`; $result.= `$message`; echo $result; ? On

RE: [PHP] PHP sendmail configuration

2003-01-07 Thread Petre Agenbag
The problem you are having took me a while to grasp. Basically, what happens is that sendmail sends the mail as the user php/apache was installed as (usually nobody@ or apache@ yourdomain.com). Setting the Return-Path does not work, as you cannot override the Return-Path set by the server in this

RE: [PHP] Dreaded Return-Path and mail()

2003-01-07 Thread Petre Agenbag
Almost exactly the same question as the message with subject: Sendmail configuration The problem you are having took me a while to grasp. Basically, what happens is that sendmail sends the mail as the user php/apache was installed as (usually nobody@ or apache@ yourdomain.com). Setting the

Re: [PHP] No Idea - Comparing Lines

2003-01-06 Thread Petre Agenbag
When you read the first line, split the data into it's components , then assign each value to a variable. Call them: $octet_1,$unix_time_1 etc. Now, start the loop. Inside the loop, read the next line, assign to $octet_2, $unix_time_2 etc. Do your calculations ( $answer = $octet_2 - $octet_1 etc.

[PHP] communicate with cyrus imap

2002-11-19 Thread Petre Agenbag
Hi I wonder if someone can give me some pointers on this. I have cyrus/sendmail running on a RH server, and it works great. I use ximian evolution as my mail client and other users also has no problem with OE or MO. I've been looking at various web based mail clients to implement on my server

Re: [PHP] Syntax Help

2002-11-14 Thread Petre Agenbag
What do you mean by dont post proper data? Have you added slashes to the variables? (use addslashes() and then stripslashes() when reading the contents from the db) On Thu, 2002-11-14 at 11:22, conbud wrote: Whats wrong here ?? The variables are getting the correct information from the form but

Re: [PHP] How to echo the end marker '?'

2002-11-08 Thread Petre Agenbag
I'm just curious. Why do you want to echo within an echo? echo 'form action='.$PHP_SELF.''; will do the trick won't it? Unless I miss the point, I cannot see why you need to open new php tags for this? On Fri, 2002-11-08 at 14:25, Ernest E Vogelsinger wrote: At 12:15 08.11.2002, Philipp

Re: [PHP] Fw: [PHP-DEV] When my PHP file opens, I want it toautomatically submit

2002-11-05 Thread Petre Agenbag
Are you just interested in getting the IP address of the visitor? IF so, this info is already added to the website's apache log, so you actually only need to go look through the log, or, if you want to make it a bit more surgical, you can write the 'REMOTE_ADDR' variable straight into a mysql

[PHP] creating and ftp text file

2002-11-05 Thread Petre Agenbag
HI I need to create a text file that is in a specific format from a mysql query, and then ftp that file to another server. The format will be something like this: Cellphone: xx Cellphone: xx Cellphone: xx Cellphone: xx Cellphone: xx Cellphone: xx

Re: [PHP] Re: creating and ftp text file

2002-11-05 Thread Petre Agenbag
Erwin Thanks a million. That's actually much simpler than I thought it would be... I'm gonna give it a go just now, but I'm sure it will work! Thanks again! On Tue, 2002-11-05 at 17:09, Erwin wrote: I am pretty up to standard with getting stuff into and out of mysql, so I am basically just

Re: [PHP] Re: creating and ftp text file

2002-11-05 Thread Petre Agenbag
Hi Erwin OK, my first problem: your code genrates errors, it says fwrite and fclose are invalid file descriptors. I gathered thatit is possibly because thos are for normal files, so I looked in the manual and found the FTP-functions, but it takes a $local_file variable, and that must be the

Re: [PHP] Simple Problems taking me hours to solve!

2002-11-01 Thread Petre Agenbag
No, it should not return what you want. When you do $orderid = mysql_query($query); all this does is actually execute the query, and returns an array containing the actual result set. What you need to do from here is to do: $myrow = mysql_fetch_assoc($orderid); Now, what you have is an

Re: [PHP] client-side zip of POST or GET data, auto unzip on server.

2002-11-01 Thread Petre Agenbag
this on client side as well, I just don't know how... Something like a zip-wrapper for form data, or any data for that matter... Hope someone else can shed some ideas??? On Fri, 2002-11-01 at 10:56, @ Edwin wrote: Hello, Petre Agenbag [EMAIL PROTECTED] wrote: Hi I'm wondering if something like

RE: [PHP] Simple Problems taking me hours to solve!

2002-11-01 Thread Petre Agenbag
confused! Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -Original Message- From: Petre Agenbag [mailto:internet;vsa.co.za] Sent: 1. marraskuuta 2002 10:23 To: [EMAIL PROTECTED

Re: [PHP] Serverside script

2002-11-01 Thread Petre Agenbag
Are you familiar with PHP, or are you more worried about how to call and execute the script from the server itself on a weekly basis ( cron job) ? On Fri, 2002-11-01 at 14:41, Davíð Örn Jóhannsson wrote: I need to write a stand alone script runing on a server that checks and updates a database

[PHP] client-side zip of POST or GET data, auto unzip on server.

2002-10-31 Thread Petre Agenbag
Hi I'm wondering if something like this will be possible. I am correct in thinking that POST and GET data are sent as plain text? And, that being plain text, they should probably be highly compactable by zip utils? The reason I'm thinking this route is that I have a couple of forms for some

[PHP] back and forward through a result query

2002-10-29 Thread Petre Agenbag
Hi I need to do the following, and have a slight idea of how to do it, but I'm not sure... I want to do a select id from table where something = whatever , then I will display all the hits from that query as links to a display page, sending along the id's of the row. On that next page, I will

Re: [PHP] back and forward through a result query

2002-10-29 Thread Petre Agenbag
PS, also, I would need to know and handle the beginning and end of that array, ie, if there isn't a next or previous, I wouldn't want to display a next or forward button, or maybe disable it... Thanks On Tue, 2002-10-29 at 14:06, Petre Agenbag wrote: Hi I need to do the following, and have

[PHP] POST-ing or GET-ing an array

2002-10-29 Thread Petre Agenbag
Hi I KNOW I'm gonna get flamed, but I can't find this anywhere in my books or in the manual, yet I know I've read it somewhere. I created an array in a loop as such: $sql = select stuff from my_table; $result = mysql_query($sql); $count = 0; while ($myrow = mysql_fetch_assoc($result)) {

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Petre Agenbag
Oops, I forgot to add the $count++ at the end of the while loop, but that was just an ommission of this post, in my real code, the array is created fine ( tested it with a print_r($my_array) ). On Tue, 2002-10-29 at 19:40, Petre Agenbag wrote: Hi I KNOW I'm gonna get flamed, but I can't find

[PHP] exploding values into new variables

2002-10-28 Thread Petre Agenbag
Hi The manual states: $pizza = piece1 piece2 piece3 piece4 piece5 piece6; $pieces = explode( , $pizza); So, if I want to be able to echo piece1 to the screen at a later stage, I would go: echo $pieces[0]; or $first_piece = $pieces[0]; echo $first_piece; Right? Just want to make sure I

[PHP] how to setup mysql logging from php scripts

2002-10-17 Thread Petre Agenbag
Hi I need to be able to see logs of all mysql queries from php scripts on my server. I have a multitude of virtual hosts on my RedHat server, with many mysql db's, and would like to be able to see what queries are done against the db's from which scripts. The reason being is that I suspect that

Re: [PHP] pretty simple problem in mailing a dynamic page

2002-09-25 Thread Petre Agenbag
You need to add another header telling it the content type = text/html On Wed, 2002-09-25 at 17:04, usha wrote: I just want to email a dynamic page ( So I designed a page consisting of datas pulled from db and are formated with html tags: here in below code $d is such variable to be mailed)

[PHP] dropping mail into queue

2002-09-08 Thread Petre Agenbag
Hi list Is is possible to change the default behaviour of the mail() function to send the message to the queue instead of trying to send it immediately? I did do some research into this a while back, but it never really got to a point where I was completely satisfied with the results. I can

Re: [PHP] finding next and previous db entries

2002-09-05 Thread Petre Agenbag
I think it would probably be better to read all the id's into an array, and then use the array stepping functions to move forward or back. This way, you won't have to worry about empty rows, or id's that are not numerically following on each other. On Thu, 2002-09-05 at 23:20, tux wrote: hey

Re: [PHP] dumping mysql database with php script

2002-09-02 Thread Petre Agenbag
put the exec(...) line OUTSIDE the while loop.As your codeis now, it's dumping with each new row , so i'ts overwriting itself. On Mon, 2002-09-02 at 09:47, [EMAIL PROTECTED] wrote: I am having a problem with a script to dump a mysql database to a text file. When I run the command below it

[PHP] autocomplete list box

2002-08-30 Thread Petre Agenbag
Hi I am wondering if it is possible to write/create/implement an autocomplete type list box, something that will basically work the same as when you have a normal textbox in a form and have autocomplete enabled in the browser, but not quite exactly, I want the textbox and the listbox to be

[PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
an a/b test with a script timer, and get some averages to find out definitively. Enjoy, Justin on 28/08/02 11:16 PM, Petre Agenbag ([EMAIL PROTECTED]) wrote: Justin, Thanks for the reply. I frequently see your comments on threads here, and don't worry, I wouldn't take any

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
at 08:46, Jason Wong wrote: On Thursday 29 August 2002 14:16, Petre Agenbag wrote: Hi Justin OK, a quick feedback on your previous suggestion: I tried to unset the $myrow_it, but it still didn't produce any output. The only way I could get it to work was with the same method you suggested

Re: [PHP] Re: Stepping through an array more than once (offlist)

2002-08-29 Thread Petre Agenbag
Jason Thanks the mysql_data_seek() works. With Justin's help, I used the mysql_data_seek() to reset the $result matrix to 0, and re-issued the same while statement. It now produces the desired output. Thanks. On Thu, 2002-08-29 at 08:46, Jason Wong wrote: On Thursday 29 August 2002 14:16, Petre

[PHP] Stepping through an array more than once

2002-08-28 Thread Petre Agenbag
Hi I would like to do something like the following: I have a table that contains a bunch of info at various stages. To optimize the load on the db, I was thinking it would be better to do a select * from table , and then use PHP to sort through the results, rather than have 3 SQL's with where

Re: [PHP] Stepping through an array more than once

2002-08-28 Thread Petre Agenbag
Actually, it's not accurate for me to say stepping through an array more than once, as I want to step through the database ( $result) more than once, without having to make connections to the db again. Can this be done? On Wed, 2002-08-28 at 13:58, Petre Agenbag wrote: Hi I would like to do

[PHP] 4.04 -- 4.1.2 incompatible

2002-08-20 Thread Petre Agenbag
Hi Can someone please tell me what settings to check for on 4.1.2 in order to ensure that scripts that runs on 4.0.4 will run on 4.1.2? I HAVE checked registered_globals = on, but I still get variables that are not passed on via URL and form submits. The app has a login form that submits to an

  1   2   >