[PHP] mousyu

2004-05-26 Thread Curtis Pratt

skyward quash obsolescent menopause capacious bum ringside stripy ministry deleterious 
prepare chou buttress  truism coronate summate dominion absorptive bookshelves 
humidify spew dogma bob cufflink cosmology guthrie sainthood emily dynamism heat levin 
sleepy yon addison bijection cognizant  redemptive piracy macroscopic insulin breech 
upland kiowa ostentatious pershing hillel ripple custer cyclic impetuous diem white 
preparatory consecrate ran indiscretion cavalier dee  bullfrog position bacillus 
discomfit sorenson wilsonian volatile chiton mcintosh snappy chamfer stegosaurus 
anchorage diminish cohen meliorate salesian wave executor pupate idiomatic stung 
conrail effusion pull makeup philharmonic  conclude pewter infer orgasm float cady 
comic seduce bowie glacier bituminous postoperative du consist do kelsey postprocess 
mud infancy maltreat multiplicity quotation bury infertile polynomial seed  win 
adrienne skopje hiroshima diabase gore oceanography ana epistemology blockage czar 
acquire traumatic stigma maladaptive electrode bacterium silo thicket memorable 
auberge baseplate colossus eukaryote electrolyte shovel 
akin black giblet bowditch slug cowpea furthermost wronskian haley dungeon captaincy 
cool blackjack fitzroy sequoia fibrosis horology amphibious gold mispronunciation 
irishman puffed tiger combination agnes venom amicable approximable starve carney 
cornerstone callous betrothal lucas valentine cafeteria itself elicit irrational shirt 
buckaroo low subtrahend conner dieldrin thank bronchitis moluccas rutherford 
biconnected sandpaper shaft wayne  puke selenate rim sombre lim childish benedict 
author transmitting collocation diamagnetism franz curdle classic damsel infrared lisp 
pythagorean friedrich nanking chordate durward towel salesmen ewe  dolores blackout 
bleak arrowhead strabismic aurochs brunhilde contradictory broach coherent hap 
impedance bittern enormity sorenson amend credulous elegiac document cantilever steppe 
morphine plebian ruthless expressway  corpulent metabole reversion aiken brookline 
deform cashew embedder paz waddle brickbat ann conrad retch shrinkage streetcar inside 
hemorrhage shoot fauna controvertible polariton wood splotchy exaggerate downs 
brownian trudge loincloth embargo hate halsey abe eben diagrammatic aida whereby  
penny hogging turban vigilante wheat sinewy howsomever drub muzo potts apothecary joss 
liquid antares bite loaves manhole truancy rattlesnake evaporate nineteen dubious 
greenware ferromagnetism gabardine sash gee precipitable nonchalant eject caution 
chlorine doll look de edt mudsling  bryn arrack infamy seedy holocene gimpy goodrich 
benchmark emerald spongy inbred inadequate jonquil knives jog dense 
registrable raft calfskin claude daffodil talc petite syllabus sworn stall beadle 
ampere automotive normative nodal predilect shoot ti threw precipitous way cyril 
holocaust perturb contravention buttonhole lyricism saxon altitude nostrand asymmetry 
french pad ghetto ankle chipboard emanate buzzword budgetary teflon  sisal sterno 
hater abbreviate oxonian corpse endogamy dignify implement incontrollable clan fraud 
obstacle electrophorus cuisine honk incombustible padre  murk barstow constant 
screwball youthful anvil consanguineous entice emory bolivar proprioception venerate 
giggle bellhop eastwood hydrophobia sundial diffractometer hypocritic kalmia loop rue 
psychoanalytic patchy sloe inoperable alison  flowerpot mailman paymaster bella 
sawfish estimate euler calligraphy quandary friction schubert blew ignore annunciate 
redmond ullman izvestia lithe vendible spearmint teeter protestation lydia sarasota 
coward bialystok filibuster soften  conch budgetary clank dixie lowe pacifism bam 
inverse celebrant nyc codpiece spat vortices hoot whit habeas fusty magnesite burly 
thunderclap blanche adduce butadiene curtsey nouveau bluebill bud buckwheat 
autotransformer pugnacious cathedral bedim stifle contiguous psychotic culpable hot  
mixup groundsel berea committeeman paragraph spherule triplex fortunate colonel 
acclimate blandish calculable basil cryptanalyze main eject willful flew anamorphic 
purgative rectangular spicy biotic wretch chlorine ideate christendom  someone bookish 
flinty cluster servo advisable dinghy diagnoses bamberger burma buteo architectonic 
copernican davy disburse pluggable quote whale enrico decomposition rip garland 
resistible len luminescent equestrian askew commonwealth entire workforce digest 
emotion  
owens throw hangmen hoosier herald venereal affluence banks dine tachinid canton 
natalie chelate foxtail hairy preservation pulse whirligig cindy sieve swigging 
craftsmen awaken mrs digitate headstrong congressional candidacy cushing shop 
alternate raster liverpudlian bruit oracle tint bogus  sixteenth vitreous alphabet 
night indecent indubitable calcium breathtaking certitude circlet daredevil deathward 
accredit braille dod orkney rheumatic pore pabst keys sire flowerpot genie stretch 

Re: [PHP] Re: test

2004-05-26 Thread Craig
Yeah those damn email always come at same time.
Well on my blocked list now.


"Jordi Canals" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sherri wrote:
> > Woah!
> >
> > Signed up litterally 1 minute ago and I'm already getting spam. From
> > "Advance Credit Suisse Bank"
> >
> Just wait. There are some more waiting for you ;) You should receive the
> "Information Desk" and "Ingram Computer Services" mails yet.

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



Re: [PHP] Re: test

2004-05-26 Thread Oliver Hankeln
Craig wrote:
Yeah those damn email always come at same time.
Well on my blocked list now.
This is only helping the Symptom. Why not solve the Problem?
The mails you got are auto-replies. Unfortunatley I didn't find a person
responsible for this [EMAIL PROTECTED] but perhaps such a person 
is reading the list?
Can you please kick these adresses from the mailing list? At least for
Advance Credit Suisse Bank and Information Desk the mailboxes are full, 
so comlaints do only get another auto-response.

Oliver
P.S. If you know the responsible person - please post the email here. I 
will then contact him/her.

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


[PHP] nested URLs

2004-05-26 Thread Marco Bleeker
Hello, I've bumped upon a problem. I would like to send an URL as variable
in the URL to a php file. But what if the URL in the variable is itself a
PHP file with variables?

It does work when I post them from a form. This form has only hidden fields,
and looks a bit akward. Is there a way to directly put them in the URL of a
link?

The form looks like this:







Please note the double definition of the ln variable (language, it sends
"NL" for Dutch language; the first one to mview.php and the second one to
mail1.php). How to put this directly in parameters to mail1.php?

Thanks, Marco (please also reply to my own email adress)

