[PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Aidan Lister
http://pear.php.net/package/db "Monty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am trying to use fewer resources and processes when making database > connections in my scripts, so, upon the first call to make a DB connection, > I store the Link Resource ID in a constant vari

[PHP] How to Request?

2004-04-05 Thread Labunski
I'll try to explain.. For example I have a link: "index.php?fd=car" then the Request part looks like this: if(isset($_REQUEST['fd'])){ $dir = ($_REQUEST['fd']); } But for example I have a link "index.php?fd=car&c=green".. How to Request more then one variable if I want to get something like th

[PHP] How to...

2004-04-05 Thread Vicente Werner
I've already a php function that outputs a file from a folder outside the www path to a page, but I can't find a way to do this and then close the window where it was outed. Any 1 can point me in the right direction? Thanks, Vicente -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Regular Expressions

2004-04-05 Thread Matt Palermo
What exactly does this do: /< (?<=p|br) [^>]+ >/x It may work, I just want to understand what it's looking for. Thanks, Matt "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > * Thus wrote Matt Palermo ([EMAIL PROTECTED]): > > I have a page where I am stripping the ht

RE: [PHP] can I get at screen size ?

2004-04-05 Thread Tyler Replogle
hey, yes it would take 2 steps i made a script like this before so i know, i stpent much time looking for it, but php doesn't get info like that because it is running on the server and not the computer or viewer's computer From: E.H.Terwiel <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To:

Re: [PHP] detecting type of field from $_POST ?

2004-04-05 Thread Chris Shiflett
--- adwinwijaya <[EMAIL PROTECTED]> wrote: >i just wonder, is there any way to detecting the type of field >(like textarea, button, radio, etc) from $_REQUEST / $_POST ? Nope. >I need to detect that all .. because I want to put a script that >will remove html tag You should filt

Re: [PHP] PHP 4.3.4, Apache w/ mod_ssl Compile Help

2004-04-05 Thread trlists
On 5 Apr 2004 [EMAIL PROTECTED] wrote: > When doing apachectl startssl I get: > > [Mon Apr 5 12:19:53 2004] [warn] Loaded DSO libexec/libphp4.so > uses plain Apache 1.3 API, this module might crash under EAPI! > (please recompile it with -DEAPI) Sorry, I just realized there is a sep

[PHP] detecting type of field from $_POST ?

2004-04-05 Thread adwinwijaya
Hi .. i just wonder, is there any way to detecting the type of field (like textarea, button, radio, etc) from $_REQUEST / $_POST ? I need to detect that all .. because I want to put a script that will remove html tag (with htmlspecialchars() function) ... and the problem happen whe

[PHP] Re: allowed memory size of

2004-04-05 Thread David Robley
[EMAIL PROTECTED] (Mathias brito) wrote in news:[EMAIL PROTECTED]: > Hello, I made a script that make a backup of the > entire site with the PHPZip lib. It's works well with > small sites, but when the size grow, i receive the > following message: > > Fatal error: Allowed memory size of 1048680

Re: [PHP]

2004-04-05 Thread David Robley
[EMAIL PROTECTED] (Nunners) wrote in news:[EMAIL PROTECTED]: > I've got a series of functions which return a list in an array. How > can I create an empty array? Or do I need to check it's a valid array > before I use it? > > Cheers > James This may be helpful: http://uk.php.net/manual/en/la

Re: [PHP] Problem with script halting

2004-04-05 Thread David Robley
[EMAIL PROTECTED] (Nathan Croker) wrote in news:[EMAIL PROTECTED]: > Thank you for your reply. > > Yes the user has permission to execute chmod since when I access the > server using an FTP Client it works perfectly. > > - Nathan Croker > > (amazing as a result of one post, I get 6 different s

[PHP] PHP has a bug...?

2004-04-05 Thread Stephen Craton
I was making a parabola grapher and I was testing out some values. Part of the script is to take the variable b and multiply it was negative one, then multiply by 2 times a. I entered a test value where a equals 1, b equals 0, and c equals 0. The result told me that -1 times 0 is -0. Here's the

Re: [PHP] cURL upload meter

2004-04-05 Thread Raditha Dissanayake
By upload meter do you mean a progress bar which can tell a user how much of a large upload has been processed thus far? As far as I understand it PHP cannot access raw POST data so this cannot be done with PHP alone. Thanks for the mention pablo. megaupload does indeed get a little help from

[PHP] assigning NULL to a variable

2004-04-05 Thread Andy B
how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value... the form im working on has a date field called "date" on the form itself. that "date" will get turned into $_SESSION[add][date] on the next page... i want it so if the person filling out the

[PHP] [solved][PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Andy B
> $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} "; > > oh, and unless add & name are actually constants you should always wrap > them in single quotes. (php will covert the non-exstent constant into a > string a issue an E_NOTICE + its overhead) well that got me on the right track..

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Jochem Maas
user curly braces around your arrays in the string e.g: $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} "; oh, and unless add & name are actually constants you should always wrap them in single quotes. (php will covert the non-exstent constant into a string a issue an E_NOTICE + its

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Jochem Maas
always do serverside - that the only secure option - use clientside (in addition) as a favour to the user to avoid repeated page requested to fill the form in correctly. (or in order to rearrange data before submitting to server) Matthew Oatham wrote: Yes I agree I need some validation, dunno w

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Richard Harb
Tuesday, April 6, 2004, 1:21:52 AM, you wrote: > hi... > i cant cut and paste my exact mysql query because it takes the '' > stuff out doubles the $'s and the ,'s in the whole thing (dont know > why but anyways...)... > i have a query that goes something like this: > mysql_query("insert into $Gue

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Jochem Maas
Matthew Oatham wrote: Hi, only use double quotes (") if you want to have variables interpolated e.g. $myVal = 'its amazing'; $x = "wow $myVal"; think out about the way you layout your code - it helps when you come back to it 12 months later ;-) sanitize all incoming variables (POST/GET/COOKIE) by

Re: [PHP] includes

2004-04-05 Thread Richard Harb
Monday, April 5, 2004, 4:47:52 PM, you wrote: > Hello all, > I have a problem. My directory list is similar to this: >>root > >tmpl > >inc > >forums > My question is in the test_form and message forums. How do I do the include > files to read from the tmpl and inc?? > I can get t

[PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Andy B
hi... i cant cut and paste my exact mysql query because it takes the '' stuff out doubles the $'s and the ,'s in the whole thing (dont know why but anyways...)... i have a query that goes something like this: mysql_query("insert into $GuestbookTable values(NULL, '$_SESSION[add][date]', '$_SESSIO

Re: [PHP] Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Richard Harb
Monday, April 5, 2004, 11:23:29 PM, you wrote: > I am trying to use fewer resources and processes when making database > connections in my scripts, so, upon the first call to make a DB connection, > I store the Link Resource ID in a constant variable that can be accessed by > all other functions t

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Curt Zirzow
* Thus wrote Matthew Oatham ([EMAIL PROTECTED]): > Hi, > > I am a newbie PHP programmer, I have some code that works but I want some tips on > how I an Improve my code, i.e. should I be doing my updates / deletes on same php > page as the display page, am I using transactions correctly, am I cap

Re: [PHP] Re: session_exist() ?? Can this be done?

2004-04-05 Thread Jochem Maas
for those who haven't yet read it: Monty wrote: Hi Red... Actually, I have my site set to only use cookies for storing session ids to make it more secure and so that session ids aren't passed via why is this more secure? the cookies go over the same wire as the post/get. with regard to security h

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Jordan S. Jones
If it were me I would do both Client and Server side validation. The majority of the time the client side will suffice, but, simply put, because you don't/may not look at the HTML source of a web page, doesn't mean that nobody else does. The fact of the matter is, you should not trust any data

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Gabriel Guzman
On Monday 05 April 2004 04:00 pm, Matthew Oatham wrote: > I don't think the fleet_id example will be a problem > though as this is retrieved from the database where the field is an int. google for "SQL injection" and you will see why what you currently have may cause you some problems. -- PHP

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Gabriel Guzman
On Monday 05 April 2004 04:00 pm, Matthew Oatham wrote: > Yes I agree I need some validation, dunno whether to do server or client > side validation. *both* :) you should always do server side validation on any data, especially if you are going to be putting it into your database. Client si

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Matthew Oatham
Yes I agree I need some validation, dunno whether to do server or client side validation. I don't think the fleet_id example will be a problem though as this is retrieved from the database where the field is an int. Thanks for your feedback Matt - Original Message - From: "Jordan S. Jone

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Jordan S. Jones
Wells first of all, you are going to want better form input validation. For Example: foreach ($_POST['fleet_id'] as $key => $value) { $fleetCode = $_POST['fleet_code'][$key]; $historyUrl = $_POST['history_url'][$key]; $downloadUrl = $_POST['download_url'][$key]; mysql_query("UPDATE imp_

[PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Justin Patrin
Monty wrote: A define is pretty much for strings only, not objects or resources. Try using $GLOBALS['_CONNECT_DB'] instead. I tried this, but, same results. If I store the Resource ID from a mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call... mysql_query($query, $GLOBALS['_CONNECT_D

Re: [PHP] Code Review PLEASE !!!

2004-04-05 Thread Daniel Clark
> I am a newbie PHP programmer, I have some code that works but I want some > tips on how I an Improve my code, i.e. should I be doing my updates / > include ("../db.php"); Some things I do is use single quotes include '../db.php' ; (they are slightly faster, no replacments looking fo

[PHP] Code Review PLEASE !!!

2004-04-05 Thread Matthew Oatham
Hi, I am a newbie PHP programmer, I have some code that works but I want some tips on how I an Improve my code, i.e. should I be doing my updates / deletes on same php page as the display page, am I using transactions correctly, am I capturing SQL errors correctly am I handling form data as eff

[PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Monty
> A define is pretty much for strings only, not objects or resources. Try > using $GLOBALS['_CONNECT_DB'] instead. I tried this, but, same results. If I store the Resource ID from a mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call... mysql_query($query, $GLOBALS['_CONNECT_DB']); PHP

Re: [PHP] Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Monty
It appears you can't pass constant vars by reference, or am I missing your point? I understand passing vars by reference, but not sure where you suggest I need to use it. I tried "define('_CONNECT_DB', &$result);" and "return &_CONNECT_DB;" separately, but neither worked. > [snip] > function conne

[PHP] Re: Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Justin Patrin
Monty wrote: I am trying to use fewer resources and processes when making database connections in my scripts, so, upon the first call to make a DB connection, I store the Link Resource ID in a constant variable that can be accessed by all other functions that need a DB connection, like this...

Re: [PHP] Re: session_exist() ?? Can this be done?

2004-04-05 Thread Monty
Hi Red... Actually, I have my site set to only use cookies for storing session ids to make it more secure and so that session ids aren't passed via the URL. Only problem with checking for existence of a session using your method is that you have to first start the session, which is what I'm trying

Re: [PHP] Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Matt Matijevich
[snip] function connect_db() { if (!defined('_CONNECT_DB')) { $result = @mysql_pconnect("localhost", "Username", "Password"); @mysql_select_db("database_name"); define('_CONNECT_DB', $result); } return _CONNECT_DB; I call this function this way...

Re: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread DvDmanDT
Maybe the post_max_size is also exceeded, and therefore it's handled with sense I think.. Otherwise I'm not sure I think this is handled the right way, if it's only upload_max_filesize that's exceeded. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "John W. Holmes" <[EMAIL PROT

[PHP] Reusing MySQL Connections - Can it be done?

2004-04-05 Thread Monty
I am trying to use fewer resources and processes when making database connections in my scripts, so, upon the first call to make a DB connection, I store the Link Resource ID in a constant variable that can be accessed by all other functions that need a DB connection, like this... function con

Re: [PHP] Re: session_exist() ?? Can this be done?

2004-04-05 Thread Red Wingate
Again, as a sidenote, this is the first example of the PHP session documentation: [ quote - http://de.php.net/session ] [ /quote ] When using exactly this script you could check wether $_SESSION['count'] equals 0 to make sure the session was just created. -- red again :-) Red Wingate wrote:

Re: [PHP] Re: session_exist() ?? Can this be done?

2004-04-05 Thread Red Wingate
Hi, just on a side-note, the session is not always kept in a cookie ( if cookies are deactivated the session is saved in the _GET or _POST variables. A check for $_REQUEST[session_name()] might help you some more but can be exploited quite fast eg: index.php?SID=foo I guess the best way to so

Re: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread John W. Holmes
From: "Jay Blanchard" <[EMAIL PROTECTED]> > > [snip] > > I have a form in a page 1, that POSTs a file and some hidden's to page > > 2. If > > the file size is bigger that the max in php.ini, in page 2, $_POST is > > empty. > > [/snip] > > Why, of course it is! The php.ini sets the max file size $_

[PHP] Re: session_exist() ?? Can this be done?

2004-04-05 Thread Monty
Thanks, Aaron, I tried this method and it appears to work just fine. Here's a simplified version of what I'm doing: if (isset($_COOKIE[session_name()])) { session_start(); if ($_SESSION['loggedin'] <> 'yea_baby'; session_destroy(); $_SESSION = array(); // Ret

RE: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread Jay Blanchard
[snip] I have a form in a page 1, that POSTs a file and some hidden's to page 2. If the file size is bigger that the max in php.ini, in page 2, $_POST is empty. [/snip] Why, of course it is! The php.ini sets the max file size $_POST will be empty because it would not be allowed to load. You ha

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Ben Ramsey
Just don't use register globals and use "if ($_POST)" instead of "if($action=='post')" so you don't have to include that ?action=post in the query string of your action. Dvdmandt wrote: Accutually, I intented ?action=post, and if($action=='post'), just forgot to add method="post".. :p -- Regards

[PHP] Bug with multipart/form-data ?

2004-04-05 Thread gayard
Hi. I have a form in a page 1, that POSTs a file and some hidden's to page 2. If the file size is bigger that the max in php.ini, in page 2, $_POST is empty. In the mood for a look ? upload.html: Attach your file here: upload2.php: $_POST is empty... Is

Re: [PHP] Question, what to do when finding an error whilevalidating data

2004-04-05 Thread John W. Holmes
From: "Mike Zornek" <[EMAIL PROTECTED]> > There is a column called Address in my email table, Thus I am creating a PHP > object called Email to interact with it. The Address variable of this object > will hold a string like "[EMAIL PROTECTED]". > > In the setAddress method should I check for a val

Re: [PHP] Question, what to do when finding an error while validating data

2004-04-05 Thread Mike Zornek
Thanks the feedback so far. To expand the scope of my issue past enums (which by their limited nature are easy to check and set defaults) let me ask this... There is a column called Address in my email table, Thus I am creating a PHP object called Email to interact with it. The Address variable of

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Accutually, I intented ?action=post, and if($action=='post'), just forgot to add method="post".. :p -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Blake Schroeder" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > One problem > wrong > > right > > ?action is a

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Daniel Clark
I agree. I believe the default FORM METHOD is GET. > One problem > wrong > > right > > ?action is a variable with a value of post > > -Blake > > > DvDmanDT wrote: > >>Hmm.. Are there any PHP settings that only applies to that vhost? Can you >>please try to run PHP as CGI few tries.. If the inp

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
Is this what your are trying to do? $var = $_POST['var']; if($var) var_dump($_REQUEST); else { ?> DvDmanDT wrote: Hmm.. Are there any PHP settings that only applies to that vhost? Can you please try to r

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
One problem wrong right ?action is a variable with a value of post -Blake DvDmanDT wrote: Hmm.. Are there any PHP settings that only applies to that vhost? Can you please try to run PHP as CGI few tries.. If the input is corrupt, that _could_ be caused by the Apache2 which accutually is marked

[PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Hmm.. Are there any PHP settings that only applies to that vhost? Can you please try to run PHP as CGI few tries.. If the input is corrupt, that _could_ be caused by the Apache2 which accutually is marked as experimental... Basicly, this would get currupt? (wierd-var-test.php) Or are there

[PHP] allowed memory size of

2004-04-05 Thread Mathias Brito
Hello, I made a script that make a backup of the entire site with the PHPZip lib. It's works well with small sites, but when the size grow, i receive the following message: Fatal error: Allowed memory size of 1048680 bytes exhausted at (null):0 (tried to allocate 170685 bytes) in /srv/www/htdocs/z

RE: [PHP] cURL upload meter

2004-04-05 Thread Pablo Gosse
Steve Murphy wrote: > Can cURL be used to create an HTTP or FTP upload meter? > > Steve By upload meter do you mean a progress bar which can tell a user how much of a large upload has been processed thus far? As far as I understand it PHP cannot access raw POST data so this cannot be done with P

Re: [PHP] Sorting array of objects

2004-04-05 Thread Marek Kilimajer
Richard Harb wrote: Hi there, Supposed I have an array of objects, like: $this[$i]->property1 $this[$i]->property2 is there any 'cheap' way to sort the array according to the values of property1? http://www.php.net/usort Example: function cmp($a, $b) { if ($a->property1 == $b->property1) {

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread John W. Holmes
From: "Jason Wong" <[EMAIL PROTECTED]> > On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote: > > Thank you all for your ideas so far, however, I ahve gone through all my > > code, and cannot seem to find the culprit. > > I believe it is a known bug with a particular old version of PHP, try usi

Re: [PHP] Question, what to do when finding an error while validating data

2004-04-05 Thread John W. Holmes
From: "Mike Zornek" <[EMAIL PROTECTED]> > I'm making a conscience effort to improve my PHP skills, that being making > objects, unit testing, better error handling etc. So I have a questions. > > I have a database that is storing all of my records. One column is of type > enum where the two legal

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Jason Wong
On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote: > Thank you all for your ideas so far, however, I ahve gone through all my > code, and cannot seem to find the culprit. I believe it is a known bug with a particular old version of PHP, try using the latest. -- Jason Wong -> Gremlins Assoc

[PHP] cURL upload meter

2004-04-05 Thread Steve Murphy
Can cURL be used to create an HTTP or FTP upload meter? Steve

RE: [PHP] Printer Functions

2004-04-05 Thread jon roig
Do you have the option of printing through Word or something similar? We had the same problem and ended up saving the file to a cache and using COM objects to print to the default printer through Word. The code looks a bit like this... Of course, it expects you to define the $saveFile as the file

Re: [PHP] Question, what to do when finding an error while validating data

2004-04-05 Thread Jason Giangrande
Mike Zornek wrote: Oops, forgot to send my original response to the list last time. On 4/5/04 1:33 PM, "Jason Giangrande" <[EMAIL PROTECTED]> wrote: What I usually do is create a select box that has only the values of the enum. That way no one should be able to (in theory) put any value other th

[PHP] PEAR Sequences

2004-04-05 Thread Jeremy Clifton
Greetings, Has anyone out there transitioned an existing app from using the mysql_* functions in PHP to PEAR DB? I'm re-writing an existing PHP application, and I'm required to utilize PEAR's DB class as the database layer. Currently, the application is using the mysql_* functions to access th

[PHP] PHP Access Violation using PEAR::Mail_smtp

2004-04-05 Thread Ben Ramsey
I'm getting the following error when using the Mail_smtp package from PEAR: PHP has encountered an Access Violation at 0177A8B4 It does not occur everytime I use it, but even when send() returns true, e-mail messages are not being sent. However, it all worked fine a week ago when I was testing

[PHP] Question, what to do when finding an error while validating data

2004-04-05 Thread Mike Zornek
I'm making a conscience effort to improve my PHP skills, that being making objects, unit testing, better error handling etc. So I have a questions. I have a database that is storing all of my records. One column is of type enum where the two legal values currently are "home" and "work"; "work" is

[PHP] PHP 4.3.4, Apache w/ mod_ssl Compile Help

2004-04-05 Thread trlists
Hi Folks ... A small problem here ... I just rebuilt Apache 1.3.29 with mod_ssl. When doing apachectl startssl I get: [Mon Apr 5 12:19:53 2004] [warn] Loaded DSO libexec/libphp4.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) I r

Re: [PHP] includes

2004-04-05 Thread Daniel Clark
I had some similar problems ! Here's what I did. include $_SERVER['DOCUMENT_ROOT'] . '/includes/_myInclude.php' ; Putting the DOCUMENT_ROOT ensured I was always pointing to the top directory of the web pages. Daniel Clark >>I have a problem. My directory list is similar to this: >> >root >>

Re: [PHP] includes

2004-04-05 Thread Chris Hayes
At 16:47 5-4-04, you wrote: Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums >test_forum >messages >test_forum1 .messages My question is in the test_form and message forums. How do I do the include file

RE: [PHP] Re: imagecreatefromjpeg

2004-04-05 Thread Hawkes, Richard
I think you'll want to use the 'imagecopyresized' function. Something like this: $thumbnail = imagecreate(100, 100); $original = imagecreatefromjpeg("uploadedfile.jpg"); imagecopyresized($thumbnail, $original, 0, 0, 0, 0, 100, 100, imagesx($original), imagesy($original)); imagejpeg

RE: [PHP] includes

2004-04-05 Thread Hawkes, Richard
If I think I understand you, your 'root' directory is the 'forums' directory, and you'll probably want to do something like: include($_SERVER["DOCUMENT_ROOT"] . "/../inc/include1.php"); The double-dots take you back a directory. Is that what you're after?! Richard -Original Message-

[PHP] Re: imagecreatefromjpeg

2004-04-05 Thread Todd Cary
Jason - I would like to give users the ability to upload jpeg images and have my php app size them into thumbnails as well as have a larger image available if the thumbnail is clicked. Are there examples of this available? Todd Jason Barnett wrote: From http://www.php.net/manual/en/function

RE: [PHP] includes

2004-04-05 Thread Angelo Zanetti
I think you can do this: "../tmpl/header.htm" try it and let us know!! hope this helps Angelo -Original Message- From: Will [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 4:48 PM To: [EMAIL PROTECTED] Subject: [PHP] includes Hello all, I have a problem. My directory list is si

[PHP] includes

2004-04-05 Thread Will
Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums >test_forum >messages >test_forum1 .messages My question is in the test_form and message forums. How do I do the include files to read from the tmpl and

RE: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread gvarosky
Thank you all for your ideas so far, however, I ahve gone through all my code, and cannot seem to find the culprit. I did a var dump, and also a dump of the REQUEST, GET, and POST variables, and here is an example of what I am seeing (submitting "test"): string(7) "testiU" _REQUEST: Array (

RE: [PHP] can I get at screen size ?

2004-04-05 Thread Hawkes, Richard
Scrap my last effort, this was the one I should have sent! Obviously replacing the web site details and PHP page name, but using the 'width' and 'height' values as you please! Cheerio (again!) Richard -Original Message- From: E.H.Terwiel [mailto:[EMAIL PROTECTED] Sent: 05 April 2004

RE: [PHP] can I get at screen size ?

2004-04-05 Thread Hawkes, Richard
I wrote a JavaScript page that redirects to a PHP page like this: Redirecter function redirectUser() { location.href="http://www.mysite.com/page2.php?width="; + screen.width + "&height=" + screen.height; } The PHP

Re: [PHP] can I get at screen size ?

2004-04-05 Thread John Nichel
E.H.Terwiel wrote: I want to write a Server Side PHP program that generates a HTML page client side. How would I get at the clients' screen size, before serving the generated page ? Would it be a two-step process: first let the client execute a piece of JavaScript to generate Height and Width, and

Re: [PHP] can I get at screen size ?

2004-04-05 Thread Richard Davey
Hello, Monday, April 5, 2004, 3:20:03 PM, you wrote: EHT> I want to write a Server Side PHP program that generates a HTML EHT> page client side. How would I get at the clients' screen size, EHT> before serving the generated page ? Would it be a two-step EHT> process: first let the client execute

[PHP] can I get at screen size ?

2004-04-05 Thread E . H . Terwiel
I want to write a Server Side PHP program that generates a HTML page client side. How would I get at the clients' screen size, before serving the generated page ? Would it be a two-step process: first let the client execute a piece of JavaScript to generate Height and Width, and then send those val

Re: [PHP]

2004-04-05 Thread Ryan A
On 4/5/2004 3:12:11 PM, Nunners ([EMAIL PROTECTED]) wrote: > I've got a series of functions which return a list in an array. How can I > create an empty array? Or do I need to check it's > a valid array before I > use it? > > Cheers > James James, Please put the topic in the subject line so we

Re: [PHP] Strange Numeric Conversion...

2004-04-05 Thread John Nichel
Jay Blanchard wrote: [snip] "naked" [/snip] Dang John, I guess I don't think octally any more! John writes out his grocery list in Hex. ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to built desktop applications.

2004-04-05 Thread Burhan Khalid
Alireza Balouch wrote: It's easy... Al you have to do is call the php script like: php4 mydesktopscript.php and use other languages like TCL/TK to have some GUI on your script.. but i would rather learn my self C instead of using php for Desktop app. <[EMAIL PROTECTED]> wrote in message news:[EMA

Re: [PHP] place list box using php

2004-04-05 Thread Burhan Khalid
T UmaShankari wrote: Hello, Is there possible to place a list box over one many background picture using php anyways ? No, this is not possible with PHP. PHP is not a client-side language. You need to solve this problem with HTML. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP]

2004-04-05 Thread Richard Davey
Hello Nunners, Monday, April 5, 2004, 2:12:11 PM, you wrote: N> I've got a series of functions which return a list in an array. How can I N> create an empty array? Or do I need to check it's a valid array before I N> use it? $void = array(); That is an empty array. You can also use it to clear

[PHP]

2004-04-05 Thread Nunners
I've got a series of functions which return a list in an array. How can I create an empty array? Or do I need to check it's a valid array before I use it? Cheers James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting array of objects

2004-04-05 Thread Rob Ellis
On Mon, Apr 05, 2004 at 05:03:17AM +0200, Richard Harb wrote: > Hi there, > > Supposed I have an array of objects, like: > > $this[$i]->property1 > $this[$i]->property2 > > is there any 'cheap' way to sort the array according to the values of > property1? > Try array_multisort() -> // cre

[PHP] Printer Functions

2004-04-05 Thread Lou Apolonia
My question involves sending html to the printer to be printed properly. Here is my code: $handle = printer_open('Lexmark Z25-Z35'); printer_start_doc($handle, "test"); printer_start_page($handle); printer_set_option($handle, PRINTER_MODE, 'raw'); printer_set_option($handle, PRINTER_PAPER_FORMAT,

Re: [PHP] passing variables

2004-04-05 Thread William Lovaton
You can use $_REQUEST too, it has $_GET, $_POST and $_COOKIES. -William El s?, 03-04-2004 a las 11:30, Larry E.Ullman escribió: > > When using a link like xxx.proceed.php?language=gbr > > the 'proceed.php' script does not receive any $language variable. > > > > Does someone know how to get it ru

Re: [PHP] mktime error

2004-04-05 Thread Red Wingate
You could do this like this ( as it is faster ): function CreateDate($day, $month, $year) { return $year.$month.$day.'00'; } CreateDate(04,04,2004) -> 2004040400 But make sure you add the leading zero to $month and $day ( can be easily done (number_format for example) ) -- red Am

[PHP] mktime error

2004-04-05 Thread Andy B
if you need to turn the result of mktime() into a valid mysql timestamp format then put these 2 lines in your code when needed: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mktime error

2004-04-05 Thread Hernan Marino
Guys, second thought. mktime builds a unix time stamp (since the unix epoch, Jan 1, 1970 [I guess]), the difference are maybe due to time zones, because its the number of seconds since Jan,1 1970. On Mon, 5 Apr 2004 06:29:12 -0400, Andy B wrote: "On my personal machine the return value is: 1081

RE: [PHP] mktime error

2004-04-05 Thread Hernan Marino
I got 1081047600 for $time=mktime(0,0,0,4,4,2004); echo $time; (RH9, PHP 4.3.4) On Mon, 5 Apr 2004 11:34:11 +0100, Nunners wrote: I got 1081033200 Two thoughts: 1 - is $time a global variable predefined as the current time? Don't think it is?!?!?! 2 - Could it be to do with local time

Re: [PHP] mktime error

2004-04-05 Thread Red Wingate
Woops little mistake there, first of all it's 'gmmktime()' secondly the source should look something like: $var = mktime ( 0,0,1,4,4,2004 ) - 1; You can find a nice article on this topic here: http://www.phpbuilder.com/columns/ehresman20030911.php3?page=1 -- red [...] > Your Server will most

Re: [PHP] mktime error

2004-04-05 Thread Red Wingate
Your Server will most likely run in a different timezone. If both of you would use gmktime() the result will be the same. As for the negative result: Had the same problem some time ago - seams to me as if PHP doesn't like those 0,0,0 ( try 0,0,1 instead ) - You can adjust the result by reducing th

RE: [PHP] mktime error

2004-04-05 Thread Nunners
I got 1081033200 Two thoughts: 1 - is $time a global variable predefined as the current time? Don't think it is?!?!?! 2 - Could it be to do with local time settings i.e. comparing american dates with UK dates (1/Aug/04 and 8/1/04)? Nunners > -Original Message- > From: Andy B [mail

[PHP] mktime error

2004-04-05 Thread Andy B
"On my personal machine the return value is: 1081026000" interesting... i got 1081054800 from mine with the code: even on cli it gives the same thing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mktime error

2004-04-05 Thread Andrew
Hi there, On a host running: PHP 4.3.5 (cli) (built: Apr 3 2004 07:11:21) I found a strange error produced by the mktime() function: mktime(0, 0, 0, 4, 4, 2004) returns -7262 On my personal machine the return value is: 1081026000 If anybody's aware of that bug and if it's fixed, please answe

[PHP] place list box using php

2004-04-05 Thread T UmaShankari
Hello, Is there possible to place a list box over one many background picture using php anyways ? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Warning: exec(): Unable to fork

2004-04-05 Thread Mark C
Hi, I curretly running: PHP 4.3.4 on a windows XP with IIS, This is the first time developed using a windows platform (normally I use apache on linux), but I'm trying to run ImageMagick in the background to resize an image, as a test I'm trying to run the cmd shell, using exec (I've tried system,

[PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Kim Steinhaug
My first thought is that some dynamic code on this page has an error. Typical like this : news:[EMAIL PROTECTED] > This problem only seems to be happening on one of the virtual hosts on this > system, and I cannot seem to figure out just what it is. > > I have a simple form posting to search.php,

  1   2   >