RE: [PHP] Other than substr

2002-07-03 Thread Leotta, Natalie (NCI/IMS)

What do you want it to look like in the text boxes?  If you just want to
take out the two parentheses, you can use strstr to get the index of the )
string to use in your substring statement.

http://www.php.net/manual/en/function.strstr.php

I hope this helps!

-Natalie

-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 03, 2002 12:36 PM
To: PHP General List
Subject: [PHP] Other than substr


Hi all.
 
I need to show up some data from a DB which consist of phone numbers with
area code. They're stored like () . What is the best approach to
print them into some textboxes so they can be edited? I'm using substr but
area codes (inside parenthesis) goes from 3 to 5 numbers, so sometimes the
closing parenthesis is showed and other times even the first number from the
actual number is also showed. Can I use regex instead? How is it used? I
tried to figure it out in the PHP manual, but it is NOT written in my level
of English.
 
 
Thanks in advance,
 
 mailto:[EMAIL PROTECTED] Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] FOXED - no success in replacing file content using fgets/fputs and str_replace

2002-06-26 Thread Leotta, Natalie (NCI/IMS)

Some editors let you find/replace in files in a certain folder.  That might
be easier.  I know UltraEdit let you do this and it only takes a few
minutes.  To me, that is much less labor-intensive than trying to write code
to do it, unless you're trying to learn things while you do it. :-)

-Natalie

-Original Message-
From: Naintara Jain [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 27, 2002 2:46 AM
To: Php-General@Lists. Php. Net
Subject: [PHP] FOXED - no success in replacing file content using
fgets/fputs and str_replace


I need to replace some html code in about 100 files.

Wanted to do this through code, and am using fgets() to get a line at a time
from the file, this string is saved in variable $line.

Then I check for the occurrence of the search string in $line using
strpos(). If found, I echo some statements, and I wanted to replace the
search text with replace text using str_replace(). The strange thing is
that while the code is able to search out the strings correctly, it doesn't
replace the text. The $line var loses its value for no reason.

I check for the occurrence of the search string
if($pos=strpos ($line, $strfrom))

but when within the if block I try to echo $line I don't get the value, so
str_replace doesn't work either.

everything else works fine, the strangest thing is that I tried echoing the
$line value before the if block and it doesn't print anything, but it works
for the if condition.

I am getting the no of files and the line nos, where the search string
occurs, but no replacements happening. This is the replacement code:

$newline=str_replace ($strfrom,
$strto,$line);
echo brNew Line $newline;
if(is_writable($file))
{
echo brwritable:;
if(fputs($fd,$newline))
$replaced_links++;

}
Am I missing something really obvious here?

thanks.
Naintara

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 06/05/2002


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Menu Selections Dynamic from a Database

2002-06-25 Thread Leotta, Natalie (NCI/IMS)

Unless you want to submit or use frames, you need to use JavaScript to
populate the second dropdown based upon the value of the first one.  PHP
doesn't let you do this without the submit or frames because it's
server-side, whereas JS is client-side.

If you need any code let me know.

Good luck!

-Natalie

-Original Message-
From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 25, 2002 3:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Menu Selections Dynamic from a Database


Greetings All,

Here is the problem I am trying to solve, I know it can be done but I am 
not clear on how to do it.

I am generating an appointment application.
And I want to dynamically populate pulldown menus from values in a DB.

So if a person picks a day for an appointment in a pulldown menu, then next 
pulldown menu on the page is dynamically populated with the available times 
for that specific day.
The values for both menus will be pulled from information in a MySQL db.

Can anyone help me out with this?

Phillip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] MSSQL/PHP Query Help

2002-06-12 Thread Leotta, Natalie (NCI/IMS)

have you tried Nics.MAC in (xxx,xxx,xxx,xxx)?  There's a lot less
room for error in that, because it's so much tidier.

-Natalie

-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 12, 2002 10:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MSSQL/PHP Query Help


Hey guys...  I'm currently using PHP, FreeTDS, and Sybase libraries to
access a database on an MS SQL 2000 server.  Things are going fine, except
for my more complex queries.  Here is an example:

SELECT Servers.Name, Nics.MAC
FROM Servers INNER JOIN Nics ON Servers.ServerId = Nics.Server WHERE
(((Nics.MAC)=0002B34DA81F)) OR (((Nics.MAC)=0002B34DA76F)) OR
(((Nics.MAC)=0002B34DA32D)) OR (((Nics.MAC)=0002B34DA31D));

This query isn't even as bad as it's going to get, but I get the error:

Sybase error:  Invalid column name '0002B34DA81F'.

I get this for each Nics.MAC entry that I make.  If I don't include the
WHERE/OR statement, the query runs fine.  The query runs correctly on the
MS SQL server itself, but I can't get it to work here.

I assume that PHP just passes the query to the SQL server directly, so there
must be something that I'm missing.  Do I need to escape more than just the
quotes?  If there is anything I need to know about PHP and MS SQL before I
go on, I'd love to hear it.  ;-)


Michael


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Querying for MAX

2002-06-12 Thread Leotta, Natalie (NCI/IMS)

is

select MAX(column name)

what you are looking for?  I know it works on numeric columns, I'm not sure
if it works on non-numbers, you'd have to look it up in a SQL Tutorial
somewhere.

Good luck!

-Natalie

-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 12, 2002 2:36 PM
To: 'PHP DB List'; PHP General List
Subject: [PHP] Querying for MAX


I'm sorry if this mensaje is posted twice. I sent it yesterdays, but then my
ISP had problems with e-mail and I lost dozens of them and don't know if
sent OK.


Hi all,

What I'm trying to do here is not inside PHP nor MySQL books I have. I need
to query the DB to look the max result in a column. That is, if I have
affiliate members with ID going from 1 to 10, get the query to know that the
last member added was 10 so I can add member 11 without using
auto_increment, because I need to insert old members too which already have
ID numbers. Is that possible?

Thanks in advance,


Cesar Aracena mailto:[EMAIL PROTECTED] 
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] including functions, passing objects I created

2002-06-12 Thread Leotta, Natalie (NCI/IMS)

I have a line class that I'm using to draw a line graph of up to 5 lines.
Since I query the db for each of those lines (with a # as lineNum), my code
to take everything out of the fetch_arrays is fairly cumbersome.  I use this
code in 4 different programs (the graph, the printable graph, the data
table, and the accessible [D]).  To avoid code duplication, I'd really like
to be able to pass $sql and the 5 lines to a function in a different file,
that all 4 of my programs can use.
 
I have tried both 
 
function runSQL ($sql, $line1, $line2...) {
...
}
 
and 
 
function runSQL ($sql, $line1, $line2...) {
...
return array ($line1, $line2...);
}
 
but both ways timeout.  Is there any way for me to put data into my line
objects from a function?  I know that the include is working because I have
a test function that just prints out Hello.
 
I've checked the manual, but it doesn't say anything about having a
user-made object as a param or a return.
 
Thanks for any info you may have!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

That may be the case, but I had assumed the show() was a function in the
file that should be included.

When I include files and it doesn't work (I've only started trying today and
discovered the beauties of the include_path) it says:
Fatal error: Failed opening required 'includeFile.inc'
(include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line 4

So I would guess that his include() is working and there either is no show()
in the file or he isn't actually including it, which goes back to your idea.
Hopefully he'll give us more info :-)

-Natalie

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Fw: include() statement goofing me up - help


you are getting the error

Fatal error: Call to undefined function: show() in
e:\solomonsporch.org\test.php on line 9

show() is not a function, try include()


Jay

Wouldn't it be great if lists were like the Magic 8 Ball or a Quija board?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

At least it makes more sense now that you're getting the failed to open
error.  I'd try putting a small file in the php4/pear directory and see if
you can include that.  If so, then it's still a path problem - like maybe
it's looking to php4/pear/http://

Since I don't have anything including successfully, this is all the help I
can be :-)