www.ecocam.com
Marco Bleeker, Amsterdam, NL.
Please regard my email address as confidential - as I do with your's.

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

[PHP] Re: xml -> xslt -> xsl:fo -> pdf

2004-05-26 Thread hboyce
Hi

I'm afraid I don't know anything about the xml/xsl:fo part of the 
process but once you have the data in a usable form in your 
program you can use PDFLIB functions to create a pdf from it.  I 
have used it very successfully.  It does involve compiling libraries 
and you may well have to pay a license fee (although there are free 
but more complex options).  The following page gives info and links:
http://uk2.php.net/pdf

regards
Hilary Boyce

On 24 May 2004 at 18:53, juan vazquez wrote:

> Hi,
> 
> 
> 
> I am trying to transform a xsl:fo file to pdf.
> 
> 
> 
> I generate xml files from mysql and I can convert them to xsl:fo using
> xslt but I can't find information for the last step (XSL:FO to PDF)
> 
> 
> 
> I just know that a formatter is needed but all what I found where
> java, jade or .net based solutions.
> 
> 
> 
> is there any 100% php solution for this problem?.
> 
> Environment: Apache 2.0.47, PHP 4.3.2, mysql 4.0.13 running on WXP
> 
> 
> 
> Thanks a lot in advance for your help
> 

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



Re: [PHP] nested URLs

2004-05-26 Thread Jeroen Serpieters
On Wed, 26 May 2004, Marco Bleeker wrote:

>
> 
> 
>  
> 
>
> Please note the double definition of the ln variable (language, it sends
> "NL" for Dutch language; the first one to mview.php and the second one to
> mail1.php). How to put this directly in parameters to mail1.php?
>
> Thanks, Marco (please also reply to my own email adress)
>
> www.ecocam.com
> Marco Bleeker, Amsterdam, NL.
> Please regard my email address as confidential - as I do with your's.
>
>

> VALUE="www.ecocam.com/mview.php?id=">

Pass the url to url_encode and that should do it to pass it succesfully to
your other page.

echo "http://www.ecocam.com/mview.php?id={$id}"; . ( $ln == 'NL' ? '&ln=NL' : ''  
) ) . "\">Link";


-- 
Jeroen

Like the creators of sitcoms or junk food or package tours, Java's designers were 
consciously designing
a product for people not as smart as them.
-- Paul Graham

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



[PHP] ISP proxy caching major pain

2004-05-26 Thread strategies
Hi,
I know this is a perennial problem but believe me i have googled and
tried various solutions
I've encounter many bb isps doing proxy caching that i cant get around.
That is i want to completely avoid caching.
I have tried all the header stuff ,both php headers and html headers.
Nothing works.
The only thing that does work is the old random number at the end of the url.
Is there anything i can do - with apache maybe.

php 4.3.6
apache 2.0.46
whiteboxlinux 3.0

Thanks,
adrian murphy

Re: [PHP] PHP Only directory

2004-05-26 Thread Burhan Khalid
Erik Meyer wrote:
Greetings,
I am fairly new at this and I am going to create my first web server.  I
have installed PHP as the documentation says and the only question that I
have is whether or not PHP can be configured on a single directory only,
(example mydomain.com/php/). The server that I am running on is Red Hat
Linux 9.
Yes it can.
You can turn off the php engine globally, and only activate it in the 
directory that you want.

php_flag engine 0 //Turn php off
php_flag engine 1 //Turn php on
http://www.php.net/configuration.changes
http://www.php.net/manual/en/function.ini-set.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] AW: xml -> xslt -> xsl:fo -> pdf

2004-05-26 Thread Vazquez, Juan
Thanks a lot for your help.
I don't think I will buy any licenses (it is for private use); but I have foun a 
workaround; I can convert txt to pdf by using FPDF ( http://www.fpdf.org/ )not a 100% 
XML based solution but it will work. I will wait until xsl:fo conversion to PDF 
possible is by using only php (mybe a future extension of Sablotron or something like 
this).

Anyway thanks a lot

Juan

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 26. Mai 2004 11:44
An: Vazquez, Juan; [EMAIL PROTECTED]
Betreff: Re: xml -> xslt -> xsl:fo -> pdf


Hi

I'm afraid I don't know anything about the xml/xsl:fo part of the 
process but once you have the data in a usable form in your 
program you can use PDFLIB functions to create a pdf from it.  I 
have used it very successfully.  It does involve compiling libraries 
and you may well have to pay a license fee (although there are free 
but more complex options).  The following page gives info and links: 
http://uk2.php.net/pdf

regards
Hilary Boyce

On 24 May 2004 at 18:53, juan vazquez wrote:

> Hi,
> 
> 
> 
> I am trying to transform a xsl:fo file to pdf.
> 
> 
> 
> I generate xml files from mysql and I can convert them to xsl:fo using 
> xslt but I can't find information for the last step (XSL:FO to PDF)
> 
> 
> 
> I just know that a formatter is needed but all what I found where 
> java, jade or .net based solutions.
> 
> 
> 
> is there any 100% php solution for this problem?.
> 
> Environment: Apache 2.0.47, PHP 4.3.2, mysql 4.0.13 running on WXP
> 
> 
> 
> Thanks a lot in advance for your help
> 

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



Re[2]: [PHP] Sessions simply do not work?

2004-05-26 Thread Tom Rogers
Hi,

Wednesday, May 26, 2004, 2:28:58 AM, you wrote:
MRW> On Tue, May 25, 2004 at 07:37:47AM +0100, Peter Risdon wrote:
>> Michael R. Wayne wrote:
>> 
>> >In my continuing efforts to actually get sessions to work, I upgraded
>> >to PHP 4.3.6 and apache 1.3.31.  This did not make the slighest
>> >difference.
>> >
>> >So, does ANYone have ideas of how to debug this?  Or is PHP simply
>> >broken and no longer able to maintain sessions?  
>> 
>> I've just been debugging some session problems. Successfully, but there
>> is something rather brittle in there somewhere 

MRW> It seems that people have forgotten last week's postings.  To recap:

MRW> Session support worked fine in 4.1.2.  It's broken in 4.3.4 and 4.3.6.

MRW> The relevant session variables are:
MRW>Session Support  enabled  (as per phpinfo)
MRW>session.auto_start   On or Off (makes no difference)
MRW>session.use_cookies  Off<- not using cookies
MRW>session.namePHPSESSID
MRW>session.use_trans_sidOff(trans_sid worked with forms in 4.1.2)
MRW>session.gc_maxlifetime  1440
MRW> Other things people have asked about:
MRW>   
MRW> url_rewriter.tags  a=href,area=href,frame=src,input=src,form=fakeentry


if your not using cookies you have to pass the sessionid in your form
as a hidden variable somewhere. Or maybe I missed it :)

-- 
regards,
Tom

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



[PHP] Getting the name of the Class

2004-05-26 Thread Lasse Cederström
Hello!

 

I have a problem that I hope someone can solve for me ;-)

 

I have two classes:

 

Class Test

{

Function Test()

{

print(“Hello Test”);

}

}

 

Class MyClass extends Test

{

Function Debug()

{

print(“Hello MyClass”);

}

}

 

>From my code I would like to make the following call: MyClass::Test(); -
This will obvious output “Hello Test”. But in the function Test::Test is
there anyway to know that MyClass::Test was called? I would like to get the
MyClass in a string, somehow. If other classes extended Test, it would be
that classes names.

 

Keep in mind that I don’t have an object to ask, since im just calling it
with MyClass::Test(), so $this will not work :-(

 

What I tried so far?

 

__CLASS__ This will return Test since its calling a function in the Test
class and not in MyCalss.

The use of $this – not working since im not calling it as an object, but to
the class directly.

 

 

Looking forward to someone poking me in the right direction :)

 

Lasse

 



[PHP] dynamic table

2004-05-26 Thread nabil
Hiya,

How can i draw a new  AFTER FIVE   in the following loop

(i want to echo the records in 5 columns width tables whatever the number of
records will be fetched)

..
echo '';

while ($myrow = mysql_fetch_array($sql))
{
echo $myrow[0];
}
echo '';


regards

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



Re[3]: [PHP] Sessions simply do not work?

2004-05-26 Thread Tom Rogers
Hi,

Wednesday, May 26, 2004, 10:21:57 PM, you wrote:

TR> if your not using cookies you have to pass the sessionid in your form
TR> as a hidden variable somewhere. Or maybe I missed it :)

TR> -- 
TR> regards,
TR> Tom


ok ignore me I found it
btw you can drop the ; it is not needed 

-- 
regards,
Tom

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



Re: [PHP] ISP proxy caching major pain

2004-05-26 Thread Curt Zirzow
* Thus wrote strategies ([EMAIL PROTECTED]):
> Hi,
> I know this is a perennial problem but believe me i have googled and
> tried various solutions
> I've encounter many bb isps doing proxy caching that i cant get around.
> That is i want to completely avoid caching.
> I have tried all the header stuff ,both php headers and html headers.

What headers did you try?


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] dynamic table

2004-05-26 Thread Steve Douville
echo '';
echo '';

while ($myrow = mysql_fetch_array($sql))
 {
echo '';
 echo $myrow[0];
echo '';
 }
echo '';
 echo '';

You did say you wanted 5 COLUMNS, not rows, in your table... right?

"nabil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hiya,
>
> How can i draw a new  AFTER FIVE   in the following loop
>
> (i want to echo the records in 5 columns width tables whatever the number
of
> records will be fetched)
>
> ..
> echo '';
>
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '';
>
>
> regards
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
- Original Message - 
From: "nabil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 26, 2004 8:28 AM
Subject: [PHP] dynamic table


> Hiya,
>
> How can i draw a new  AFTER FIVE   in the following loop
>
> (i want to echo the records in 5 columns width tables whatever the number
of
> records will be fetched)
>
> ..
> echo '';
>
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '';
>
>
> regards
>
> -- 
> 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] ISP proxy caching major pain

2004-05-26 Thread strategies
> * Thus wrote strategies ([EMAIL PROTECTED]):
> > Hi,
> > I know this is a perennial problem but believe me i have googled and
> > tried various solutions
> > I've encounter many bb isps doing proxy caching that i cant get around.
> > That is i want to completely avoid caching.
> > I have tried all the header stuff ,both php headers and html headers.
> 
> What headers did you try?
> 
> 
//php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 
header('Cache-Control: no-store, no-cache, must-revalidate'); 
header('Cache-Control: post-check=0, pre-check=0', FALSE); 
header('Pragma: no-cache'); 

//html



adrian

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



Re: [PHP] dynamic table

2004-05-26 Thread Richard Harb
$i = 0;
while ($myrow = mysql_fetch_array($sql)) {
  if (++$i % 5 == 0) echo '';
  ...

  
Note: if used repeatedly do not increment the $i again in the loop.

HTH
Richard


-Original Message-
From: nabil
Sent: Wednesday, May 26, 2004, 2:28:28 PM
> Hiya,

> How can i draw a new  AFTER FIVE   in the following loop

> (i want to echo the records in 5 columns width tables whatever the number of
> records will be fetched)

> ..
> echo '';

> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '';


> regards

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



[PHP] session & HTML target = "_blank" element

2004-05-26 Thread Hardik Doshi
Hi group,

I have discovered a strange behaviour while using
session. I have a page from which i am opening other
pages using target = "_blank" element. Now when i open
the child page, it doesn't get $_SESSION values. I
have tried to dump variable from $_SESSION and it
shows me the blank array. Does any one know this
strange behaviour?? Let me know if i am doing anything
wrong.

Thank you.

Regards,
Hardik Doshi





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



Re: [PHP] dynamic table

2004-05-26 Thread Curt Zirzow
* Thus wrote nabil ([EMAIL PROTECTED]):
> Hiya,
> 
> How can i draw a new  AFTER FIVE   in the following loop
> 
> (i want to echo the records in 5 columns width tables whatever the number of
> records will be fetched)
> 
> ..
> echo '';
> 
> while ($myrow = mysql_fetch_array($sql))
> {
> echo $myrow[0];
> }
> echo '';

Use the modulus (%) operator.

$columns = 5;// Human readable number
$new_row = $columns - 1; // the magic number
$html_row = '';  // Column buffer
$i = 0;  // Counter

echo '';

while (...) {

  $html_row .= "{$myrow[0]}";

  // $i % $columns sequence will be:
  //  0, 1, 2, 3, 4, 0, 1, 2, 3, 4 ...

  if ( ($i % $columns) == $new_row ) {

echo "$html_row";

$html_row = '';
$i++;
  }
}

// if we are on a sequence number other than zero
//  html_row will contain some columns.

if(($i % $columns) != 0) { 
  echo "$html_row";
}

echo '';



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Is PHP a good language to work with images?

2004-05-26 Thread Rui Silva
Hello!
 
I need to print an image file, but I'm having some problems. 
I have a handler to a printer witch I can print text correctly with the
printer_write function. 
I can also print an image if it is in bmp format (printer_draw_bmp),
however, I want to print png files.
 
$im = imagecreatefrompng($url)
$handler = printer_open("PATH_TO_PRINTER");
if($handler){
printer_write($handler,$im);
printer_close($handler);
}
else{
//ERROR
}
 
In this example I can't print, because printer_write function just
prints text.
How can I print an image file?
 
Thank you!
 


Re: [PHP] dynamic table

2004-05-26 Thread adrian murphy

>Hiya,
>
>How can i draw a new  AFTER FIVE   in the following loop
>
>(i want to echo the records in 5 columns width tables whatever the number
of
>records will be fetched)
>
>..
>echo '';
>
>while ($myrow = mysql_fetch_array($sql))
>{
>echo $myrow[0];
>}
>echo '';
>
>
>regards

$i = 1;
echo '' . "\n";
echo '' . "\n";

while ($myrow = mysql_fetch_array($sql)){

echo '' . $myrow[0]. "\n";

if ($i % 5 == 0){
echo "\n";
}

$i++;
}

$odd = ($i - 1)  % 5;
if ($odd){
echo ' ' . "\n";
}
echo '' . "\n";
echo '' . "\n";


adrian

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



[PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Brian Dunning
How do I check for the presence of an optional $_GET param without 
throwing a "Notice: Undefined index" when the param is not present?

Tried all three of these, they all produce the Notice when the param is 
not passed:

if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET['id'])
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Richard Davey
Hello Brian,

Wednesday, May 26, 2004, 4:01:30 PM, you wrote:

BD> How do I check for the presence of an optional $_GET param without
BD> throwing a "Notice: Undefined index" when the param is not present?

BD> Tried all three of these, they all produce the Notice when the param is
BD> not passed:

BD> if ($_GET['id'])
BD> if ($_GET['id'] != "")
BD> if (isset $_GET['id'])

if (isset($_GET['id']))
{
   $id = $_GET['id'];
}

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] dynamic table