Good luck!

-Natalie

-Original Message-
From: Doug DeVries [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:36 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Fw: include() statement goofing me up - help


I've changed the source file on this issue. Slightly different error, but
still no joy. Thanks for taking the time with this.

html
head
/head
body
test area should show 4 lines of news


?php
include
(http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yeslimit=4;)
?


/body

/html

- Original Message -
From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED]
To: 'Jay Blanchard' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 10:30 AM
Subject: RE: [PHP] Fw: include() statement goofing me up - help


 That may be the case, but I had assumed the show() was a function in 
 the file that should be included.

 When I include files and it doesn't work (I've only started trying 
 today
and
 discovered the beauties of the include_path) it says:
 Fatal error: Failed opening required 'includeFile.inc'
 (include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on 
 line
4

 So I would guess that his include() is working and there either is no
show()
 in the file or he isn't actually including it, which goes back to your
idea.
 Hopefully he'll give us more info :-)

 -Natalie

 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 11, 2002 1:27 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Fw: include() statement goofing me up - help


 you are getting the error

 Fatal error: Call to undefined function: show() in 
 e:\solomonsporch.org\test.php on line 9

 show() is not a function, try include()


 Jay

 Wouldn't it be great if lists were like the Magic 8 Ball or a Quija
board?



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

Thanks, but I just figured it out - I stupidly saved the file to be included
up a folder from the one I was working with (my mind must still be reeling
from the horrible defeat of the Canes last night...).  I don't quite
understand why it's not looking at /opt/net/... but it's working so I'm not
going to ask question :-)

Thanks!

-Natalie

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:54 PM
To: Leotta, Natalie (NCI/IMS); [EMAIL PROTECTED]
Subject: RE: [PHP] Fw: include() statement goofing me up - help


[snip]
When I include files and it doesn't work (I've only started trying today and
discovered the beauties of the include_path) it says: Fatal error: Failed
opening required 'includeFile.inc'
(include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line 4
[/snip]

Send some of your code and I'll have a look...

Jay


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] url string

2002-06-10 Thread Leotta, Natalie (NCI/IMS)

Instead of window.location, try document.formName.target = file.php?params
- that's how I have mine set up and it works well.
You need to follow that with document.formName.submit()

-Natalie

-Original Message-
From: Kris Vose [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 10, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] url string


I am looking for a way to pass two variables in a url string to a php
script.  I originally was using java script to acomplish this because once
the user is redirected they can not press the back button to get back to the
original page.  It looks like this: ? script window.location =
somefile.php?user=?username?pass=?userpass?/script
?

I have also tried it this way:

echo script window.location =
'somefile.php?user=$usernamepass=$userpass'/script;

Unfortunately both ways do not work.  In the first instance the script jumps
to the window location but does not pass php variables into the url string.
In the second instances the java script does not even compile.

Is there a way to do this with php?...html?...javascript?

...I think that window.location does not except url string variables or
something.  Anyway if anyone can help it would be appreciated.  Thanks.


Kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Retrieving text from a URL using PHP

2002-06-06 Thread Leotta, Natalie (NCI/IMS)

In theory, I would guess you could use combinations of explode and strstr to
maybe explode on , then run strstr on  so you get everything after the 
but before the next .  Then you'd probably have to implode it or something.
There might be a better way to do it with just substr and strstr so you
don't have to explode it...

There may be an easier way - but this is the first thing that popped into my
head, and it might at least get you looking in a good direction.

Good luck!

-Natalie

-Original Message-
From: Anthony Ritter [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 06, 2002 11:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Retrieving text from a URL using PHP


Is there any way to retrieve data (for example - the text *within* a table)
from another URL so that only the text appears and not the html (tables,
cells, colors, etc.)

Below is a script which opens and reads a URL and then outputs the complete
URL.

I am just looking for the text output.

Thank you in advance.
Tony Ritter
...

html
head
titleRetrieving text from a URL/title
/head
body
?
$theurl=http://www.blah.com;;
if (!($fp=fopen($theurl, r)))
 {
  echo Could not open the URL;
  exit;
 }
$contents= fread($fp, 100);
fclose($fp);
echo $contents;
echo br.This information retrieved frombr.a
href=\$theurl\$theurl/abr.on .(date(l jS F Y g:i a T)); ?
/body /html




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Retrieving text from a URL using PHP

2002-06-06 Thread Leotta, Natalie (NCI/IMS)

I wish I'd seen this before I sent my message!

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 06, 2002 10:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Retrieving text from a URL using PHP


On Thursday 06 June 2002 23:43, Anthony Ritter wrote:
 Is there any way to retrieve data (for example - the text *within* a 
 table) from another URL so that only the text appears and not the html 
 (tables, cells, colors, etc.)

strip_tags()

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Help stamp out Mickey-Mouse computer interfaces -- Menus are for
Restaurants! */


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] redirection

2002-06-05 Thread Leotta, Natalie (NCI/IMS)

You can use JavaScript:

document.location=URL;

You can do that in an onClick (make sure that it's not a type submit, just a
type button if you're using a button).

-Natalie

-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 05, 2002 2:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] redirection 


is there any way other than

header(Location: http://www.php.net/;);

to redirect to another page.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: Nothing will execute after calling imagejpeg.

2002-06-03 Thread Leotta, Natalie (NCI/IMS)

You can't use echo or print in your image - you have to use ImageTTFText or
ImageString or any other Image function.  If you go to PHP.net and search
the Image functions you should be able to find some helpful things that you
can use.  You also have to initialize your colors with ImageColorAllocate.

I have a meeting until about 1:00, but if you're still having problems let
me know and I can email you some example code this afternoon.

-Natalie

-Original Message-
From: Kris Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, June 01, 2002 11:11 PM
To: Leotta, Natalie (NCI/IMS)
Subject: Nothing will execute after calling imagejpeg.


Hello, My name is Kris Johnson. I 'm hoping you can give me some direction
on a problem I am having.

After calling imagejpeg nothing else will work. I have tried echoing html,
echoing just a word in quotes, as well as a using a location header. I do
not get any errors or warnings, but whatever command I use simply doesn't
work. As a test I remarked imagejpeg out of the code and as soon as I did
this the commands after worked fine. I tried changing the filetype to png
but still get the same problem.

Have a nice day
Kris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

My company contracts for the National Institutes of Health and the National
Cancer Institute.  A group of us are developing a website for State Cancer
Profiles - ie, you want to see the trend of lung cancer in the Total US v.
Kentucky kinds of things.  All of the graphs that I'm working on are being
developed dynamically using PHP.  

Unfortunately, the site isn't public yet, so I can't send you a link.  We
should be live sometime this summer.  At that point in time it will be a
link off of www.cancer.gov.

Good luck!  If you want any more information, I'll see what I can get you
and your client.  I know examples of the site have been shown to people on
Capitol Hill, so it is possible I could send you the password for the test
site.  I'm not in a position to make those kinds of decisions :-)

-Natalie

-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 8:55 AM
To: 'John Christopher'; [EMAIL PROTECTED]
Subject: RE: [PHP] Is PHP used by U.S. Government? By U.S. DoD?


It's being used by me. :)

It's not really accepted anywhere, but there are no regulations against
using it. I looked into it a little bit before I started writing my current
project. I don't know of any sites that are using it except for mine (and
it's intranet only). 

---John Holmes...

 -Original Message-
 From: John Christopher [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Is PHP used by U.S. Government? By U.S. DoD?
 
 
 I would like to use PHP in a project for a United States Government 
 client.  The client is skeptical because PHP is not a Microsoft 
 product.  I'm looking for statistics and links that show that PHP *is* 
 currently in use by the US Government.
 
 Is PHP used by the U.S. Department of Defense?  Examples?
 
 Is PHP a U.S. Military Standard?
 
 Any stats or links would be most helpful.  Thank you.
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup 
 http://fifaworldcup.yahoo.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Graphs using PHP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

Hi, Jason.

I'm developing some really cool line/point and bar graphs.  While the Image
stuff is definitely quite different, I think you'd really like it once you
get into it.  Our graphs are generated dynamically from data in a database.
I can't show you the graphs because they aren't ready for the public yet,
but on the line/point graph we actually have the points as different shapes
and stuff - circles, triangles, squares...  Once we get the new version of
PHP we'll be using styled lines (dot dash dash kinds of things) with a
width, so they will be easily copied in to PowerPoint presentations.

It's a lot of work to get it started, because you have to figure out where
you're going to want everything to go, but I recommend trying it.  Start by
drawing some rectangles and filled rectangles and stuff like that.

Oh, and when you use ImageTTFText, I recommend that for smaller fonts you
use -$fontColor instead of just $fontColor - it comes out clearer.  For
bigger fonts sometimes the blurry one is better because it's less pixilated.

Good luck!  If you need anything else, let me know!

-Natalie

-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Graphs using PHP


Just want to run this by you all to check the feasibility of it.

I run a site that deals with cars, people can upload pics of their vehicle
and tell everyone else its year, color, 'generation', and where they're
located.

What I'd like to do is make some graphs on the front page that look like
gauges you'd see in a car, i.e. speedometer, tachometer, oil, etc. but these
would actually be graphs showing, for instance, how many of the cars on the
site are red, or whatever the most popular color is. So if a majority of the
cars were red, and red cars made up 57% of the total cars on the site, I'd
want a graphic of a speedometer with a needle that would be in a position
that represented 57%.

How difficult is this? I looked at some of the imagecreate() functions in
the manual, but they look like a language all their own and I'd like to know
if there's any easier way to do this that I'm overlooking. I'm thinking
doing some kind of image overlay is the way to go, but not sure. Any ideas
or pointers would be great, links to sample scripts would be excellent.
Thanks!

Jason Soza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

My shift key isn't stuck.  I don't know what's wrong.  I found out that one
other person had a problem with it at my company and apparently one of the
techies put it on MS's technet group.  Hopefully something will come of it.


Thanks for your help!

-Natalie

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:49 PM
To: Leotta, Natalie (NCI/IMS)
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS);
[EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


Natalie,
   I'm using Outlook XP here and the link opens just fine.  The only time I
get that locate link browser window is if I hold the shift-key down when
clicking on the link.  (I typically link to open links in new windows, so I
hold the shift-key when clicking links - It will open the link in a new
browser window.)

   If you weren't hitting the shift-key, it could be possible that one of
your shift-keys are stuck, which is emulating the shift-click.  Not much
more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.


Jaime Bozza


-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 12:16 PM
To: [EMAIL PROTECTED]
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS)
Subject: [PHP] PHP URLs not opening from email in Outlook XP


I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: SOLVED: [PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

For anyone who was having this problem, here's the solution.  It's a
windows-level bug.  Even HTML files weren't opening.

In Windows Explorer, go to either View/Tools (depending on version) and get
to Folder Options.  Go into File Types, and change the URL:HTTP (spelled
out) to have open and point it to your browser of choice.  Not something
you want to put on your website for John Q. Public, but ok for advanced
users.

thanks for the help!

-Natalie

-Original Message-
From: Leotta, Natalie (NCI/IMS) 
Sent: Friday, May 31, 2002 1:52 PM
To: 'Jaime Bozza'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


My shift key isn't stuck.  I don't know what's wrong.  I found out that one
other person had a problem with it at my company and apparently one of the
techies put it on MS's technet group.  Hopefully something will come of it.


Thanks for your help!

-Natalie

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:49 PM
To: Leotta, Natalie (NCI/IMS)
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS);
[EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


Natalie,
   I'm using Outlook XP here and the link opens just fine.  The only time I
get that locate link browser window is if I hold the shift-key down when
clicking on the link.  (I typically link to open links in new windows, so I
hold the shift-key when clicking links - It will open the link in a new
browser window.)

   If you weren't hitting the shift-key, it could be possible that one of
your shift-keys are stuck, which is emulating the shift-click.  Not much
more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.


Jaime Bozza


-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 12:16 PM
To: [EMAIL PROTECTED]
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS)
Subject: [PHP] PHP URLs not opening from email in Outlook XP


I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Run php function with user click

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

JavaScript could do a similar thing with onClick.

-Natalie

-Original Message-
From: Jim lucas [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 4:21 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: Dave Shacket
Subject: Re: [PHP] Run php function with user click


use flash to open a tunnel to the server and run a script,  therefor it
never has to leave the current page.  ::)

Jim Lucas
- Original Message -
From: Michael Sweeney [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Dave Shacket [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 10:36 AM
Subject: Re: [PHP] Run php function with user click


 On Friday 31 May 2002 05:44, you wrote:
  I know how to have my php code run a function within itself. But is
there a
  way that upon an event (clicking a button, etc.), you could run a 
  php function without having to go to a new page?

 No. PHP is a server side application. The only way to run a function 
 or
php
 program is to send a request to the server. When you do that the 
 server
sends
 back a response and your broswer refreshes the page.

 ..michael..

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Run php function with user click

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

If Michael Sweeney is right that you can run PHP in a JS method that would
work.  I just do all of my instant gratification stuff in JS.  I guess it
depends on what is in the PHP function that he wants to run - it's possible
that he could do it in JS.

-Nat

-Original Message-
From: Jim lucas [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 4:29 PM
To: Leotta, Natalie (NCI/IMS); [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: Dave Shacket
Subject: Re: [PHP] Run php function with user click


but that would take you off the current page wouldn't it?  or would you
return false?

Jim Lucas
- Original Message -
From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED]
To: 'Jim lucas' [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: Dave Shacket [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 1:25 PM
Subject: RE: [PHP] Run php function with user click


 JavaScript could do a similar thing with onClick.

 -Natalie

 -Original Message-
 From: Jim lucas [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 4:21 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Cc: Dave Shacket
 Subject: Re: [PHP] Run php function with user click


 use flash to open a tunnel to the server and run a script,  therefor 
 it never has to leave the current page.  ::)

 Jim Lucas
 - Original Message -
 From: Michael Sweeney [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: Dave Shacket [EMAIL PROTECTED]
 Sent: Friday, May 31, 2002 10:36 AM
 Subject: Re: [PHP] Run php function with user click


  On Friday 31 May 2002 05:44, you wrote:
   I know how to have my php code run a function within itself. But 
   is
 there a
   way that upon an event (clicking a button, etc.), you could run a 
   php function without having to go to a new page?
 
  No. PHP is a server side application. The only way to run a function 
  or
 php
  program is to send a request to the server. When you do that the 
  server
 sends
  back a response and your broswer refreshes the page.
 
  ..michael..
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] fdup Pipes?

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

Like we have much of a choice - I'm sure my bosses would love it if I went
to them and asked for a real email client.

-Original Message-
From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 11:06 AM
To: Rasmus Lerdorf
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] fdup  Pipes?


Yes, I realized this after I sent my reply.

And, please try hard to forgive those of us who do not use the real
software approved by you  the other gods.  We beg your forgiveness, oh
lord.

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 30, 2002 10:45 AM
 To: Jonathan Rosenberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] fdup  Pipes?


 Yes it was.  In your message you had this header:

 In-Reply-To: 
 [EMAIL PROTECTED]

 Which means you hit 'Reply' in your crappy Outlook
 program, deleted the
 Subject line and posted your message that way.  Please
 don't do that.
 Those of us with real email clients see your new
 message inside a thread
 on a completely different topic.

 -Rasmus

 On Thu, 30 May 2002, Jonathan Rosenberg wrote:
  I have no idea what you are talking about.  My
 message was NOT a
  reply to a previous post.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

I have a quick question.  I've been reading all of this about the upgrade -
we're just waiting for our network guy to do it.

We need to use the query string for parameters so our URL is
cut-and-paste-able.  Is that going to be a problem?  We were using
$HTTP_POST_VARS until someone decided that they wanted people to be able to
direct someone else to the exact same graph.

I just thought that I might as well get some info now, so that I can be
prepared if everything is going to break :-)

Thanks!!

-Natalie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 4:16 PM
To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Problem running script after installing PHP 4.2.1


You probably still have register globals off still and  your URL variables
aren't being accessed correctly. Use $_GET['page'] or
$HTTP_GET_VARS['page'], or turn on register_globals...

---John Holmes...

- Original Message -
From: Igor Portnoy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 4:03 PM
Subject: [PHP] Problem running script after installing PHP 4.2.1


Hello,



I am using MySQL to display some data to the users.  I have upgraded to PHP
Version 4.2.1 on my FreeBSD Apache server, and now data from the database is
not displayed correctly. Well, the page with the data shows up, and it
actually shows correct number of records.  However, when I click on the
next or 2 buttons the next page with records doesn't show up. See
example here: http://www.gibsonusa.com/test2/page/index.php



Before I upgraded to PHP 4.2.1 everything was working perfectly. Any ideas
what could cause this, and how can it be fixed?



Thanks.






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Problem running script after installing PHP 4.2.1

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

One more question - could you just use $_GET[$QUERY_STRING} then?  Our URL
doesn't even have IDs - it's just 00106055...  Then I explode it and put
it into variables.  There are up to 12 vars that we pass that way so we
didn't label them.

Thank you!!  We're not worried about security - if someone tampers with the
URL then the database query doesn't work and they get an error message (my
vote was for don't be an idiot and play with things you don't understand)
but my boss didn't think it was cute.  :-)

Thanks again!

-Natalie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 4:29 PM
To: Leotta, Natalie (NCI/IMS); Igor Portnoy; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] Problem running script after installing PHP 4.2.1


Okay, the only issue with the upgrade is that register_globals defaults to
off. That is because of security reasons so it's not _quite_ as easy to
write insecure scripts.

With register_globals off, a URL like index.php?page=4 will not give you a
$page variable, only $_GET['page'], or $HTTP_GET_VARS['page']. If your using
HTTP_GET_VARS now, then you'll be fine. The new $_GET[] array is just like
HTTP_GET_VARS except its easier to type and it's always global (even in
functions and classes, etc).