2004-05-26 Thread adrian murphy


>
> >Hiya,
> >
> >How can i draw a new  AFTER FIVE   in the following loop
> >
> >(i want to echo the records in 5 columns width tables whatever the number
> of
> >records will be fetched)
> >
> >..
> >echo '';
> >
> >while ($myrow = mysql_fetch_array($sql))
> >{
> >echo $myrow[0];
> >}
> >echo '';
> >
> >
> >regards
>
> $i = 1;
> echo '' . "\n";
> echo '' . "\n";
>
> while ($myrow = mysql_fetch_array($sql)){
>
> echo '' . $myrow[0]. "\n";
>
> if ($i % 5 == 0){
> echo "\n";
> }
>
> $i++;
> }
>
> $odd = ($i - 1)  % 5;
> if ($odd){
> echo ' ' . "\n";
> }
> echo '' . "\n";
> echo '' . "\n";
>
>
> adrian

sorry the $odd bit at the end aint right but you get the idea.

adrian

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



Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread John W. Holmes
From: "Brian Dunning" <[EMAIL PROTECTED]>

> How do I check for the presence of an optional $_GET param without 
> throwing a "Notice: Undefined index" when the param is not present?
> 
> Tried all three of these, they all produce the Notice when the param is 
> not passed:
> 
> if ($_GET['id'])
> if ($_GET['id'] != "")
> if (isset $_GET['id'])

if(isset($_GET['id']))

or

if(!empty($_GET['id']))

depending upon what you want to do.

---John Holmes...

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



[PHP] clearing new pages

2004-05-26 Thread michael young
Hi,
a file called a.php prints "hello" to the browser then calls b.php 
which prints "goodbye" to the browser.
the output looks like this:

hello
goodbye
how do I clear the screen so the end results looks like this:
goodbye
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How do I use RewriteEngine for similar parameters?

2004-05-26 Thread Jake Johnson
Hello,
I am trying to use the RewriteEngine for the following two lines.  One has one 
parameter and the other has two?

http://www.plutoid.com/index.php?show=semi
http://www.plutoid.com/index.php?prd_id=5248&show=semi

Thanks in advance!
-- 
Jake Johnson
http://www.plutoid.com

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



Re: [PHP] clearing new pages

2004-05-26 Thread Jake Johnson
On Wed, May 26, 2004 at 11:20:33AM -0400, michael young wrote:
> Hi,
> a file called a.php prints "hello" to the browser then calls b.php 
> which prints "goodbye" to the browser.
> the output looks like this:
> 
> hello
> goodbye
> 
> how do I clear the screen so the end results looks like this:
> 
> goodbye
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
Try using redirect to b.php
-- 
Jake Johnson
http://www.plutoid.com

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



[PHP] combining string values

2004-05-26 Thread Tommy Atherton
hi
 
I have a problem, I'm trying to combine the value of two strings
together into a final string. For example
 
$path = '/tmp/photos/';
$filename = 'pic1.jpg';
 
$finalvalue = $path + $filename; (I know that the + is not used its
there for explanation only)
 
The value for path will remain constant (for the time being at least
although) but the value for filename will be read from a database so
that will change.
 
Anyone care to help???
 
thanks in advance
 
Tommy
 
 


Re: [PHP] How do I use RewriteEngine for similar parameters?

2004-05-26 Thread raditha dissanayake
Jake Johnson wrote:
Hello,
I am trying to use the RewriteEngine for the following two lines.  One has one parameter and the other has two?
 

You might want to try an apache group. And you might want to read the 
manual, particularly  the examples before you post in an apache group.

http://www.plutoid.com/index.php?show=semi
http://www.plutoid.com/index.php?prd_id=5248&show=semi
Thanks in advance!
 


--
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] combining string values

2004-05-26 Thread "Miguel J. Jiménez"
$finalvalue = $path.$filename;
Tommy Atherton wrote:
hi
I have a problem, I'm trying to combine the value of two strings
together into a final string. For example
$path = '/tmp/photos/';
$filename = 'pic1.jpg';
$finalvalue = $path + $filename; (I know that the + is not used its
there for explanation only)
The value for path will remain constant (for the time being at least
although) but the value for filename will be read from a database so
that will change.
Anyone care to help???
thanks in advance
Tommy


---
avast! Antivirus: Mensaje ENTRANTE limpio.
Base de datos de Virus (VPS): 0422-0, 25/05/2004
Fecha: 26/05/2004 17:57:17

 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How do I use RewriteEngine for similar parameters?

2004-05-26 Thread Matt Matijevich
[snip]
I am trying to use the RewriteEngine for the following two lines.  One
has one parameter and the other has two?
[/snip]

this is more of an apache question you could get better answers on an
apache list
http://httpd.apache.org/docs/misc/rewriteguide.html 

just check the first for prd_id first

RewriteCond %{REQUEST_URI} prd_id #you could probably get a better test
expression 
rewrite your url

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



[PHP] Compiling PHP on a Itanium 64bits

2004-05-26 Thread Toze Araujo



Does anybody knows how can i compile (or get a 
compiled binary) for php that works on a Itanium runing on a Windows Server @ 64 
bits?
 
I try searching for a gcc version for the Itanium 
processor but i couln't found any avaliable, does anybody know were i can find 
any compiler that works?
 
Thanks.
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamic table

2004-05-26 Thread Daniel Clark
Very slick Richard.

>>$i = 0;
>>while ($myrow = mysql_fetch_array($sql)) {
>>  if (++$i % 5 == 0) echo '';
>>  ...
>>
>>  
>>Note: if used repeatedly do not increment the $i again in the loop.
>>
>>HTH
>>Richard

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



Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Daniel Clark
if (isset( $_GET['id']))

>>How do I check for the presence of an optional $_GET param without 
>>throwing a "Notice: Undefined index" when the param is not present?
>>
>>Tried all three of these, they all produce the Notice when the param is 
>>not passed:
>>
>>if ($_GET['id'])
>>if ($_GET['id'] != "")
>>if (isset $_GET['id'])
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>




[PHP] File Upload within form

2004-05-26 Thread Tom Chubb
I am trying to design a custom form script and I've stumbled across a small
problem.
I want to implement a file upload into the form, but rather than posting to
another file I want to refresh the form and then show that there has been a
file uploaded.

I know about changing the form action to:


But, what do I need to change to update the script?
I'm a newbie, but trying hard to learn!

Thanks in advance for any help.

Tom










/n");
print("File size: $file_size bytes/n");

if(copy($file, "$path/$filename")){
print("Your File was uploaded successfully");
}else{
print("ERROR, your file was not successfully uploaded");
}
unlink($file);
}
?>

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



[PHP] Re: session & HTML target = "_blank" element

2004-05-26 Thread Torsten Roehr
"Hardik Doshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi group,
>
> I have discovered a strange behaviour while using
> session. I have a page from which i am opening other
> pages using target = "_blank" element. Now when i open
> the child page, it doesn't get $_SESSION values. I
> have tried to dump variable from $_SESSION and it
> shows me the blank array. Does any one know this
> strange behaviour?? Let me know if i am doing anything
> wrong.


Are you using cookies? If not you have to pass the session id via GET to the
new page:

link

Regards, Torsten

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



[PHP] PHP Portlet API / Development ?

2004-05-26 Thread [-^-!-%-

I was wondering, are any of you working on a Portlet development with PHP?
Or, are you aware of any projects projects using Portlets? Any online
references? Any plans for Portlet support in PHP?

Please let me know.

Any references would be greatly appreciated.
_john

=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

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



[PHP] Re: File Upload within form

2004-05-26 Thread Torsten Roehr
"Tom Chubb" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to design a custom form script and I've stumbled across a
small
> problem.
> I want to implement a file upload into the form, but rather than posting
to
> another file I want to refresh the form and then show that there has been
a
> file uploaded.
>
> I know about changing the form action to:
>  id="form">
>
> But, what do I need to change to update the script?
> I'm a newbie, but trying hard to learn!
>
> Thanks in advance for any help.
>
> Tom
>
>
> 
> 
> 
> 
> 
> 
>
>
>  file://FILE UPLOAD SCRIPT
> $file = $_POST[file];
> $path = "/relative/directory/to/file"; file://SET THIS TO THE RELATIVE
PATH FROM
> WHERE THE SCRIPT IS TO WHERE THE FILE SHOULD BE UPLOADED TO,
>
> if($file){
> print("File name: $file_name/n");
> print("File size: $file_size bytes/n");

This should be:

if (isset($_FILES) && isset($_FILES['spec'])) {

echo 'File name: ' . $_FILES['spec']['name'] . '';
echo 'File size: ' . $_FILES['spec']['size'] . ' bytes';

}

>
> if(copy($file, "$path/$filename")){

This should be:

if (copy($_FILES['file']['tmp_name'], "$path/$filename")) {


Regards,

Torsten Roehr

> print("Your File was uploaded successfully");
> } else{
> print("ERROR, your file was not successfully uploaded");
> }
> unlink($file);
> }
> ?>

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



RE: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Rick Fletcher
> >>How do I check for the presence of an optional $_GET param without 
> >>throwing a "Notice: Undefined index" when the param is not present?
> >>
> >>Tried all three of these, they all produce the Notice when 
> the param 
> >>is not passed:
> >>
> >>if ($_GET['id'])
> >>if ($_GET['id'] != "")
> >>if (isset $_GET['id'])
> >>
>
> if (isset( $_GET['id']))

As a general note, isset( $array["key"] ) returns false if $array["key"] ===
NULL.  You should use array_key_exists( "key", $array ) instead.

--Rick

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



[PHP] Re: clearing new pages

2004-05-26 Thread Torsten Roehr
"Michael Young" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>  a file called a.php prints "hello" to the browser then calls b.php
> which prints "goodbye" to the browser.
> the output looks like this:
>
> hello
> goodbye
>
> how do I clear the screen so the end results looks like this:

a.php:

echo 'hello';
header('location: b.php'); exit;

Regards,

Torsten Roehr

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



[PHP] is_object($_SESSION['dagobertduck']);

2004-05-26 Thread Matthias H. Risse
hi:
i wonder why...
if(!is_object($_SESSION['xmlModel']))
echo "there is no obj present, juppa**";
at my place always results in TRUE or
echoing the "there is no.. ", even if var_dump
reports that $_SESSION['xmlModel'] is an
object.
did i screw something up or are there
special policies with the beloved session
variables?
i thought $_SESSION is just mapped
into memory from the session-container
during init on every request and at the end of the
script serialized back to the container?
maybe i missed special policies for
referencing objects stored in the
session-variable?
thanks!
/m
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Possible Work in the Los Angeles Area...

2004-05-26 Thread Domains4Days
Hello, 

I hope it's OK that I put this email on this list I have some possible
Web design work in the Los Angeles Area... regarding PHP&MySQL.

If anyone wants to:

Can you call me ASAP to discuss the particulars?

Thanks,
Dave B.
Ph. 818 763-9988 - Cel: 818 314-8900


--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

Check out some great Domain Names at:
http://www.domains4days.com

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



RE: [PHP] is_object($_SESSION['dagobertduck']);

2004-05-26 Thread Justin Palmer
Hi,

Make sure you include the Class file in every consecutive page that you
would like to use the object in.

Regards,

Justin Palmer


-Original Message-
From: Matthias H. Risse [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 26, 2004 12:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] is_object($_SESSION['dagobertduck']);


hi:

i wonder why...

if(!is_object($_SESSION['xmlModel']))
echo "there is no obj present, juppa**";

at my place always results in TRUE or
echoing the "there is no.. ", even if var_dump
reports that $_SESSION['xmlModel'] is an
object.

did i screw something up or are there
special policies with the beloved session
variables?

i thought $_SESSION is just mapped
into memory from the session-container
during init on every request and at the end of the
script serialized back to the container?

maybe i missed special policies for
referencing objects stored in the
session-variable?

thanks!
/m

-- 
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] is_object($_SESSION['dagobertduck']);

2004-05-26 Thread John W. Holmes
From: "Justin Palmer" <[EMAIL PROTECTED]>

> Make sure you include the Class file in every consecutive page that you
> would like to use the object in.

and include it before session_start(). Although if var_dump() is showing
it's an object, you're question of why is_object() fails is still valid.

---John Holmes...

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



RE: [PHP] Re: clearing new pages

2004-05-26 Thread Rick Fletcher
> > Hi,
> >  a file called a.php prints "hello" to the browser then calls 
> > b.php which prints "goodbye" to the browser.
> > the output looks like this:
> >
> > hello
> > goodbye
> >
> > how do I clear the screen so the end results looks like this:
> 
> a.php:
> 
> echo 'hello';
> header('location: b.php'); exit;

That actually wouldn't work, because once there's output ("echo") you can't
send a header.

--Rick

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



Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Tyler Replogle
aslo you could change it to something else like this
$_GET['id'] = $id;
if (!$id) {
// whatever you want to happen put here
}
From: "Daniel Clark" <[EMAIL PROTECTED]>
Reply-To: "Daniel Clark" <[EMAIL PROTECTED]>
To: "Brian Dunning" <[EMAIL PROTECTED]>,"[EMAIL PROTECTED]" 
<[EMAIL PROTECTED]>
Subject: Re: [PHP] How to check for a $_GET without throwing a Notice?
Date: Wed, 26 May 2004 10:59:20 -0700

if (isset( $_GET['id']))
>>How do I check for the presence of an optional $_GET param without
>>throwing a "Notice: Undefined index" when the param is not present?
>>
>>Tried all three of these, they all produce the Notice when the param is
>>not passed:
>>
>>if ($_GET['id'])
>>if ($_GET['id'] != "")
>>if (isset $_GET['id'])
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>

_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/

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


RE: [PHP] Possible Work in the Los Angeles Area...

2004-05-26 Thread Tyler Replogle
hey,
I'm not going to call you, but we can talk over the net with email. I also 
have msn ([EMAIL PROTECTED]) and aim (catim2005). That goes for anyone that 
want to talk. O and if see my buddy icon on aim don't be scared.

From: Domains4Days <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] Possible Work in the Los Angeles Area...
Date: Wed, 26 May 2004 12:14:32 -0700
Hello,
I hope it's OK that I put this email on this list I have some possible
Web design work in the Los Angeles Area... regarding PHP&MySQL.
If anyone wants to:
Can you call me ASAP to discuss the particulars?
Thanks,
Dave B.
Ph. 818 763-9988 - Cel: 818 314-8900
--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]
Check out some great Domain Names at:
http://www.domains4days.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Watch LIVE baseball games on your computer with MLB.TV, included with MSN 
Premium! http://join.msn.click-url.com/go/onm00200439ave/direct/01/

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