If you turn on register_globals, any script you have now will run just fine
on the latest PHP as far as accessing GET, POST, COOKIE, etc data is
concerned.

Hope that helps. Let me know if there are any other questions.

---John Holmes...

- Original Message -
From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED]
To: '1LT John W. Holmes' [EMAIL PROTECTED]; Igor Portnoy
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 4:18 PM
Subject: RE: [PHP] Problem running script after installing PHP 4.2.1


 I have a quick question.  I've been reading all of this about the
upgrade -
 we're just waiting for our network guy to do it.

 We need to use the query string for parameters so our URL is 
 cut-and-paste-able.  Is that going to be a problem?  We were using 
 $HTTP_POST_VARS until someone decided that they wanted people to be 
 able
to
 direct someone else to the exact same graph.

 I just thought that I might as well get some info now, so that I can 
 be prepared if everything is going to break :-)

 Thanks!!

 -Natalie

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 30, 2002 4:16 PM
 To: Igor Portnoy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem running script after installing PHP 4.2.1


 You probably still have register globals off still and  your URL 
 variables aren't being accessed correctly. Use $_GET['page'] or 
 $HTTP_GET_VARS['page'], or turn on register_globals...

 ---John Holmes...

 - Original Message -
 From: Igor Portnoy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, May 30, 2002 4:03 PM
 Subject: [PHP] Problem running script after installing PHP 4.2.1


 Hello,



 I am using MySQL to display some data to the users.  I have upgraded 
 to
PHP
 Version 4.2.1 on my FreeBSD Apache server, and now data from the 
 database
is
 not displayed correctly. Well, the page with the data shows up, and it 
 actually shows correct number of records.  However, when I click on 
 the next or 2 buttons the next page with records doesn't show up. 
 See example here: http://www.gibsonusa.com/test2/page/index.php



 Before I upgraded to PHP 4.2.1 everything was working perfectly. Any 
 ideas what could cause this, and how can it be fixed?



 Thanks.






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Undefined variables

2002-05-30 Thread Leotta, Natalie (NCI/IMS)

You could try using isset first.  I'm not sure where your log is, but if you
check to see if task is set, then maybe that will eliminate the problem :-)

-Natalie

http://www.php.net/manual/en/function.isset.php

-Original Message-
From: Crane, Christopher [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 5:07 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Undefined variables


I have an annoying problem, that I know is my own ignorance to PHP. I came
from PERL and this was not a problem there but is with PHP.
 
Here's the issue.
I have a number of scripts that use a index.php?Task='some sort of task
name', for example, http://www.foo.com/index.php?Task=ShowVersion
http://www.foo.com/index.php?Task=ShowVersion .  Then I use an if/else
statement to tell the script what to do if it sees the ShowVersion variable.
In the ShowVersion example, I would call a function that displays the
version information I defined in the script. As a back up, I always provide
an else statement to catch variables I have no functions for.
 
If I have a ShowVersion function, GetData function and a CreateImage
function and the Task variable is empty or a variable that does not exists
comes in like http://www.foo.com/index.php?Task=SomethingDumb
http://www.foo.com/index.php?Task=SomethingDumb  it would go to the
default function of something by using the ELSE part of the if/else
statements. 
 
I hope I am describing this correctly.now here is the problem. If I have
warnings turned on, or if I have a log written for warnings, the log fills
up if someone goes to http://www.foo.com/index.php
http://www.foo.com/index.php  or http://www.foo.com http://www.foo.com
will error messages like undefine variable TASK on line 255. I understand
the reason, that PHP was expecting the variable Task when it got to the
if/else statements. So I put in something like if(!($Task)) { function
Something(); } but it still is looking for the variable so it still errors.
 
In Perl, it would simply be ignored. What do I do here.
 
Here is a simple example of the code.
 
if ($Task == ShowVersion) { function ShowVersion(); }
elseif ($Task == GetData) { function GetData(); print $DataOutput; }
elseif ($Task == CreateImage) { function CreateImage(); } else { print
Incorrect Variable or no Variable Suppliesbr; }
 
 
 
 

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] comment followed by ? fails to parse

2002-05-29 Thread Leotta, Natalie (NCI/IMS)

I disagree.  I use // because then when I need to take out a chunk of code
(the requirements for the programs change faster than I can keep up with
them!!) I can do /* unnecessary code */ and it doesn't end prematurely.

-Natalie

-Original Message-
From: Ed Gorski [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 29, 2002 9:25 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] comment followed by ? fails to parse


Bah quit complaining, you should be using /* comments */ anyway.

ed

At 09:16 PM 5/29/2002 +0800, Jason Wong wrote:
On Wednesday 29 May 2002 21:10, Brinkman, Theodore wrote:
  It really should ignore anything in any sort of comment.  The whole 
  point of a comment is that it provides the programmer with 
  information and is ignored by the compiler/interpreter.  If // is 
  supposed to comment until the end of the line, then by god, it 
  should comment until the end of the line, not until the end of the 
  line unless it finds ? buried in the line somewhere. Even VB gets 
  this right!

As someone has already pointed out that is documented behaviour. 
Personally I agree with you in that the whole line should be commented.

--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Life is too important to take seriously.
 -- Corky Siegel