[PHP] Re: clearing new pages

2004-05-26 Thread John Kaspar
I put this at the top of long pages,
$processing = "

processing, please wait ...

";
echo $processing;
flush();
Then put this at the bottom,
$hide = "

if (document.layers) {
processing.visibility='hide'
} else if (document.all) {
document.all('processing').style.visibility='hidden'
} else {
document.getElementById('processing').style.display='none'
}

";
echo $hide;
Works pretty good.
- John

On 5/26/2004 10:20 AM, Michael Young wrote:
Hi,
a file called a.php prints "hello" to the browser then calls b.php 
which prints "goodbye" to the browser.
the output looks like this:

hello
goodbye
how do I clear the screen so the end results looks like this:
goodbye
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: clearing new pages

2004-05-26 Thread Tyler Replogle
hey, you could use some jave script there
a.php:
echo 'hello';
echo"

[PHP] PHP segfaults, any ideas?

2004-05-26 Thread Michal Migurski
Hi -

I'm having some PHP segfault issues, and I can't seem to figure out what's
wrong. Kinda frustrating :) The script i'm using to test is really simple,
and as I tweak it to figure out the failure point, I'm finding that it
/seems/ to break more reliably based on the presence of code **after** a
call to exit. This seems counterintuitive to me.

Being a novice to gdb, I was hoping someone might help me to understand
this backtrace?

#0  0x4010d76e in chunk_free () from /lib/libc.so.6
#1  0x4010d548 in free () from /lib/libc.so.6
#2  0x4033cb87 in shutdown_memory_manager (silent=1, clean_cache=0) at 
/usr/local/src/build/php-4.3.2/Zend/zend_alloc.c:532
#3  0x403236cc in php_request_shutdown (dummy=0x0) at 
/usr/local/src/build/php-4.3.2/main/main.c:992
#4  0x40365001 in apache_php_module_main (r=0x8103a84, display_source_mode=0) 
at /usr/local/src/build/php-4.3.2/sapi/apache/sapi_apache.c:60
#5  0x40365b7e in send_php (r=0x8103a84, display_source_mode=0, filename=0x0) 
at /usr/local/src/build/php-4.3.2/sapi/apache/mod_php4.c:617
#6  0x40365bd2 in send_parsed_php (r=0x8103a84) at 
/usr/local/src/build/php-4.3.2/sapi/apache/mod_php4.c:632
#7  0x08053c73 in ap_invoke_handler ()
#8  0x08068bf7 in process_request_internal ()
#9  0x08068c58 in ap_process_request ()
#10 0x0805fa95 in child_main ()
#11 0x0805fc40 in make_child ()
#12 0x0805fdb4 in startup_children ()
#13 0x0806042c in standalone_main ()
#14 0x08060c8f in main ()
#15 0x400b01c4 in __libc_start_main () from /lib/libc.so.6

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
I've checked the archives and several other sources, but still can't 
seem to make this work.

I have a form with checkboxes to designate records to be deleted from 
the mysql database. The pertinent form code is:


The processing code is:
if (count($del) > 0){
for ($i=0;$i
Echoing the query produces:
DELETE FROM ref_events_reg WHERE id = A
I've also tried the following:
$query = "DELETE FROM ref_events_reg WHERE id IN ('" . implode("','", 
addslashes($del)) . "')";

This one produces a warning:
Warning: implode(): Bad arguments.
and the following query:
DELETE FROM ref_events_reg WHERE id IN ('')
Both attempts fail to delete any records even though several records 
are checked.

Where have I gone wrong?
Thanks.
Albert Padley
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Tom Rogers
Hi,

Thursday, May 27, 2004, 11:34:03 AM, you wrote:
AP> I've checked the archives and several other sources, but still can't
AP> seem to make this work.

AP> I have a form with checkboxes to designate records to be deleted from
AP> the mysql database. The pertinent form code is:

AP> 

AP> The processing code is:

if (count($del) >> 0){
AP> for ($i=0;$i $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
AP> }
AP> }

AP> Echoing the query produces:

AP> DELETE FROM ref_events_reg WHERE id = A

AP> I've also tried the following:

AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . implode("','",
AP> addslashes($del)) . "')";

AP> This one produces a warning:

AP> Warning: implode(): Bad arguments.

AP> and the following query:

AP> DELETE FROM ref_events_reg WHERE id IN ('')

AP> Both attempts fail to delete any records even though several records
AP> are checked.

AP> Where have I gone wrong?

AP> Thanks.

AP> Albert Padley


change it to

   

   Then you can do something like

   foreach($del as $id=>$val){
 $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
 //do query
   }

-- 
regards,
Tom

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread John W. Holmes
Albert Padley wrote:
I've checked the archives and several other sources, but still can't 
seem to make this work.

I have a form with checkboxes to designate records to be deleted from 
the mysql database. The pertinent form code is:


The processing code is:
if (count($del) > 0){
for ($i=0;$i

$query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
}
}

Echoing the query produces:
DELETE FROM ref_events_reg WHERE id = A
Should be:
$query = "DELETE FROM ref_events_reg WHERE id = '{$del[$i]}'";
or
$query = "DELETE FROM ref_events_reg WHERE id = '".$del[$i]."'";
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Putting an image or logo on another image.

2004-05-26 Thread Philip

<< THIS ASSUMES THAT THE IMAGE WAS UPLOADED OK >>



// ADD A FILE NAME TO THE UPLOADED FILE.

$pageDestinationFile="$pageGalleryPath/image_".$pagePicNum."_temp.jpg";
// LETS MOVE THE IMAGE OUT OF THE TEMP DIR.
move_uploaded_file ($uploadedfile,
$pageDestinationFile);
// USER OUTPUT.
echo "Image
#$i:";
echo "Temp File Uploaded:
../image_".$pagePicNum."_temp.jpg";
echo "Status: $statusresult";


// MAAKE THEM 800x600


$sourcepath="$pageDestinationFile"; // Source Image
Path -- Destination from FileUpload()
$srcimagehw = GetImageSize($sourcepath); //GetImage
Info -- Source Image
$src_width="$srcimagehw[0]"; // Source Image Width
$src_height="$srcimagehw[1]"; // Source Image Height
//Set some Variabled about the Output Image
$samplepath1="$pageGalleryPath/image_".$i.".jpg";
//path of output sample image ;-)
$dest_width="800"; // Destination Width
$dest_height="600"; // Destination Height (Fixed
Aspect Ratio) 
$dest_height= ($src_height * $dest_width) /
$src_width; //Destination Height (Variable Aspect Ratio)
$quality="90"; // JPEG Image Quality
$src_img = imagecreatefromjpeg("$sourcepath");
$dst_img =
imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0,
$dest_width, $dest_height, $src_width, $src_height);
imageinterlace($dst_img, 1);
imagejpeg($dst_img, "$samplepath1", $quality);
$white = ImageColorAllocate($dst_img, 255, 255,
255);



$photoImage = ImageCreateFromJPEG("$pageDestinationFile"); 
ImageAlphaBlending($photoImage, true); 

$logoImage = ImageCreateFromPNG("$sitePath/$siteUploads/image.png"); 
$logoW = ImageSX($logoImage); 
$logoH = ImageSY($logoImage); 

$dest_width="800"; // Destination Width
$dest_height="600"; // Destination Height (Fixed Aspect Ratio) 
$dest_height= ($src_height * $dest_width) / $src_width; //Destination Height
(Variable Aspect Ratio)

ImageCopy($photoImage, $logoImage, 0, 0, 0, 0, $logoW, $logoH); 

imagejpeg($dst_img, "$pageGalleryPath/image_".$i."final.jpg", $quality);

ImageDestroy($photoImage); 
ImageDestroy($logoImage);



Any Ideas?

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 8:01 PM, John W. Holmes wrote:
Albert Padley wrote:
I've checked the archives and several other sources, but still can't 
seem to make this work.
I have a form with checkboxes to designate records to be deleted from 
the mysql database. The pertinent form code is:

The processing code is:
if (count($del) > 0){
for ($i=0;$i
$query = "DELETE FROM ref_events_reg WHERE id = 
'$del[$i]'";
}
}
Echoing the query produces:
DELETE FROM ref_events_reg WHERE id = A
Should be:
$query = "DELETE FROM ref_events_reg WHERE id = '{$del[$i]}'";
or
$query = "DELETE FROM ref_events_reg WHERE id = '".$del[$i]."'";
--
---John Holmes...
John,
Sorry, same result. No records deleted. Echoing the query returns:
DELETE FROM ref_events_reg WHERE id = 'A'
However, the id should be an integer. A var_dump() returns:
array(2) {  ["del"]=>  array(2) {  [0]=>  string(2) "15"  [1]=>  
string(2) "16"  }  ["submit"]=>  string(6) "Delete" }

Further, when I echo $del[0], it returns -- 'A' while $del[1] returns 
'r'. Just $del returns 'Array'.

Still working on it.
Albert Padley
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] running php even without .php extenstion, how can i do this?

2004-05-26 Thread Louie Miranda
I have seen similar sites that runs php. but without the extension.

like: example.com/hello/great?ID=19

How can i do this? Run the php even without the .php extension

-- -
Louie Miranda
http://www.axishift.com

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 7:55 PM, Tom Rogers wrote:
Hi,
Thursday, May 27, 2004, 11:34:03 AM, you wrote:
AP> I've checked the archives and several other sources, but still 
can't
AP> seem to make this work.

AP> I have a form with checkboxes to designate records to be deleted 
from
AP> the mysql database. The pertinent form code is:

AP> 

AP> The processing code is:
if (count($del) >> 0){
AP>  for ($i=0;$i  $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
AP> }
AP> }
AP> Echoing the query produces:
AP> DELETE FROM ref_events_reg WHERE id = A
AP> I've also tried the following:
AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . 
implode("','",
AP> addslashes($del)) . "')";

AP> This one produces a warning:
AP> Warning: implode(): Bad arguments.
AP> and the following query:
AP> DELETE FROM ref_events_reg WHERE id IN ('')
AP> Both attempts fail to delete any records even though several 
records
AP> are checked.

AP> Where have I gone wrong?
AP> Thanks.
AP> Albert Padley
change it to
   
   Then you can do something like
   foreach($del as $id=>$val){
 $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
 //do query
   }
--
regards,
Tom
Tom,
When I tried this I received a warning - Warning: Invalid argument 
supplied for foreach()
and, of course, no records were deleted.

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


Re: [PHP] Putting an image or logo on another image.

2004-05-26 Thread Curt Zirzow
* Thus wrote Philip ([EMAIL PROTECTED]):
> 
> 
> Any Ideas?

Well, I'd have to say that dogs make better pets than cats do,
mainly because they provide much more companionship than cats...


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Curt Zirzow
* Thus wrote Albert Padley ([EMAIL PROTECTED]):
> 
> 
> 
> The processing code is:
> 
> if (count($del) > 0){
>   for ($i=0;$i   
>   $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
> }
> }

I think you need to take a step back and figure out where the $del
variable is comming from.

Both solutions that have been provided should have worked if $del
was really an array.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 11:16 PM, Curt Zirzow wrote:
* Thus wrote Albert Padley ([EMAIL PROTECTED]):