*/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Intermediate Searching... screen.

2002-05-28 Thread Leotta, Natalie (NCI/IMS)

You could, in theory, submit your query to an intermediate file, which only
displays the Searching screen, but is querying your database and throwing
everything you need into hidden fields in a form.  Then have that form have
an onLoad submit to your results page.

I did this with HTML submitting to Perl submitting to PHP until we got the
PHP/DB problems worked out.  Here's what I wrote:


print htmlhead/headbody onload=\document.HiddenForm.submit()\ ;
print Page is loading, please wait;
print form name=\HiddenForm\ method=\POST\
action=\../../joinpoint/joinpoint.withimage.php\;
print $hiddenData; 
print /form/body/html;

$hiddenData contained all of the values, in hidden data form, that I was
sending to my action script.

Good luck!  There is probably an easier way than this, but if no one else
comes up with it, at least you have something.

-Natalie

-Original Message-
From: Jeff Bearer [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 28, 2002 2:24 PM
To: Php-General (E-mail)
Subject: [PHP] Intermediate Searching... screen.


I have a part of my site that searches a large database and sometimes it
takes more than a few seconds to return the results.  When searches take
longer, people get antsy and search again.  To let them know that the search
is working so they don't double efforts I'd like to have an intermediate
Searching... screen.

I don't have a good idea on how to do this and I'm looking for some ideas or
directions. How do I show one thing while the search is running and another
when the search is complete and also not loose the returned record set?

-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Leotta, Natalie (NCI/IMS)

But why wouldn't the parser skip right over a // line?  it shouldn't even
see anything in it.

-Original Message-
From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 28, 2002 4:46 PM
To: Johnson, Kirk; [EMAIL PROTECTED]
Subject: RE: [PHP] comment followed by ? fails to parse


BTW: if my last message was correct, this means that an occurrence of ?
embedded in a string literal will also cause problems.

 -Original Message-
 From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 28, 2002 4:08 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] comment followed by ? fails to parse


 I have wondered for some time if this is a bug or just
 an interesting design
 choice ;) I agree with you, I was surprised when I
 first encountered this.
 But it is what it is, so code accordingly.

 Kirk

  -Original Message-
  From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 28, 2002 1:21 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] comment followed by ? fails to parse
 
 
  If I write a comment line with // and I include in
 it ? then
  it fails to parse the rest of the page because (i'm
 guessing)
  the parser gets confused and goes off PHP mode.
  Is this normal? Shouldn't I be able to write literally ANYTHING on a 
  comment line?
 
  Sample Code:
 
  ?
  //bla bla ?
  $var=1;
  ?
 
  Output:
 
  $var=1; ?
 
 
  cheers,
  thalis

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Leotta, Natalie (NCI/IMS)

That makes sense.  Thanks!

-Natalie

-Original Message-
From: Ed Gorski [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 28, 2002 4:46 PM
To: Leotta, Natalie (NCI/IMS); 'Jonathan Rosenberg'; Johnson Kirk;
[EMAIL PROTECTED]
Subject: RE: [PHP] comment followed by ? fails to parse


No the parser sees the ? after a // because it needs to see when to quit 
out (unlike traditional, compiled languages) but it won't have this same 
effect in a string literal.

ed

At 04:40 PM 5/28/2002 -0400, Leotta, Natalie (NCI/IMS) wrote:
But why wouldn't the parser skip right over a // line?  it shouldn't 
even see anything in it.

-Original Message-
From: Jonathan Rosenberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 4:46 PM
To: Johnson, Kirk; [EMAIL PROTECTED]
Subject: RE: [PHP] comment followed by ? fails to parse


BTW: if my last message was correct, this means that an occurrence of 
? embedded in a string literal will also cause problems.

  -Original Message-
  From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 28, 2002 4:08 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] comment followed by ? fails to parse
 
 
  I have wondered for some time if this is a bug or just
  an interesting design
  choice ;) I agree with you, I was surprised when I
  first encountered this.
  But it is what it is, so code accordingly.
 
  Kirk
 
   -Original Message-
   From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, May 28, 2002 1:21 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] comment followed by ? fails to parse
  
  
   If I write a comment line with // and I include in
  it ? then
   it fails to parse the rest of the page because (i'm
  guessing)
   the parser gets confused and goes off PHP mode.
   Is this normal? Shouldn't I be able to write literally ANYTHING on 
   a comment line?
  
   Sample Code:
  
   ?
   //bla bla ?
   $var=1;
   ?
  
   Output:
  
   $var=1; ?
  
  
   cheers,
   thalis
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] imagettftext question

2002-05-28 Thread Leotta, Natalie (NCI/IMS)

To change your Image color use ImageFill:

ImageFill($im,$gifwidth,$gifheight,ImageColorAllocate($im,235,235,235));

Then, in your ImageTTFText, you can set the font:

ImageTTFText($im, 11, 0, 20, (540-20),-$black,../fonts/arial.ttf, Source:
SEER 12 Program);

I recommend using -$fontcolor for almost everything.  Sometimes it's not as
good for the larger fonts (they look a little stairsteppy) but it's almost
always better for the smaller fonts.

Good luck!

-Natalie

-Original Message-
From: Ziying Sherwin [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 28, 2002 10:59 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] imagettftext question




In our application, we need to write a UTF8 strings to the image using True 
Type fonts. The php function that we are using is imagettftext. However, we
have the two problems regarding that function:

1. The images that are generated by this function is white fonts on the
black 
   background. But what we want is black fonts on the white background. It 
   seems impossible to set the background color. What we are doing now is to
   call external commands to reverse the color which is rather slow. Is
there
   better way to achieve the same result?

2. We also have long UTF8 stings that need to be broken into several lines. 
   Which php function has the ability to properly break UTF8 strings? And
   how to display multiple lines using imagettftext?

Thanks,
Ziying Sherwin

P.S. I am not on the mailing list, please reply to [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] creating Image to display without saving it.

2002-05-24 Thread Leotta, Natalie (NCI/IMS)

I use the header when the Image is the only thing in the file.  To use it in
a file with other stuff do I just put it before the ImageCreate?

I'll have to try the galleryimg tag.  Thanks!!!

-Natalie

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 3:00 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] creating Image to display without saving it.


On Thu, 23 May 2002, Leotta, Natalie (NCI/IMS) wrote:
 I've got a page where I create an Image that I want to put into one of 
 my HTML table cells.  I've been doing this by saving the file, 
 chmoding it, and then opening it using image source in the HTML.
  
 The problem is that when you do that, the new version of IE has that 
 stupid pop-up window when you mouseover on an image.  When I create an 
 Image in a different file, and have the image source tag linking to 
 that filename, for some reason there's no pop-up window.  Is there any 
 way for me to create the Image in the same file and include it in the 
 page without saving it and opening it?  We just did usability testing 
 and everyone hated the little popup that Microsoft gave us.

You can output the image direct from PHP to the browser. Just send the 
proper header ('Content-Type: image/png' or whatever) and output the image 
data.

As for that hateful little popup thing, I think you can get rid of that by 
adding the attriute GALLERYIMG=NO to your IMG tag.

miguel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] image_create(), header.....

2002-05-24 Thread Leotta, Natalie (NCI/IMS)

You can save them and then call them up, but then you have to use a cron or
something to empty out the folder.  Here's how I save it:

//Image created and everything up here, this is the very end of it
$myTime = time();
ImagePNG($im, ../spool/jp$myTime.png); //this creates a unique name
chmod(../spool/jp$myTime.png, 0666); //leading 0, then the code for the
mode you want
ImageDestroy($im);

print img src='../spool/jp$myTime.png' border=0 width=\520\
GALLERYIMG=\NO\ height=\500\/td;

I hope this helps!

-Natalie