The processing code is:
if (count($del) > 0){
for ($i=0;$iI think you need to take a step back and figure out where the $del
variable is comming from.
Both solutions that have been provided should have worked if $del
was really an array.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Curt,
I agree. I did a var_dump() with the following result:
array(2) {  ["del"]=>  array(2) {  [0]=>  string(2) "15"  [1]=>  
string(2) "16"  }  ["submit"]=>  string(6) "Delete" }

"15" and "16" are the correct id's for the records I'm trying to 
delete. However, when I echo $del[0] it returns "A" and when I echo 
$del[1] it returns "r" which happen to be the first 2 character in 
Array. So what gives?

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


Re: [PHP] running php even without .php extenstion, how can i do this?

2004-05-26 Thread Curt Zirzow
* Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> I have seen similar sites that runs php. but without the extension.
> 
> like: example.com/hello/great?ID=19
> 
> How can i do this? Run the php even without the .php extension

if you add a .htaccess file in the /hello/ directory with something
like (assuming apache as webserver):


SetHandler   application/x-httpd-php


A file called great will be parsed as php.

Or in /


SetHandler   application/x-httpd-php


then the file hello will be ran as php and $_SERVER['PATH_INFO']
will contain '/great'


Have fun :)

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Albert Padley
On May 26, 2004, at 11:17 PM, Albert Padley wrote:
On May 26, 2004, at 11:16 PM, Curt Zirzow wrote:
* Thus wrote Albert Padley ([EMAIL PROTECTED]):

The processing code is:
if (count($del) > 0){
for ($i=0;$iI think you need to take a step back and figure out where the $del
variable is comming from.
Both solutions that have been provided should have worked if $del
was really an array.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Curt,
I agree. I did a var_dump() with the following result:
array(2) {  ["del"]=>  array(2) {  [0]=>  string(2) "15"  [1]=>  
string(2) "16"  }  ["submit"]=>  string(6) "Delete" }

"15" and "16" are the correct id's for the records I'm trying to 
delete. However, when I echo $del[0] it returns "A" and when I echo 
$del[1] it returns "r" which happen to be the first 2 character in 
Array. So what gives?

Albert Padley
John, Tom and Curt,
I found that I had an include of functions that was somehow mucking 
things up. When I removed the functions page, all 3 of your solutions 
worked.

Thank you all for taking the time to assist.
Albert Padley
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] running php even without .php extenstion, how can i do this?

2004-05-26 Thread Louie Miranda
I got what you mean, but can we do this on the whole directory instead by
files?
Like for example the whole / directory and /subdirectory/ so i wont be doing
that editing every files?

The example you gave is working, btw.


-- -
Louie Miranda
http://www.axishift.com


- Original Message -
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 27, 2004 1:27 PM
Subject: Re: [PHP] running php even without .php extenstion, how can i do
this?


> * Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> > I have seen similar sites that runs php. but without the extension.
> >
> > like: example.com/hello/great?ID=19
> >
> > How can i do this? Run the php even without the .php extension
>
> if you add a .htaccess file in the /hello/ directory with something
> like (assuming apache as webserver):
>
> 
> SetHandler   application/x-httpd-php
> 
>
> A file called great will be parsed as php.
>
> Or in /
>
> 
> SetHandler   application/x-httpd-php
> 
>
> then the file hello will be ran as php and $_SERVER['PATH_INFO']
> will contain '/great'
>
>
> Have fun :)
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> 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[2]: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Tom Rogers
Hi,

Thursday, May 27, 2004, 3:07:28 PM, you wrote:

AP> On May 26, 2004, at 7:55 PM, Tom Rogers wrote:

>> Hi,
>>
>> Thursday, May 27, 2004, 11:34:03 AM, you wrote:
>> AP> I've checked the archives and several other sources, but still 
>> can't
>> AP> seem to make this work.
>>
>> AP> I have a form with checkboxes to designate records to be deleted
>> from
>> AP> the mysql database. The pertinent form code is:
>>
>> AP> > "\">
>>
>> AP> The processing code is:
>>
>> if (count($del) >> 0){
>> AP>  for ($i=0;$i>  
>> AP>  $query = "DELETE FROM ref_events_reg WHERE id = '$del[$i]'";
>> AP> }
>> AP> }
>>
>> AP> Echoing the query produces:
>>
>> AP> DELETE FROM ref_events_reg WHERE id = A
>>
>> AP> I've also tried the following:
>>
>> AP> $query = "DELETE FROM ref_events_reg WHERE id IN ('" . 
>> implode("','",
>> AP> addslashes($del)) . "')";
>>
>> AP> This one produces a warning:
>>
>> AP> Warning: implode(): Bad arguments.
>>
>> AP> and the following query:
>>
>> AP> DELETE FROM ref_events_reg WHERE id IN ('')
>>
>> AP> Both attempts fail to delete any records even though several 
>> records
>> AP> are checked.
>>
>> AP> Where have I gone wrong?
>>
>> AP> Thanks.
>>
>> AP> Albert Padley
>>
>>
>> change it to
>>
>>
>>
>>Then you can do something like
>>
>>foreach($del as $id=>$val){
>>  $query = "DELETE FROM ref_events_reg WHERE id = '$id'";
>>  //do query
>>}
>>
>> -- 
>> regards,
>> Tom
>>
AP> Tom,

AP> When I tried this I received a warning - Warning: Invalid argument
AP> supplied for foreach()
AP> and, of course, no records were deleted.

AP> Albert Padley


you would need to add a bit of code, that was very rough, I assumed you
got $del from $_POST

if(isset($_POST) && is_array($_POST['del'])){
  foreach($_POST['del'] as $id=>$val){
.
.
.
  }
}

-- 
regards,
Tom

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



Re: [PHP] running php even without .php extenstion, how can i do this?

2004-05-26 Thread Curt Zirzow
* Thus wrote Louie Miranda ([EMAIL PROTECTED]):
> I got what you mean, but can we do this on the whole directory instead by
> files?
> Like for example the whole / directory and /subdirectory/ so i wont be doing
> that editing every files?

If you want a specific directory to be executed you're looking more
towards some mod_rewrite stuff with apache. Something like:

# send all trafic to a php_file
RewriteRule ^/(.*)$ /path/to/php_file [L]

Or

# ditto but only under dirname/
RewriteRule ^/dirname/(.*)$ /path/to/php_file [L]


Of course this is getting a little offtopic and might be more
suitable to some apache list to figure out the best solution on how
to redirect a paticular request to a php file.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] How to check for a $_GET without throwing a Notice?

2004-05-26 Thread Burhan Khalid
Brian Dunning wrote:
How do I check for the presence of an optional $_GET param without 
throwing a "Notice: Undefined index" when the param is not present?

Tried all three of these, they all produce the Notice when the param is 
not passed:

if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET['id'])
if (@$_GET['id'])
http://www.php.net/manual/en/language.operators.errorcontrol.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php