-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 24, 2002 2:37 PM
To: PHP
Subject: [PHP] image_create(), header.


Im trying to use dynamic buttons, and Im trying to figure out how to get 
around the header call.
I figure use output buffering, but so far Ive only come up with errors.
Anyone see a better way or any errors in my code. Thanks

nb:  Uncomment the echo() statement to get the error.
--
?php

//echo 'Heybr';

function button($word) {
ob_start();
header(Content-Type: image/png);
$im = ImageCreate(100, 50);

$black = ImageColorAllocate($im, 0, 0, 0);
$white = ImageColorAllocate($im, 255, 255, 255);

$start_x = 50 - (strlen($word) * ImageFontWidth(5) / 2);
$start_y = 25 - ImageFontHeight(5) / 2;

ImageString($im, 5, $start_x, $start_y, $word, $white);

ImagePNG($im);
ImageDestroy($im);
ob_end_flush();
}

button('Hello World');

?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] image_create(), header.....

2002-05-24 Thread Leotta, Natalie (NCI/IMS)

Thanks!  I didn't know it was that helpful :-)  It's in there now.

-Natalie

-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 24, 2002 3:58 PM
To: Leotta, Natalie (NCI/IMS)
Subject: RE: [PHP] image_create(), header.


This looks like a great example to add to weberdev. 
would you care to spend 3 minutes and let other PHP developers enjoy from 
your knowledge?

You are one click away from doing a good deed :)

http://www.weberdev.com/index.php3?GoTo=addexample.php3

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 8:42 PM
To: 'Gerard Samuel'; PHP
Subject: RE: [PHP] image_create(), header.


You can save them and then call them up, but then you have to use a cron or
something to empty out the folder.  Here's how I save it:

//Image created and everything up here, this is the very end of it
$myTime = time();
ImagePNG($im, ../spool/jp$myTime.png); //this creates a unique name
chmod(../spool/jp$myTime.png, 0666); //leading 0, then the code for the
mode you want
ImageDestroy($im);

print img src='../spool/jp$myTime.png' border=0 width=\520\
GALLERYIMG=\NO\ height=\500\/td;

I hope this helps!

-Natalie

-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 24, 2002 2:37 PM
To: PHP
Subject: [PHP] image_create(), header.


Im trying to use dynamic buttons, and Im trying to figure out how to get 
around the header call.
I figure use output buffering, but so far Ive only come up with errors.
Anyone see a better way or any errors in my code. Thanks

nb:  Uncomment the echo() statement to get the error.
--
?php

//echo 'Heybr';

function button($word) {
ob_start();
header(Content-Type: image/png);
$im = ImageCreate(100, 50);

$black = ImageColorAllocate($im, 0, 0, 0);
$white = ImageColorAllocate($im, 255, 255, 255);

$start_x = 50 - (strlen($word) * ImageFontWidth(5) / 2);
$start_y = 25 - ImageFontHeight(5) / 2;

ImageString($im, 5, $start_x, $start_y, $word, $white);

ImagePNG($im);
ImageDestroy($im);
ob_end_flush();
}

button('Hello World');

?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] creating Image to display without saving it.

2002-05-23 Thread Leotta, Natalie (NCI/IMS)

I've got a page where I create an Image that I want to put into one of my
HTML table cells.  I've been doing this by saving the file, chmoding it, and
then opening it using image source in the HTML.  
 
The problem is that when you do that, the new version of IE has that stupid
pop-up window when you mouseover on an image.  When I create an Image in a
different file, and have the image source tag linking to that filename, for
some reason there's no pop-up window.  Is there any way for me to create the
Image in the same file and include it in the page without saving it and
opening it?  We just did usability testing and everyone hated the little
popup that Microsoft gave us.  
 
Thanks!
 
-Natalie

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



[PHP] refreshing PHP on onClick

2002-05-16 Thread Leotta, Natalie (NCI/IMS)

This might be a little bit JS and a little bit PHP.  I'm wondering if
there's an easy way to refresh a PHP page on an onClick and change one
parameter (say someone wants to redraw the graph, but with the points).  I
don't want to pay attention to any of the other parameters that could have
changed on the screen (we've got a bunch of selects).  We had come up with a
really complicated way which involved changing the parameters to the most
recent line drawn, deleting the most recent line, and then submitting with
those parameters and the showPoints value changed, but that sounds pretty
complicated.
 
If anyone could come up with a quicker way that didn't involve the whole
submitting thing, that would be easier.  My page has all of the vars that
are necessary in hidden vars, and has HTML, PHP, and a handful of JS.
 
Thanks!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] refreshing PHP on onClick

2002-05-16 Thread Leotta, Natalie (NCI/IMS)

It's all in a password protected site because the data's all confidential at
this point in time, but I can give you a mental picture.  

There are a bunch of dropdowns - State, Cancer, Sex, Race, Age.  We're
drawing a graph of best fit lines - up to 5 allowed on the graph, then we
start over replacing them.  We don't draw the actual data points unless the
user clicks on a checkbox.  They want that checkbox to be instant
gratification, without making the user refresh.  I just want a way to make
it do the refresh (and let me change that one variable, so it draws the
points or doesn't draw the points), but not a full submit because that would
add another line to the graph.

I'm sorry I can't send you the URL at this stage of the game.  it should be
up and running this summer though :-)

Thanks for any help you can give me!!

-Natalie

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 16, 2002 3:56 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] refreshing PHP on onClick


Leotta, Natalie (NCI/IMS) wrote:
 
 This might be a little bit JS and a little bit PHP.  I'm wondering if 
 there's an easy way to refresh a PHP page on an onClick and change 
 one parameter (say someone wants to redraw the graph, but with the 
 points).  I don't want to pay attention to any of the other parameters 
 that could have changed on the screen (we've got a bunch of selects).  
 We had come up with a really complicated way which involved changing 
 the parameters to the most recent line drawn, deleting the most recent 
 line, and then submitting with those parameters and the showPoints 
 value changed, but that sounds pretty complicated.
 
 If anyone could come up with a quicker way that didn't involve the 
 whole submitting thing, that would be easier.  My page has all of the 
 vars that are necessary in hidden vars, and has HTML, PHP, and a 
 handful of JS.

You wouldn't happen to have a demo would you? A visualization would help me
a lot.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] refreshing PHP on onClick

2002-05-16 Thread Leotta, Natalie (NCI/IMS)

This sounds like it might work.  Thanks for your help!!  I knew there had to
be a better way than what my coworkers came up with :-)

-Natalie

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 16, 2002 4:09 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] refreshing PHP on onClick


Leotta, Natalie (NCI/IMS) wrote:
 
 It's all in a password protected site because the data's all 
 confidential at this point in time, but I can give you a mental 
 picture.
 
 There are a bunch of dropdowns - State, Cancer, Sex, Race, Age.  We're 
 drawing a graph of best fit lines - up to 5 allowed on the graph, then 
 we start over replacing them.  We don't draw the actual data points 
 unless the user clicks on a checkbox.  They want that checkbox to be 
 instant gratification, without making the user refresh.  I just want a 
 way to make it do the refresh (and let me change that one variable, so 
 it draws the points or doesn't draw the points), but not a full submit 
 because that would add another line to the graph.

Since you're already using javascript... you could try generating 2 images
at the same time, one with the data points drawn, the other without, then
using the same technology as for javascript rollovers, you could replace the
image when the onClick event is caught. Instant gratification, and no messy
varable replacements.

 I'm sorry I can't send you the URL at this stage of the game.  it 
 should be up and running this summer though :-)

No problem, completely understandable :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ImageLines with styles

2002-05-13 Thread Leotta, Natalie (NCI/IMS)

Hello.  I'm drawing line graphs and for each line they want a different
style (dots, dashes, etc.).  I can't find a way to make the line draw
thicker than normal, and the regular thickness isn't thick enough.  I've
tried drawing 3 lines next to each other, which works fine with solid lines,
but it looks pretty bad with the styles on because the ends don't all end in
the same place.  
 
Does anybody know of a better way to draw thicker lines?
 
Thanks!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] ImageLines with styles

2002-05-13 Thread Leotta, Natalie (NCI/IMS)

Thank you so much!  I'd looked all over, but apparently not in the right
places.

Thanks again!!

-Natalie

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 13, 2002 4:32 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] ImageLines with styles


http://www.php.net/manual/en/function.imagesetthickness.php

On Mon, 13 May 2002, Leotta, Natalie (NCI/IMS) wrote:

 Hello.  I'm drawing line graphs and for each line they want a 
 different style (dots, dashes, etc.).  I can't find a way to make the 
 line draw thicker than normal, and the regular thickness isn't thick 
 enough.  I've tried drawing 3 lines next to each other, which works 
 fine with solid lines, but it looks pretty bad with the styles on 
 because the ends don't all end in the same place.

 Does anybody know of a better way to draw thicker lines?

 Thanks!

 -Natalie


 Natalie S. Leotta
 Information Management Services, Inc.
 (301) 680-9770
 [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] $this-

2002-04-29 Thread Leotta, Natalie (NCI/IMS)

Hi, Steve.  

$this refers to a specific instance of a class.  The - accesses a property
or method associated with this class.

So, in your class, say it's class car, and in your constructor you want to
initialize the color to red, you'd do 
$this-color = $red;

Outside of the class, with your $car variable, you'd change it by using 
$car-color = $red;

It's similar to the Java . accessor (and the this is also similar to
Java's this).

I hope this helped!

-Natalie

-Original Message-
From: Steve Buehler [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 29, 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] $this-


I am not an expert at PHP and have been learning it through questions, 
books, online help, etc  I guess like most people. :)  Anyway, I see a 
lot of scripts that use $this-something and was wondering if this was just 
another variable or if the - has any special meaning.  One script from 
the PHPLIB (menu.inc) has this:
$this-setup();
and there are no other times in that .inc file that lists that.  The only 
other thing that comes close is just the funtion setup().  This is not 
the only program that I see this in and am just wondering about it and 
trying to see if it is something that I should be using in my scripts.  The 
only time that I use this is when getting results from a mysql query like
this:
$result=mysql_query(SELECT $team from games where game_id =
'$game_id');
while (($row = mysql_fetch_object($result))){
$input = $row-$team;

Hopefully somebody can explain this to me.

Thanks in Advance
Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] javascript and PHP

2002-04-29 Thread Leotta, Natalie (NCI/IMS)

This is what I do in one of my programs.  I set hidden values in my HTML and
then JS can access them, change them, and then when the form is submitted
(JS can do that too if you want it to be automatic) the PHP reads in the
hidden values.

-Natalie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 29, 2002 11:40 AM
To: [EMAIL PROTECTED]; Steve Buehler
Subject: Re: [PHP] javascript and PHP


All you can do is use PHP to print out Javascript code.

?
$data = hello world;
?
script language=javascript
var something;
something = '?=$data?';
/script

etc...It's no different than using PHP to print out HTML code.

Now, if you want to get that Javascript variable something sent back to
PHP, you have to assign it to a form element or tack it onto a URL.

---John Holmes...

- Original Message -
From: Steve Buehler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 11:29 AM
Subject: [PHP] javascript and PHP


 Does anybody know of a good/short tutorial about passing variables 
 from JavaScript to/from PHP?  For example, how to do the following:

 html
 head
 SCRIPT LANGUAGE=JavaScript
 data = hello world;
 /script
 /head
 body
 ?
 echo $databr;
 ?
 /body
 /html

 The above might at least give me a clue.  Just a note.  I really know 
 nothing to speak of about JavaScript.

 Thanks in Advance
 Steve



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] passing vars. betn. php and javascript

2002-04-26 Thread Leotta, Natalie (NCI/IMS)

Is there any reason that you have to use JS to redo the array?  I did
something like this once and had the buttons monitored by JS, then when you
click it set a hidden var (with a name like sort) and submitted the page.
Then my PHP read in everything and redrew the graph based on what we were
sorting by.  It wasn't as difficult as it sounds - the only problem was they
decided that it wasn't pertinent to that graph, so we aren't using it
anymore.  I don't know if I have any of the code left.

-Natalie

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 26, 2002 1:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] passing vars. betn. php and javascript


On Saturday 27 April 2002 01:23, Pushkar Pradhan wrote:
 In my php I had 4 buttons, up, down, top and bottom:
 After detecting which element and which button was clicked I changed 
 the element position by using array_slice, shift, unshift, array_merge 
 etc.. I'm not sure what I'll do it JS

Well, depending on how you were reordering the array I was going to suggest 
you use php. Since you already have a version in php and you want to do it
in 
javascript then ...

   I've never written javascript? Thanks,

I suggest you learn some javascript then think about how to pass an array 
to it from php :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
The profession of book writing makes horse racing seem like a solid, stable
business.
-- John Steinbeck
[Horse racing *is* a stable business ...]
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] using transparent images in a style

2002-04-25 Thread Leotta, Natalie (NCI/IMS)

Hi.  I'm trying to make lines based on dots and dashes and I need the colors
in the middle to be transparent.  This is all done within a class, that's
why there are $this-s all over.
 
$t = ImageColorAllocate($this-im,1,1,1);  
$this-trans = ImageColorTransparent($this-im,$t);
$this-style =
array($this-color,$this-trans,$this-color,$this-trans,$this-trans,$this
-trans,$this-trans,$this-trans);
ImageSetStyle($this-im, $this-style); 
 
//these are all defined and it is drawing the line, just not doing the
transparencies
ImageLine($this-im,($widthPoint+(($indexstart)*$this-xscale)),$starty,($wi
dthPoint+(($indexend)*$this-xscale)),  $endy,  IMG_COLOR_STYLED);
 
I got this code out of the manual and I also tried using
IMG_COLOR_TRANSPARENT instead of $this-trans in the style array.  
 
Not only do I not get any form of a dotted or dashed line (I added all those
transparents so I could see openings in the line) but the line color changed
from a tealish green to a sick green.  I'm using ImageCreate instead of
ImageCreateTrueColor.  
 
Has anyone run into similar problems?  Thanks!
 
-Natalie

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] using transparent images in a style

2002-04-25 Thread Leotta, Natalie (NCI/IMS)

More info in case this helps:

I tried taking out the transparencies and changing the $this-trans to
$this-black and I'm still getting a solid line of the wrong color green
(the correct green is in a different place, so it's obvious this is wrong).
Do you think that if I included the picture as a .bmp it would help?

-Original Message-
From: Leotta, Natalie (NCI/IMS) 
Sent: Thursday, April 25, 2002 10:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] using transparent images in a style


Hi.  I'm trying to make lines based on dots and dashes and I need the colors
in the middle to be transparent.  This is all done within a class, that's
why there are $this-s all over.
 
$t = ImageColorAllocate($this-im,1,1,1);  
$this-trans = ImageColorTransparent($this-im,$t);
$this-style =
array($this-color,$this-trans,$this-color,$this-trans,$this-trans,$this
-trans,$this-trans,$this-trans);
ImageSetStyle($this-im, $this-style); 
 
//these are all defined and it is drawing the line, just not doing the
transparencies
ImageLine($this-im,($widthPoint+(($indexstart)*$this-xscale)),$starty,($wi
dthPoint+(($indexend)*$this-xscale)),  $endy,  IMG_COLOR_STYLED);
 
I got this code out of the manual and I also tried using
IMG_COLOR_TRANSPARENT instead of $this-trans in the style array.  
 
Not only do I not get any form of a dotted or dashed line (I added all those
transparents so I could see openings in the line) but the line color changed
from a tealish green to a sick green.  I'm using ImageCreate instead of
ImageCreateTrueColor.  
 
Has anyone run into similar problems?  Thanks!
 
-Natalie

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] dynamic drop down

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

Do you want to submit every time the dropdown changes?  If you just want the
second dropdown to update and don't want a submit, let me know.  I am doing
this in one of my programs and I can send you some code if you think it
would help. 

Ex of my program:
We want to show populations.  There's a state box and when you select a
state then the county box fills up with counties for that state (along with
an Entire State option).  We have them set up using boxes that are 3 tall,
I think (maybe 5).  For some reason it didn't work as well when we did
regular dropdowns, so this was our current workaround.  We use onload in the
body tag, onchange in the state box tag, and use a JS method to populate the
second dropdown.

Good luck!

-Natalie

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 10:02 AM
To: Kunal Jhunjhunwala
Cc: php-list
Subject: Re: [PHP] dynamic drop down



On Tuesday, April 23, 2002, at 07:01  AM, Kunal Jhunjhunwala wrote:

 I am trying to make a drop down list such that, when some one selects 
 an option, it refreshs and displays the option on the same page. There 
 are a couple of things already in the URL [ the query string ], which 
 need to remain there. How would I do this easily?

First, you need to use JavaScript (I think the onchange handler) to 
automatically submit the form when the user selects an option from the 
dropdown list.  That's no big deal.

But to maintain the querystring, you will need to do a bit of 
finagling -- but it's nothing hard.  You could either use 
$_SERVER['QUERYSTRING'] and place the value of this variable into a 
hidden form field, or you could do a foreach ($_GET) and concatenate the 
results into a string and place that into a hidden form field.

If you aren't sure what I'm talking about I can write up an example.


Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

Does it show the message and the form or just the message?

-Natalie

-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question



 If and else expect to be followed by exactly 1 statement. To aggregate 
 multiple statements as one, surround them with {curly braces}. I'm 
 guessing you didn't do that, and you're seeing the execution of all 
 but the first of the statements following the else.

 So it should be:

   if ($var1)
 echo can't be found;
   else
   {
 echo first line of form;
 echo second line of form;
   }
This is what I have:

if($quantity  1)
{
echo Sorry I can't seem to locate this item;
}
else
{
do this
}
So yes I have done exactly as you have stated and it still shows the form.

Jennifer


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] If else question

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

My officemate and I talked about this and the only thing he could come up
with was a possible problem with your parser.  Are you using a beta version
or something unusual?  I don't know if you have a way to know this - the
programmers didn't set up PHP where I work, but I know our web server is
apache and it's on a unix box.  I've never run into this problem before.
Have you had it happen in other programs?  Have you ever used this code in
another program?  If it's consistently incorrect then it may be a problem
with your parser.  That's not really my area of expertise, but it's
something you could look into if no one else has any better ideas :-)

-Natalie

-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 12:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question


It shows both.

Natalie Leotta [EMAIL PROTECTED] wrote in message
7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG">news:7546CB15C0A1D311BF0D0004AC4C4B0C024ABFC3@SSIMSEXCHNG...
 Does it show the message and the form or just the message?

 -Natalie

 -Original Message-
 From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 23, 2002 12:23 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] If else question



  If and else expect to be followed by exactly 1 statement. To 
  aggregate multiple statements as one, surround them with {curly 
  braces}. I'm guessing you didn't do that, and you're seeing the 
  execution of all but the first of the statements following the else.
 
  So it should be:
 
if ($var1)
  echo can't be found;
else
{
  echo first line of form;
  echo second line of form;
}
 This is what I have:

 if($quantity  1)
 {
 echo Sorry I can't seem to locate this item;
 }
 else
 {
 do this
 }
 So yes I have done exactly as you have stated and it still shows the 
 form.

 Jennifer


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] arrays in a class

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

Do I have to do anything different to access an array in a class?  I have 
 var $apcs = array(); 
at the top of my class
 
I set it using 
 $line1-adj_array[$pos] = (integer) $value;
in the read-in part of the app that uses the class ($line1 is the object,
$pos is just a number)
 
Later on in the class I try to do this:
ImageString($this-im,1,65,5,apcs[0] = $this-apcs[0],$this-black);
and it prints out
apcs[0] = Array[0]
 
I've never had this happen before - I've always accessed members of an array
by using the square brackets?  I also tried [0][0] but that didn't work
either.  Can anyone see what I might be doing incorrectly?
 
Thanks!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] arrays in a class

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

Wow.  Now I'm feeling dumb...  It does work with my non-array vars though -
I guess laziness caught me.

Thanks!!

-Original Message-
From: Alexander Skwar [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 4:36 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] arrays in a class


»Leotta, Natalie (NCI/IMS)« sagte am 2002-04-23 um 16:27:46 -0400 :
 ImageString($this-im,1,65,5,apcs[0] = 
 $this-apcs[0],$this-black);

Hm, try to use proper syntax here, ie:

ImageString($this-im,1,65,5,apcs[0] =  .
$this-apcs[0],$this-black);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 51 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] arrays in a class

2002-04-23 Thread Leotta, Natalie (NCI/IMS)

I'm just glad it's working!  It's hard to debug when you can't see what's in
the arrays :-)  The {} way is definitely not as nice looking - at least this
way when some other poor soul works with my code they have a chance at
understanding what was going on!

Thanks again!

-Natalie

-Original Message-
From: Alexander Skwar [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 4:45 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] arrays in a class


»Leotta, Natalie (NCI/IMS)« sagte am 2002-04-23 um 16:37:37 -0400 :
 Wow.  Now I'm feeling dumb...  It does work with my non-array vars 
 though -

Yes, it doesn't suprise me that it works with non arrays.  The parser
doesn't seem to be clever enough to catch that you want to pass [0] as the
array index to the class var apcs of $this.  Instead of doing it the way I
just suggested, you could have also done {$this-apcs[0]}, I think.  I
seem to remember that this also should be possible - but IMO that's even a
lot more broken than my way and I've never used it.

 Thanks!!

np

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 58 minutes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ImageCreate v. ImageCreateTrueColor

2002-04-22 Thread Leotta, Natalie (NCI/IMS)

Hello,
 
I'm making an Image and I was wondering what the difference is between these
two Image constructors.  I need to find a way to make dotted and dashed
lines (according to different patterns I've been given) and I want the
sections between the dots to be transparent.  I'm planning on using the
ImageSetStyle function.  From what I read on PHP.net, some things cannot be
used with ImageCreateTrueColor, but it looks like some can only be used that
one. 
 
One thing I'm interested in is the constant IMG_COLOR_TRANSPARENT - can this
be used with ImageCreate?  
 
Is there a reason I should use one of the constructors over the other?
 
Thanks!
 
-Natalie
 

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

 



RE: [PHP] if elseif else

2002-04-19 Thread Leotta, Natalie (NCI/IMS)

You can use as many elseifs as you need.  I'm not sure how it affects
performance, but it works (I have one that goes through all 50 states).

-Natalie

-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 19, 2002 10:02 AM
To: PHP
Subject: [PHP] if elseif else


I redoing some code, and the original author has code like

if
elseif
elseif
elseif
else

I have always known it to have just one elseif, not multiple ones. I was
going to move it to a switch/case, but there is no common switch. So I
wanted to know if its technically ok, or just ok to use multiple elseif

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] file delete...

2002-04-17 Thread Leotta, Natalie (NCI/IMS)

According to this, you should actually use unlink, but delete is available.

http://www.php.net/manual/en/function.delete.php

-Natalie

-Original Message-
From: jas [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 17, 2002 4:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP] file delete...


How can I delete a file in php?
thanks in advance,
Jas



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php