php-general Digest 19 Apr 2001 19:45:45 -0000 Issue 637
Topics (messages 49329 through 49410):
Re: Tip for cookies
49329 by: John Monfort
Re: image-resize/convert
49330 by: elias
Re: array_count_values
49331 by: elias
49370 by: Plutarck
IP address enconding
49332 by: elias
49344 by: Knut H. Hassel Nielsen
49349 by: elias
49350 by: Jason Brooke
49351 by: elias
49398 by: Don Read
Re: Newbie Help!! Please Look!
49333 by: elias
49336 by: Adrian D'Costa
49339 by: Geir Eivind Mork
49409 by: Si
Re: Characters counting
49334 by: elias
Re: Global variables
49335 by: Ulf Wendel
Re: php equivalent for `command`
49337 by: Greig, Euan
49375 by: Plutarck
How many color can html recongize in Word.
49338 by: Mark Lo \(3\)
49342 by: Pavel Jartsev
49373 by: Plutarck
Re: regex and mysql - looking for opinions.
49340 by: Christian Reiniger
Re: Regular Expression
49341 by: Christian Reiniger
Re: HTMLSpecialchars
49343 by: Christian Reiniger
Problem with apache after installing PHP 4
49345 by: Mohamedou
Re: SESSIONS, a weird, funny yet strange error happens to wrong people...
49346 by: Yasuo Ohgaki
49353 by: Plutarck
49380 by: Yasuo Ohgaki
49402 by: Christian Reiniger
Starting PHP script with crontab
49347 by: Bertjan Schrader
Re: how to scale down image using ImageMagick?
49348 by: Steve Werby
49360 by: Noah Spitzer-Williams
49374 by: Morgan Curley
49377 by: Joe Sheble (Wizaerd)
49395 by: FredrikAT
49397 by: Morgan Curley
Cookies
49352 by: Chi Wa Au
49355 by: Plutarck
Re: Site Sessions: Online/Offline - help?
49354 by: Richard
List Files
49356 by: KPortsmout.aol.com
49358 by: Matthew Luchak
49376 by: Joe Sheble (Wizaerd)
Re: Connection with a Palm
49357 by: Daniel Tryba
Re: Password Generator?
49359 by: Grimes, Dean
49381 by: Jon Snell
49407 by: ..s.c.o.t.t.. [gts]
Re: best way to include html?
49361 by: Michael Kimsal
49369 by: Plutarck
Multiple Connections
49362 by: Randy Johnson
49379 by: Rasmus Lerdorf
Easy Form problem
49363 by: Fates
49365 by: Matt Schroebel
Can PHP run without php.ini?
49364 by: SED
49403 by: Christian Reiniger
search results return by relevancy
49366 by: Jen Hall
49368 by: Brian Paulson
49378 by: Rasmus Lerdorf
49394 by: Clarence
49405 by: CC Zona
multiple connects
49367 by: Randy Johnson
49372 by: Sam Masiello
Re: stripslashes() equivalent when magic_quotes_sybase = on ?
49371 by: Johnson, Kirk
replace function in a file.
49382 by: Mark Lo \(3\)
49383 by: Avetis Avagyan
49387 by: Thomas Deliduka
49388 by: Steve Werby
PHP Help!
49384 by: Anthony Daniels
49386 by: Jack Dempsey
PHP Sessions Problem
49385 by: Luke Muszkiewicz
Site Searchable function
49389 by: Kevin A Williams
49390 by: John Huggins
49392 by: Matthew Luchak
Which is better coding style...
49391 by: Boget, Chris
49404 by: Christian Reiniger
49408 by: ..s.c.o.t.t.. [gts]
`AM_PROG_LIBTOOL' not found in library
49393 by: Pablo Sabatino
Advanced Search on MySQL
49396 by: Augusto Cesar Castoldi
49399 by: Steve Werby
xml with php
49400 by: steve lee
Re: [PHP-WIN] xml with php
49401 by: James Moore
Mail form error in script
49406 by: John Silverio
text formatting
49410 by: george
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
Is that still true when you include the file?
Say you have a notfoo.php file, and include foo.php in it. You don't
still have to pass the cookies, do you?
__________John Monfort_________________
_+-----------------------------------+_
P E P I E D E S I G N S
www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___________________________________+-
On Tue, 17 Apr 2001, Pat Hanna wrote:
> I found out today after suffering from minor headaches and hair loss that if
> you have functions defined in and outside file name 'foo.php', and in those
> functions you use cookies, you must pass those cookies to the function
> called. I tried using a value from a cookie in a function and it never could
> access it unless I passed it. Funny
> --
> Patrick Hanna
> Database integration--E-commerce solutions
> The Wentworth Company
>
Hi.
here is my GD report from PHPInfo()
gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
GIF Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
I think you don't have JPG enabled.
As for resizing images yes, you can do that, i wrote bunch of scripts that
does that for you.
Whenever you need them mail me although they will be on my page soon.
-elias
http://www.kameelah.org/eassoft
""De Bodemschat"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm creating a bunch of photogalleries and wondering about the following:
>
> - Is it possible to convert an image or a whole dir with images (jpg) to
60%
> of the original imagesize using php to automate this task?
>
> I know the gd library is installed, but don't know if it supports jpg...
And
> what functions do I need to use?
> >>
> gd-variables in phpinfo():
> GD Support enabled
> GD Version 1.6.2 or higher
> FreeType Support enabled
> FreeType Linkage with TTF library
> PNG Support enabled
> <<
>
> Hope you people can help.
> THanks,
>
> Bart Verbeek
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
dunno, what doesn't work exactly
but what if you try:
$array = split ("\n", $contents);
$stuff = array_count_values ($array);
echo $stuff["nuts"];
-elias
http://www.kameelah.org/eassoft
""Matthew Luchak"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
can someone give a quick hint as to why this does not work:
$array = split ("\n", $contents);
$stuff = array_count_values ($array);
echo $stuff[nuts];
or even:
$array = array (split ("\n", $contents));
$stuff = array_count_values ($array);
echo $stuff[nuts];
thnx...
matthew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
> echo $stuff[nuts];
It should work, but it's becomg a depreciated practice and may break in
future versions. Always quote a non-numeric array key.
Beyond that, use print_r($array) and see if there is a "nuts" key in there
at all.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Matthew Luchak"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
can someone give a quick hint as to why this does not work:
$array = split ("\n", $contents);
$stuff = array_count_values ($array);
echo $stuff[nuts];
or even:
$array = array (split ("\n", $contents));
$stuff = array_count_values ($array);
echo $stuff[nuts];
thnx...
matthew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello.
How can i get the IP address of the user who's browsing my current script?
how can i do it via JavaScript and PHP please.
And if i got an IP address such 192.168.0.2
i believe it will be returned as a string....Is there is a function to
encode it to an Integer and the decode it back to a string? or i have to
code it myself?
-elias
http://www.kameelah.org/eassoft
On Thu, 19 Apr 2001, elias wrote:
> Hello.
>
> How can i get the IP address of the user who's browsing my current script?
> how can i do it via JavaScript and PHP please.
$REMOTE_ADDR should do the trick (use 'phpinfo()' to see for yourself)
> And if i got an IP address such 192.168.0.2
> i believe it will be returned as a string....Is there is a function to
> encode it to an Integer and the decode it back to a string? or i have to
> code it myself?
>
> -elias
It is a string, so you couldn't make an integer out of it anymore than making
any other string into an integer. The '.' isn't a legal digit.
You'll have to split it up into different blocks (use split)
--
Knut
------
Knut H. Hassel Nielsen
Principal Engineer / Avdelingsingeniør
Norwegian University of Science and Technology / NTNU
Department of Computer and Information Science / IDI
N-7491 Trondheim, Norway
Phone Office / Telefon jobb : (+47) 73 59 18 46
Fax Office / Telefax jobb : (+47) 73 59 17 33
Cell. Phone / Mobiltelefon : 91 59 86 06
No! I can encode IP address to an Integer:
192.168.0.1 consider as: a.b.c.d
and now the formula goes:
a shl 24 + b shl 16 + c shl 8 + d
but i was looking for something ready made....
-elias
http://www.kameelah.org/eassoft
""Knut H. Hassel Nielsen"" <[EMAIL PROTECTED]> wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Thu, 19 Apr 2001, elias wrote:
> Hello.
>
> How can i get the IP address of the user who's browsing my current script?
> how can i do it via JavaScript and PHP please.
$REMOTE_ADDR should do the trick (use 'phpinfo()' to see for yourself)
> And if i got an IP address such 192.168.0.2
> i believe it will be returned as a string....Is there is a function to
> encode it to an Integer and the decode it back to a string? or i have to
> code it myself?
>
> -elias
It is a string, so you couldn't make an integer out of it anymore than
making
any other string into an integer. The '.' isn't a legal digit.
You'll have to split it up into different blocks (use split)
--
Knut
------
Knut H. Hassel Nielsen
Principal Engineer / Avdelingsingeni�r
Norwegian University of Science and Technology / NTNU
Department of Computer and Information Science / IDI
N-7491 Trondheim, Norway
Phone Office / Telefon jobb : (+47) 73 59 18 46
Fax Office / Telefax jobb : (+47) 73 59 17 33
Cell. Phone / Mobiltelefon : 91 59 86 06
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
http://www.php.net/manual/en/function.ip2long.php
> No! I can encode IP address to an Integer:
> 192.168.0.1 consider as: a.b.c.d
> and now the formula goes:
> a shl 24 + b shl 16 + c shl 8 + d
>
> but i was looking for something ready made....
>
> -elias
> http://www.kameelah.org/eassoft
thanks for the hint!
""Jason Brooke"" <[EMAIL PROTECTED]> wrote in message
02a801c0c8bd$6f5528c0$[EMAIL PROTECTED]">news:02a801c0c8bd$6f5528c0$[EMAIL PROTECTED]...
>
> http://www.php.net/manual/en/function.ip2long.php
>
>
>
> > No! I can encode IP address to an Integer:
> > 192.168.0.1 consider as: a.b.c.d
> > and now the formula goes:
> > a shl 24 + b shl 16 + c shl 8 + d
> >
> > but i was looking for something ready made....
> >
> > -elias
> > http://www.kameelah.org/eassoft
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
On 19-Apr-01 elias wrote:
> No! I can encode IP address to an Integer:
> 192.168.0.1 consider as: a.b.c.d
> and now the formula goes:
> a shl 24 + b shl 16 + c shl 8 + d
>
> but i was looking for something ready made....
>
PHP3 (returns a float, not an integer):
function inet_aton($a) {
$inet = 0.0;
$t = explode(".", $a);
for ($i = 0; $i < 4; $i++) {
$inet *= 256.0;
$inet += $t[$i];
};
return $inet;
}
function inet_ntoa($n) {
$t=array(0,0,0,0);
$msk = 16777216.0;
$n += 0.0;
if ($n < 1)
return(' ');
for ($i = 0; $i < 4; $i++) {
$k = (int) ($n / $msk);
$n -= $msk * $k;
$t[$i]= $k;
$msk /=256.0;
};
$a=join('.', $t);
return($a);
}
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
Want my advise?
go to www.editplus.com and download that lovely editor!
PHP syntax highlighting+ HTML+JavaScript and even alot of other features,
beside! it got an internal FTP uploading feature...
-elias
http://www.kameelah.org/eassoft
"Tony Daniels" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I need to know if there is a program out there that I can use to edit
> the PHP files. I use CuteFTP to download the files from my server as I
> need to change some wording around from time to time. Does anyone know
> the correct procedure for downloading a php file with CuteFTP and then a
> program that I can use to edit the text I need to edit. Then also, the
> correct way to upload it back to the server using CuteFTP. Do I use
> Binary or ACII.
>
> Or, if I am way off and there is a program that makes CuteFTP look
> silly, please let me know this also. I am open for any suggestions, as
> long as they are detailed. Please email responses to [EMAIL PROTECTED]
> .
>
> Thank you!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
use wordpad.
Adrian
On Wed, 18 Apr 2001, Tony Daniels wrote:
> I used notepad and it shows some weird symbols like darkened in squares. That
> is why I was wondering if there was a specific program. Is there any way to
> get rid of the squares?
>
> Thank for your help.
>
> Jason Murray wrote:
>
> > > I need to know if there is a program out there that I can use to edit
> > > the PHP files. I use CuteFTP to download the files from my server as I
> > > need to change some wording around from time to time. Does anyone know
> > > the correct procedure for downloading a php file with CuteFTP and then a
> > > program that I can use to edit the text I need to edit. Then also, the
> > > correct way to upload it back to the server using CuteFTP. Do I use
> > > Binary or ACII.
> >
> > PHP files (unless optimised by Zend or something) are just plain text
> > files. You can use either Binary or ASCII mode to up/download them, and
> > your text editor of choice (Notepad, PFM, HomeSite, or for the masochists,
> > MS Word :)) to edit them and save them.
> >
> > Jason
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
On Thursday 19 April 2001 05:18, Tony Daniels wrote:
> I need to know if there is a program out there that I can use to edit
> the PHP files. I use CuteFTP to download the files from my server as I
www.homesite.com
www.ultraedit.com
www.slickedit.com
I assume this have uploadfeatures, atleast the two last ones have. they are
ranged from the cheapest / useable to the $300 slickedit which just rocks :)
(and the one I use ofcourse)
--
php developer / CoreTrek AS | "Jesus may love you, but I think you're
Sandnes / Rogaland / Norway | garbage wrapped in skin." -- Michael
web: http://www.moijk.net/ | O'Donohugh
i can honestly recommend phped, infact im amazed no one else has mentioned
it. Great win32 php programming ide.
hint: ignore the project stuff in it tho as it kinda sucks ;-)
you can grab it from here
http://www.soysal.com/PHPEd/
Si.
You can use MySql's LEFT() or even substring()
example:
SELECT substring(address,1, 20) as _addr FROM tablename
and you will have to look for field "_addr" in mysql results.
-elias
http://www.kameelah.org/eassoft
""Jorn van Eck"" <[EMAIL PROTECTED]> wrote in message
9bkpd8$r77$[EMAIL PROTECTED]">news:9bkpd8$r77$[EMAIL PROTECTED]...
> Hi there,
>
> Does someone know how to display for example150 characters from a $ set by
> MySQL?
> --
> Jorn van Eck
> Student Information Engineering
> Almere
> Tel: +31 614430902
> E-mail: [EMAIL PROTECTED]
> Website: http://www.iie.nl/~eck13
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Aaron Tuller schrieb:
>
> At 1:16 AM +0000 4/19/01, Philip Olson wrote:
> > <pre>
> > <?php var_dump($GLOBALS) ?>
> > </pre>
>
> don't do that, at least I think it will recursively traverse the
> $GLOBALS arrary (since $GLOBALS itself is $GLOBAL) and you will never
> end.
print_r() does have that bug, not var_dump().
http://www.php.net/manual/en/function.print-r.php
Ulf
--
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de
I was hoping to avoid concatenation to make my code more legible (less illegible?).
I take it then that there is no equivalent for the use of ` in Unix.
-----Original Message-----
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 15:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php equivalent for `command`
> In the second set of code lines, what I need to do is somehow bracket off
the $test++ so it is evaluated before being echoed.
You need to use the string concantenation operator (a period) to use things
like $test++, else PHP get's confused.
> echo "Value of test: $test++ <BR>";
To get that to work like you want it to, you need only do:
echo 'Value of test: ' . $test++ . ' <BR>';
It's functionally the same, no brackets needed. If you want it to be
evaluated BEFORE it's echoed, you need to use:
echo 'Value of test: ' . ++$test . ' <BR>';
--
Plutarck
Should be working on something...
...but forgot what it was.
""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I deliberately gave a simple example, perhaps too simple. I want to
output quite long and complicated strings that may involve evaluated
variables, calls to functions etc. But I also want it to as legible as
possible. But even something simple along the lines I quoted gives me
problems. See the following code and its output
>
> <?php
> $test=1;
> echo $test++ . "<BR>";
> echo $test++ . "<BR>";
>
> $test=1;
> echo "Value of test: $test++ <BR>";
> echo "Value of test: $test++ <BR>";
> ?>
>
> The output:
>
> 1
> 2
> Value of test: 1++
> Value of test: 1++
>
> In the second set of code lines, what I need to do is somehow bracket off
the $test++ so it is evaluated before being echoed.
>
> Euan
>
>
> -----Original Message-----
> From: Jason Brooke [mailto:[EMAIL PROTECTED]]
> Sent: 18 April 2001 09:46
> To: Greig, Euan; [EMAIL PROTECTED]
> Subject: Re: [PHP] php equivalent for `command`
>
>
> echo ++$x;
>
> http://www.php.net/manual/en/language.operators.increment.php
>
>
>
> > > Is there a php equivalent for the use of ` (I think) in Unix/Perl? So
> for example echo "`$x++`" would first evaluate $x++ and then print the
> resulting value.
> > >
> > > Euan Greig
> > > Technical Consultant
> > > BRANN DATA
> > > [EMAIL PROTECTED]
> > > 01285 645997
>
>
>
>
> **************************************************************************
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
**************************************************************************
Any opinions expressed in this email are those of the individual and
not necessarily the Company. This email and any files transmitted with
it, including replies and forwarded copies (which may contain alterations)
subsequently transmitted from the Company, are confidential and solely for
the use of the intended recipient. If you are not the intended recipient
or the person responsible for delivering to the intended recipient, be
advised that you have received this email in error and that any use is
strictly prohibited.
**************************************************************************
Short answer: nope, sorry lol ;)
Personally though I concatenate every string I have that needs to have a
variable in it. Makes it so the variables are highlighted in my syntax
editor for one thing, but it's also a bit faster to use only single quoted
strings with string concatenation, rather than just stuff them all inside a
double quoted string.
Not that it would really effect you much unless you had a hugely long script
though.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I was hoping to avoid concatenation to make my code more legible (less
illegible?).
>
> I take it then that there is no equivalent for the use of ` in Unix.
>
> -----Original Message-----
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: 18 April 2001 15:13
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] php equivalent for `command`
>
>
> > In the second set of code lines, what I need to do is somehow bracket
off
> the $test++ so it is evaluated before being echoed.
>
> You need to use the string concantenation operator (a period) to use
things
> like $test++, else PHP get's confused.
>
> > echo "Value of test: $test++ <BR>";
>
> To get that to work like you want it to, you need only do:
>
> echo 'Value of test: ' . $test++ . ' <BR>';
>
> It's functionally the same, no brackets needed. If you want it to be
> evaluated BEFORE it's echoed, you need to use:
>
> echo 'Value of test: ' . ++$test . ' <BR>';
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
>
> ""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I deliberately gave a simple example, perhaps too simple. I want to
> output quite long and complicated strings that may involve evaluated
> variables, calls to functions etc. But I also want it to as legible as
> possible. But even something simple along the lines I quoted gives me
> problems. See the following code and its output
> >
> > <?php
> > $test=1;
> > echo $test++ . "<BR>";
> > echo $test++ . "<BR>";
> >
> > $test=1;
> > echo "Value of test: $test++ <BR>";
> > echo "Value of test: $test++ <BR>";
> > ?>
> >
> > The output:
> >
> > 1
> > 2
> > Value of test: 1++
> > Value of test: 1++
> >
> > In the second set of code lines, what I need to do is somehow bracket
off
> the $test++ so it is evaluated before being echoed.
> >
> > Euan
> >
> >
> > -----Original Message-----
> > From: Jason Brooke [mailto:[EMAIL PROTECTED]]
> > Sent: 18 April 2001 09:46
> > To: Greig, Euan; [EMAIL PROTECTED]
> > Subject: Re: [PHP] php equivalent for `command`
> >
> >
> > echo ++$x;
> >
> > http://www.php.net/manual/en/language.operators.increment.php
> >
> >
> >
> > > > Is there a php equivalent for the use of ` (I think) in Unix/Perl?
So
> > for example echo "`$x++`" would first evaluate $x++ and then print the
> > resulting value.
> > > >
> > > > Euan Greig
> > > > Technical Consultant
> > > > BRANN DATA
> > > > [EMAIL PROTECTED]
> > > > 01285 645997
> >
> >
> >
> >
> >
**************************************************************************
> > Any opinions expressed in this email are those of the individual and
> > not necessarily the Company. This email and any files transmitted with
> > it, including replies and forwarded copies (which may contain
alterations)
> > subsequently transmitted from the Company, are confidential and solely
for
> > the use of the intended recipient. If you are not the intended recipient
> > or the person responsible for delivering to the intended recipient, be
> > advised that you have received this email in error and that any use is
> > strictly prohibited.
> >
> >
**************************************************************************
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>
> **************************************************************************
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Hi,
I would like to know how many colors can html recongized in WORD such as
orange.. red.. blue.. ....
eg. <font color="blue">Blue</font>
where can I find out the sources of how many color can html recrongized in
word. and what wording should I use..
Thank you so much,
Mark
"Mark Lo (3)" wrote:
>
> Hi,
>
> I would like to know how many colors can html recongized in WORD such as
> orange.. red.. blue.. ....
>
> eg. <font color="blue">Blue</font>
>
> where can I find out the sources of how many color can html recrongized in
> word. and what wording should I use..
Maybe this link helps a little:
http://developer.netscape.com/docs/manuals/htmlguid/colortab.htm
--
Pavel a.k.a. Papi
For internet explorer:
http://msdn.microsoft.com/workshop/design/color/colorname.asp
Due to the near randomness with which different browsers render color names,
and often some browsers support nearly no color names, to avoid headaches
use one simple rule: Never user color names.
Just stick to hex values unless you absolutely _have_ to use the names.
If you have problems with hex, use this:
http://www.visibone.com/
Great collection of tools to fine the exact color you want.
--
Plutarck
Should be working on something...
...but forgot what it was.
"Pavel Jartsev" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> "Mark Lo (3)" wrote:
> >
> > Hi,
> >
> > I would like to know how many colors can html recongized in WORD
such as
> > orange.. red.. blue.. ....
> >
> > eg. <font color="blue">Blue</font>
> >
> > where can I find out the sources of how many color can html recrongized
in
> > word. and what wording should I use..
>
> Maybe this link helps a little:
> http://developer.netscape.com/docs/manuals/htmlguid/colortab.htm
>
>
> --
> Pavel a.k.a. Papi
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
On Wednesday 18 April 2001 22:03, you wrote:
> and do various searches etc. I was curious as to what most people find
> the best way keep thier mysql queries from getting messed up by user
> entered data. None of my searches or database data has or needs any
Simply using addslashes () or the magic_quotes_gpc setting will do fine
for strings.
For numbers just cast them to int before inserting 'em in the query:
$MyNum = (int) $MyNum;
$Query = "INSERT INTO foo (intval) VALUES ($MyNum)';
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
/* you are not expected to understand this */
- from the UNIX V6 kernel source
On Wednesday 18 April 2001 22:55, you wrote:
> >oops. The expression should read '/\[([^\]]+)\]/'
>
> Thanks all, i used this code and it works:
>
> preg_match("/\[(.+)\]/",$msg_array[$i],$segments);
Note: This won't do what you expect, since the ".+" part will match as
much as possible.
Example: For "This [is a] string [with] multi [brack]ets"
it will match
"is a] string [with] multi [brack"
A better solution would be "/\[(.+?)\]/"
The '?' after the '+' tells it to match as little as possible.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
/* you are not expected to understand this */
- from the UNIX V6 kernel source
On Thursday 19 April 2001 07:11, you wrote:
> > I'm having a problem with HTMLspecialchars and nl2br interfearing
> // Convert < to <, etc
> $output = htmlentities($content);
Little note on the side: htmlentities () is usually better then
htmlspecialchars ().
(1) It has a shorter name *g* and (2) it really takes care of *all* HTML
specialities (e.g. umlauts)
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
/* you are not expected to understand this */
- from the UNIX V6 kernel source
Dear all,
I have apache 1.3.19-3fp and have newly installed PHP 4 using from
rpms.arvin.dk
My problems are:
1-Apache freezes and nothing goes untill I restart it
2-Webmin stops itself.
Furthermore if I give the follow command it sems that no apache but I am
sure apache is running
look:
[root@proxy mohamedou]# rpm qa|grep httpd
[root@proxy mohamedou]# rpm qa|grep apache
[root@proxy mohamedou]# rpm qa|grep http
[--httpproxy <host>] [--httpport <port>]
[--httpproxy <host>] [--httpport <port>]
[--httpproxy <host>] [--httpport <port>]
[root@proxy mohamedou]# rpm qa|grep apache
I thank U
Moh
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Does she use multiple browsers for your site? I think she is doing this.
I'm not sure if session "files" handler is using flock() or not. It could be
failing to open file, since file is locked. (I think it should lock file, since
it's possible to get length 0 file w/o it) This problem will not occur unless
someone accessing web site with multiple browsers that have the same session ID.
This is possible when cookie is used for session.
Since "files" handler is bundled, you have 2 options.
1) Modify "files" handler in session module.
2) Make your own session handler. (If you use database, why not use the
database?)
Hope this helps,
--
Yasuo Ohgaki
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01...
>
> hello guys...
>
> On one of our websites, where we use sessions, a funny error have happened.
>
> <err>
> Warning: open(/tmp/sess_b5ad1e0878dee63fa8a780df44af3ea7, O_RDWR) failed:
> File exists (17) in page.japaninc.inc on line 109
> </err>
>
> The funny side of it is that no one has ever seen it except our manager
> (what a luck) from his PC only. I guess, we developers, visit our art-work
> much more often than our manager...
>
> She's seen it twice already, first time was a month-two ago and now again. I
> ignored it the first time, I though - well, happens... But now I start to
> think it is a bit weird (and dangerous for carrier).
>
> Any of you have any idea why this "rare" error keeps happening on her
> browser and NEVER on any of developer's? (nor even any other employee of our
> 200> company ever complained)...
>
> What to fix?
>
> Sincerely,
>
> Maxim Maletsky
> Webmaster, J-Door.com / J@pan Inc.
> LINC Media, Inc.
> TEL: 03-3499-2175 x 1271
> FAX: 03-3499-3109
>
> [EMAIL PROTECTED]
>
> www.j-door.com
> www.japaninc.net
> www.lincmedia.co.jp
>
>
>
>
>
>
--------------------------------------------------------------------------------
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> What to fix?
Her ;)
Seriously though, is it possible that she stopped browsing the site long
enough for the session to expire and be cleaned up by the garbage handler,
then she continued on the page with a PHPSESSID that no longer existed?
In that case the error would occur only once, as a new sessid with the same
number would be created right then.
--
Plutarck
Should be working on something...
...but forgot what it was.
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01...
>
> hello guys...
>
> On one of our websites, where we use sessions, a funny error have
happened.
>
> <err>
> Warning: open(/tmp/sess_b5ad1e0878dee63fa8a780df44af3ea7, O_RDWR) failed:
> File exists (17) in page.japaninc.inc on line 109
> </err>
>
> The funny side of it is that no one has ever seen it except our manager
> (what a luck) from his PC only. I guess, we developers, visit our art-work
> much more often than our manager...
>
> She's seen it twice already, first time was a month-two ago and now again.
I
> ignored it the first time, I though - well, happens... But now I start to
> think it is a bit weird (and dangerous for carrier).
>
> Any of you have any idea why this "rare" error keeps happening on her
> browser and NEVER on any of developer's? (nor even any other employee of
our
> 200> company ever complained)...
>
> What to fix?
>
> Sincerely,
>
> Maxim Maletsky
> Webmaster, J-Door.com / J@pan Inc.
> LINC Media, Inc.
> TEL: 03-3499-2175 x 1271
> FAX: 03-3499-3109
>
> [EMAIL PROTECTED]
>
> www.j-door.com
> www.japaninc.net
> www.lincmedia.co.jp
>
>
>
>
>
>
----------------------------------------------------------------------------
----
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
I was curious about your post, so I take a look at the module source.
It seems you could be right if O_EXCL is not defined when PHP is compiled. If
O_EXCL is defined, it creates if there is no session data file.
--
Yasuo Ohgaki
""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9bmjl2$rc4$[EMAIL PROTECTED]">news:9bmjl2$rc4$[EMAIL PROTECTED]...
> > What to fix?
>
>
> Her ;)
>
>
> Seriously though, is it possible that she stopped browsing the site long
> enough for the session to expire and be cleaned up by the garbage handler,
> then she continued on the page with a PHPSESSID that no longer existed?
>
> In that case the error would occur only once, as a new sessid with the same
> number would be created right then.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> "Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
> DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED114@EXC-TYO-01...
> >
> > hello guys...
> >
> > On one of our websites, where we use sessions, a funny error have
> happened.
> >
> > <err>
> > Warning: open(/tmp/sess_b5ad1e0878dee63fa8a780df44af3ea7, O_RDWR) failed:
> > File exists (17) in page.japaninc.inc on line 109
> > </err>
> >
> > The funny side of it is that no one has ever seen it except our manager
> > (what a luck) from his PC only. I guess, we developers, visit our art-work
> > much more often than our manager...
> >
> > She's seen it twice already, first time was a month-two ago and now again.
> I
> > ignored it the first time, I though - well, happens... But now I start to
> > think it is a bit weird (and dangerous for carrier).
> >
> > Any of you have any idea why this "rare" error keeps happening on her
> > browser and NEVER on any of developer's? (nor even any other employee of
> our
> > 200> company ever complained)...
> >
> > What to fix?
> >
> > Sincerely,
> >
> > Maxim Maletsky
> > Webmaster, J-Door.com / J@pan Inc.
> > LINC Media, Inc.
> > TEL: 03-3499-2175 x 1271
> > FAX: 03-3499-3109
> >
> > [EMAIL PROTECTED]
> >
> > www.j-door.com
> > www.japaninc.net
> > www.lincmedia.co.jp
> >
> >
> >
> >
> >
> >
>
>
> ----------------------------------------------------------------------------
> ----
>
>
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
On Thursday 19 April 2001 13:52, you wrote:
> > What to fix?
>
> Her ;)
>
>
> Seriously though, is it possible that she stopped browsing the site
> long enough for the session to expire and be cleaned up by the garbage
> handler, then she continued on the page with a PHPSESSID that no longer
> existed?
> > <err>
> > Warning: open(/tmp/sess_b5ad1e0878dee63fa8a780df44af3ea7, O_RDWR)
> > failed: File exists (17) in page.japaninc.inc on line 109
> > </err>
Then at least the error message should be worded differently. Failure
because the file exists should be impossible for open (..., O_RDWR)
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
REALITY.SYS corrupted ... reboot Universe [Y,n]?
I need tot start a PHP script at night with the crontab. I tried to do it
with lynx (lynx http://www.domain.nl/test.php) as a commandline within the
crontab. Lynx is starting but the PHP script is not working. Anyone an idea
how to do it?
OS: Redhat Linux 5.2
Apache
PHP as a apache module
thanks!
"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote:
> I have a bunch of pictures all in ranging filesizes and dimensions. I want
> to resize the ones that over 175 pixels wide to a 175 pixel wide picture
> however i want the height to scale down (ie. i dont want a really thin
> picture, i just want it to be what it would be if it were resized). i have
> this but i cant figure out how to just scale down the width:
>
> c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
>
> the '!' forces those sizes to be used but obvoiusly i dont want the height
> to be 30. i want it to be whatever it should be so the picture doesnt look
> flattened.
I believe imagemagick has an option where you can specify a single dimension
(x or y) and it will set that dimension accordingly and automatically scale
the other dimension. This should be covered in the manual pages or --help
output of the program.
--
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
Is there a way to install the GD library on windows nt systems? i can't get
this thing to not scale it if its smaller than a certain width....
""Steve Werby"" <[EMAIL PROTECTED]> wrote in message
00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7...
> "Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote:
> > I have a bunch of pictures all in ranging filesizes and dimensions. I
want
> > to resize the ones that over 175 pixels wide to a 175 pixel wide picture
> > however i want the height to scale down (ie. i dont want a really thin
> > picture, i just want it to be what it would be if it were resized). i
have
> > this but i cant figure out how to just scale down the width:
> >
> > c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> >
> > the '!' forces those sizes to be used but obvoiusly i dont want the
height
> > to be 30. i want it to be whatever it should be so the picture doesnt
look
> > flattened.
>
> I believe imagemagick has an option where you can specify a single
dimension
> (x or y) and it will set that dimension accordingly and automatically
scale
> the other dimension. This should be covered in the manual pages or --help
> output of the program.
>
>
> --
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Yeah, it is unfortunate that ImageMagick uses those chars since they have
other meanings on the cmd line.
just escape it ( \> ) and that should work ( works on a linux box )
morgan
At 07:53 PM 4/18/2001, you wrote:
>morgan,
> this is starting to work! the 175x175 does resize it to a width of 175
>while retaining the aspect ratio.
>
> however.... when i tried using the less than sign, the windows nt
>command prompt is treating it as saving the output to a file:
>
>c:\progra~1\imagem~1\mogrify.exe -geometry 175x175> picture.jpeg
>
>imagemagick replies with : missing image file name. this is because the >
>sign is telling windows to save the output to a file.
>i tried putting a 1 after the > sign and it made a blank file with filename
>of '1'.
>
>how can i get around this? i couldnt figure out how to use -identify, it was
>not in the docs
>
>Thanks so much!
>
>- Noah
>
>----- Original Message -----
>From: "Morgan Curley" <[EMAIL PROTECTED]>
>Newsgroups: php.general
>Sent: Wednesday, April 18, 2001 5:55 PM
>Subject: Re: [PHP] how to scale down image using ImageMagick?
>
>
>according to the docs use
>-geometry 175x175> picture.jpeg
>
>man mogrify:
> -geometry <width>x<height>{+-}<x offset>{+-}<y offset>{%}{!}{<}{>}
> preferred width and height of the image. See X(1) for
>details about the geometry specification.
>
> By default, the width and height are maximum values. That
>is, the image is expanded or contracted to
> fit the width and height value while maintaining the aspect
>ratio of the image. Append an exclamation
> point to the geometry to force the image size to exactly the
>size you specify. For example, if you
> specify 640x480! the image width is set to 640 pixels and
>height to 480. If only one factor is speci
> fied, both the width and height assume the value.
>
> To specify a percentage width or height instead, append
>%. The image size is multiplied by the width
> and height percentages to obtain the final image
>dimensions. To increase the size of an image, use a
> value greater than 100 (e.g. 125%). To decrease an image's
>size, use a percentage less than 100.
>
> Use > to change the dimensions of the image only if its size
>exceeds the geometry specification. <
> resizes the image only if its dimensions is less than the
>geometry specification. For example, if you
> specify 640x480> and the image size is 512x512, the image
>size does not change. However, if the image
> is 1024x1024, it is resized to 640x480.
>
>it looks like mogrify bases its resizing on the first value that is diff
>than the one supplied i.e. if your image is 200x50 it will scale it to
>175x? but if it is 50x200 it will scale it to ?x175
>
>if it is important you not resize based on height use identify to get the
>geometry first.
>
>morgan
>
>
>At 04:27 PM 4/18/2001, Noah Spitzer-Williams wrote:
> >I have a bunch of pictures all in ranging filesizes and dimensions. I want
> >to resize the ones that over 175 pixels wide to a 175 pixel wide picture
> >however i want the height to scale down (ie. i dont want a really thin
> >picture, i just want it to be what it would be if it were resized). i have
> >this but i cant figure out how to just scale down the width:
> >
> >c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> >
> >the '!' forces those sizes to be used but obvoiusly i dont want the height
> >to be 30. i want it to be whatever it should be so the picture doesnt look
> >flattened.
> >
> >Thanks! - Noah
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
I use ImageMagik all the time for thumbnail creations... this doesn't
resize the image, it creates a new image, a thumbnail... but the principle
is the same....
$cWidth = 175;
$picture_src = "fullSize/somepic.jpg";
$thumb_dest = "fthumbNail/somepic.jpg";
$aImageInfo = getimagesize( $picture_src );
if( $aImageInfo[0] < $cWidth ) {
exec("convert -geometry $cWidth -colors 256 -colorspace
yuv $picture_src $thumb_dest" );
}
At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote:
>Is there a way to install the GD library on windows nt systems? i can't get
>this thing to not scale it if its smaller than a certain width....
>
>""Steve Werby"" <[EMAIL PROTECTED]> wrote in message
>00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7...
> > "Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote:
> > > I have a bunch of pictures all in ranging filesizes and dimensions. I
>want
> > > to resize the ones that over 175 pixels wide to a 175 pixel wide picture
> > > however i want the height to scale down (ie. i dont want a really thin
> > > picture, i just want it to be what it would be if it were resized). i
>have
> > > this but i cant figure out how to just scale down the width:
> > >
> > > c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> > >
> > > the '!' forces those sizes to be used but obvoiusly i dont want the
>height
> > > to be 30. i want it to be whatever it should be so the picture doesnt
>look
> > > flattened.
> >
> > I believe imagemagick has an option where you can specify a single
>dimension
> > (x or y) and it will set that dimension accordingly and automatically
>scale
> > the other dimension. This should be covered in the manual pages or --help
> > output of the program.
> >
> >
> > --
> > --
> > Steve Werby
> > President, Befriend Internet Services LLC
> > http://www.befriend.com/
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi!
This is what I do:
if (!empty($picture)) {
$size = GetImageSize ("pics/$picture");
if ($size[0] >= '175') {
$width = '175';
$height = $size[1] * ($width / $size[0]);
} else {
$width = $size[0];
$height = $size[1];
}
}
echo "<img src=\"pics\$picture\" height=\"$height\" width=\"$width\">";
Fredrik A. Takle
Bergen, Norway
""Joe Sheble (Wizaerd)"" <[EMAIL PROTECTED]> skrev i melding
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I use ImageMagik all the time for thumbnail creations... this doesn't
> resize the image, it creates a new image, a thumbnail... but the principle
> is the same....
>
> $cWidth = 175;
> $picture_src = "fullSize/somepic.jpg";
> $thumb_dest = "fthumbNail/somepic.jpg";
>
> $aImageInfo = getimagesize( $picture_src );
>
> if( $aImageInfo[0] < $cWidth ) {
> exec("convert -geometry $cWidth -colors 256 -colorspace
> yuv $picture_src $thumb_dest" );
> }
>
> At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote:
> >Is there a way to install the GD library on windows nt systems? i can't
get
> >this thing to not scale it if its smaller than a certain width....
> >
> >""Steve Werby"" <[EMAIL PROTECTED]> wrote in message
> >00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7...
> > > "Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote:
> > > > I have a bunch of pictures all in ranging filesizes and dimensions.
I
> >want
> > > > to resize the ones that over 175 pixels wide to a 175 pixel wide
picture
> > > > however i want the height to scale down (ie. i dont want a really
thin
> > > > picture, i just want it to be what it would be if it were resized).
i
> >have
> > > > this but i cant figure out how to just scale down the width:
> > > >
> > > > c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> > > >
> > > > the '!' forces those sizes to be used but obvoiusly i dont want the
> >height
> > > > to be 30. i want it to be whatever it should be so the picture
doesnt
> >look
> > > > flattened.
> > >
> > > I believe imagemagick has an option where you can specify a single
> >dimension
> > > (x or y) and it will set that dimension accordingly and automatically
> >scale
> > > the other dimension. This should be covered in the manual pages
or --help
> > > output of the program.
> > >
> > >
> > > --
> > > --
> > > Steve Werby
> > > President, Befriend Internet Services LLC
> > > http://www.befriend.com/
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
This is a neat bit of code to fill in image height and width info but it
does not affect the actual file size like resizing the image would
morgan
At 02:43 PM 4/19/2001, FredrikAT wrote:
>Hi!
>
>This is what I do:
>
> if (!empty($picture)) {
> $size = GetImageSize ("pics/$picture");
> if ($size[0] >= '175') {
> $width = '175';
> $height = $size[1] * ($width / $size[0]);
> } else {
> $width = $size[0];
> $height = $size[1];
> }
> }
>
>echo "<img src=\"pics\$picture\" height=\"$height\" width=\"$width\">";
>
>Fredrik A. Takle
>Bergen, Norway
>
>
>""Joe Sheble (Wizaerd)"" <[EMAIL PROTECTED]> skrev i melding
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > I use ImageMagik all the time for thumbnail creations... this doesn't
> > resize the image, it creates a new image, a thumbnail... but the principle
> > is the same....
> >
> > $cWidth = 175;
> > $picture_src = "fullSize/somepic.jpg";
> > $thumb_dest = "fthumbNail/somepic.jpg";
> >
> > $aImageInfo = getimagesize( $picture_src );
> >
> > if( $aImageInfo[0] < $cWidth ) {
> > exec("convert -geometry $cWidth -colors 256 -colorspace
> > yuv $picture_src $thumb_dest" );
> > }
> >
> > At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote:
> > >Is there a way to install the GD library on windows nt systems? i can't
>get
> > >this thing to not scale it if its smaller than a certain width....
> > >
> > >""Steve Werby"" <[EMAIL PROTECTED]> wrote in message
> > >00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7...
> > > > "Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote:
> > > > > I have a bunch of pictures all in ranging filesizes and dimensions.
>I
> > >want
> > > > > to resize the ones that over 175 pixels wide to a 175 pixel wide
>picture
> > > > > however i want the height to scale down (ie. i dont want a really
>thin
> > > > > picture, i just want it to be what it would be if it were resized).
>i
> > >have
> > > > > this but i cant figure out how to just scale down the width:
> > > > >
> > > > > c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> > > > >
> > > > > the '!' forces those sizes to be used but obvoiusly i dont want the
> > >height
> > > > > to be 30. i want it to be whatever it should be so the picture
>doesnt
> > >look
> > > > > flattened.
> > > >
> > > > I believe imagemagick has an option where you can specify a single
> > >dimension
> > > > (x or y) and it will set that dimension accordingly and automatically
> > >scale
> > > > the other dimension. This should be covered in the manual pages
>or --help
> > > > output of the program.
> > > >
> > > >
> > > > --
> > > > --
> > > > Steve Werby
> > > > President, Befriend Internet Services LLC
> > > > http://www.befriend.com/
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
> > > >
> > >
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
I use cookie to protect my web pages:
setcookie("cookiename", "cookievalue", time()+1800); // set the expiry
time to 30 minutes
The time zone of my server is set to GMT+8.
The server is running on a Redhat 7, apache and PHP 4 as a apache module.
Now some users always get cookie expired error. I found that they are from
different time zones, i.e. GMT+6, GMT+5.
The users use IE to access my web pages.
Could anyone tell me how to set the cookie independent of the time zone?
Thanks!
Au Chi Wa
ERG HK
---------------------------- ERG Group --------------------------
The contents of this email and any attachments are confidential
and may only be read by the intended recipient.
-----------------------------------------------------------------
rather than using time(), try using one of the GMT time functions.
Check under date/time in the manual, which is the same section that time is
under.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Chi Wa Au"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I use cookie to protect my web pages:
>
> setcookie("cookiename", "cookievalue", time()+1800); // set the expiry
> time to 30 minutes
>
> The time zone of my server is set to GMT+8.
> The server is running on a Redhat 7, apache and PHP 4 as a apache module.
>
> Now some users always get cookie expired error. I found that they are
from
> different time zones, i.e. GMT+6, GMT+5.
> The users use IE to access my web pages.
>
> Could anyone tell me how to set the cookie independent of the time zone?
>
> Thanks!
>
> Au Chi Wa
> ERG HK
>
>
> ---------------------------- ERG Group --------------------------
> The contents of this email and any attachments are confidential
> and may only be read by the intended recipient.
> -----------------------------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Greetings.
I am having some problems with the code itself! I have done like so,
that whenever peopel wishes to see the "onliners", I start a function called
DelOld(). This will not decrease server speed, nor create conflicts when
writing to temporary files and so forth.
Now, I tried to gather the following into an exploded array:
// the date output
$date_output = date("Y-m-d-H-i-A");
As you see, I've seperated all with a "-" so I can simply call [0], [1],
[2],... if I want something. Now, How can I compare if a user is away for
like 10 minutes, or 30 minutes? I have a function called
GetLoggDateofUser($Username) which will retreive the $date_output, but with
colons and spaces, like so:
date("Y-m-d H:i A").
Do you or anyone else have any suggestions?
- Richard
Hi,
Does anyone know how I can list all the files begining with help in one of my
pages.
So I have a dir which has various files, like so:
help_me.php
help_you.php
help_us.php
Is there some command I can use to select all the files and then print them
out?
TIA
Ade
$path='/root/helpfiles/';
$dir_handle = opendir($path);
while ($file = readdir($dir_handle)) {
if ((ereg("help",$file)){
INCLUDE "$path$file";
OR
echo '<A HREF=".$path$file.'">'.$file.'</A>
}
}
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] List Files
Hi,
Does anyone know how I can list all the files begining with help in one
of my
pages.
So I have a dir which has various files, like so:
help_me.php
help_you.php
help_us.php
Is there some command I can use to select all the files and then print
them
out?
TIA
Ade
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
exec( "ls -1 help*.*", $arFiles );
foreach( $arFiles as $cFile ) {
print( $cFile );
}
At 08:44 AM 4/19/01 -0400, Matthew Luchak wrote:
>$path='/root/helpfiles/';
>$dir_handle = opendir($path);
>
> while ($file = readdir($dir_handle)) {
>if ((ereg("help",$file)){
>INCLUDE "$path$file";
>
>OR
>
>echo '<A HREF=".$path$file.'">'.$file.'</A>
>
>}
> }
>
>
>
>
>
>____________________________
>Matthew Luchak
>Webmaster
>Kaydara Inc.
>[EMAIL PROTECTED]
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, April 19, 2001 8:25 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] List Files
>
>
>Hi,
>
>Does anyone know how I can list all the files begining with help in one
>of my
>pages.
>
>So I have a dir which has various files, like so:
>
>help_me.php
>help_you.php
>help_us.php
>
>Is there some command I can use to select all the files and then print
>them
>out?
>
>TIA
>Ade
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
On Wed, Apr 18, 2001 at 09:22:32AM -0500, Plutarck wrote:
> Hm...can't say I've seen many subjects about this, but you might want to
> look around for information on WAP/WML.
>
> Maybe someone else would know more though, because I have no experiance with
> non-PC browsers.
For Palm/PocketPC/blala handhelds one can use AvantGo channels
(http://www.avantgo.com/) to get content to the handheld. Together with
PHP to rip/strip/filter/create the content it's a solution for my needs.
Be carefull though, this password generator is not as random as it looks at
first glance:
Example:
Here is a list 100 seemingly random passords:
crastije
cranocus
frukaphe
thogivot
dricrope
chevacot
wrasipha
staspofr
spuphara
prothidi
prohopra
clicafri
besliruc
catokipr
gupaprus
holofrec
jodruwud
kibreleb
mewosliw
masluwre
puswewor
rowrolum
solugole
uihestuh
vedotrec
wewusabo
trategep
brurosto
frowrudr
thidreto
drebruha
chedaclo
wraclidr
stuswuti
sporanan
swimicli
slijudru
clefracr
batrinuc
duuubesw
dupraspu
hosticre
jichunot
kekajebr
lagiswow
nubabrat
puveuosi
rosojano
tinaswik
tichepha
jogucrod
kibenabr
liuihutr
neruspau
panecrir
ruchiuap
sofrujil
uocreswu
vibichid
wepruuuc
dricrope
chevacot
pheslepr
staspofr
spuphara
swolekom
prohopra
clicafri
bevewabo
catokipr
gupaprus
guphewri
jodruwud
kibreleb
lecidutr
masluwre
puswewor
rupisepu
solugole
uihestuh
uibritho
wewusabo
trategep
cruswicl
frowrudr
thidreto
drijomif
chedaclo
wraclidr
wruuocru
sporanan
swimicli
prichosp
clefracr
batrinuc
cabohipr
dupraspu
hosticre
jimouudr
kekajebr
Here is the same list in sorted order:
batrinuc
batrinuc
besliruc
bevewabo
brurosto
cabohipr
catokipr
catokipr
chedaclo
chedaclo
chevacot
chevacot
clefracr
clefracr
clicafri
clicafri
cranocus
crastije
cruswicl
drebruha
dricrope
dricrope
drijomif
dupraspu
dupraspu
duuubesw
frowrudr
frowrudr
frukaphe
gupaprus
gupaprus
guphewri
holofrec
hosticre
hosticre
jichunot
jimouudr
jodruwud
jodruwud
jogucrod
kekajebr
kekajebr
kibenabr
kibreleb
kibreleb
lagiswow
lecidutr
liuihutr
masluwre
masluwre
mewosliw
neruspau
nubabrat
panecrir
pheslepr
prichosp
prohopra
prohopra
prothidi
puswewor
puswewor
puveuosi
rosojano
rowrolum
ruchiuap
rupisepu
slijudru
sofrujil
solugole
solugole
sporanan
sporanan
spuphara
spuphara
staspofr
staspofr
stuswuti
swimicli
swimicli
swolekom
thidreto
thidreto
thogivot
tichepha
tinaswik
trategep
trategep
uibritho
uihestuh
uihestuh
uocreswu
vedotrec
vibichid
wepruuuc
wewusabo
wewusabo
wraclidr
wraclidr
wrasipha
wruuocru
As you can see, almost every password is duplicated at least once.
-----Original Message-----
From: Nathan Cassano [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 5:04 PM
To: 'Ashley M. Kirchner'; [EMAIL PROTECTED]
Subject: RE: [PHP] Password Generator?
Random Pronounceable Password Generator
This function generates random pronounceable passwords. (ie jachudru,
cupheki)
http://www.zend.com/codex.php?id=215&single=1
-----Original Message-----
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 1:20 PM
To: PHP-General List
Subject: [PHP] Password Generator?
Is there an easy way to generate generic passwords based on
(combined) dictionary words? (ej: take two different words and put them
together)
AMK4
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
There is code in the source for NetHack to create pronounceable words.
Also, combining words would probably be somewhat easy. A lazy coder could
import a unix dictionary file into a MySQL table and do "select word from
word order by rand limit 2" and just combine the results.
-----Original Message-----
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 4:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Password Generator?
I believe there is an article on phpbuilder.com on "pronouncable passwords",
which is probably what you'll want to actually do. Using real words would
just be way too resource intensive.
I'd give you the direct link to the article, but it seems my internet
connection only works for NNTP and ftp downloads...my HTTP has broken for
the moment, and I have no idea why ;(
--
Plutarck
Should be working on something...
...but forgot what it was.
""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Is there an easy way to generate generic passwords based on
> (combined) dictionary words? (ej: take two different words and put them
> together)
>
> AMK4
>
> --
> W |
> | I haven't lost my mind; it's backed up on tape somewhere.
> |____________________________________________________________________
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> SysAdmin / Websmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . eFax 248.671.0909
> http://www.pcraft.com . 3550 Arapahoe Ave #6
> .................. . . . . Boulder, CO 80303, USA
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
you could try swapping out some letters with
look-alike alphanum characters to make the password
a bit more secure....
a=@
s=$
d=&
thus, "password" = "p@$$wor&"
> -----Original Message-----
> From: Jon Snell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 11:47 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Password Generator?
>
>
> There is code in the source for NetHack to create pronounceable words.
> Also, combining words would probably be somewhat easy. A lazy coder could
> import a unix dictionary file into a MySQL table and do "select word from
> word order by rand limit 2" and just combine the results.
>
> -----Original Message-----
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 4:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Password Generator?
>
>
> I believe there is an article on phpbuilder.com on "pronouncable passwords",
> which is probably what you'll want to actually do. Using real words would
> just be way too resource intensive.
>
> I'd give you the direct link to the article, but it seems my internet
> connection only works for NNTP and ftp downloads...my HTTP has broken for
> the moment, and I have no idea why ;(
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > Is there an easy way to generate generic passwords based on
> > (combined) dictionary words? (ej: take two different words and put them
> > together)
> >
> > AMK4
> >
> > --
> > W |
> > | I haven't lost my mind; it's backed up on tape somewhere.
> > |____________________________________________________________________
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> > SysAdmin / Websmith . 800.441.3873 x130
> > Photo Craft Laboratories, Inc. . eFax 248.671.0909
> > http://www.pcraft.com . 3550 Arapahoe Ave #6
> > .................. . . . . Boulder, CO 80303, USA
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Just include() it.
Duke wrote:
> I'm setting up an html "shell" for my webpage that I include with my php
> code so I don't have to see html crap and whatnot.
> I'm wondering what the best way is to insert the html "shell" into my code?
> Should I just echo the file, should I include(), require(), include_once(),
> or require_once()??
> One section of the shell, which is in a separate file, is an html form -
> would that change the way I include that particular section of html?
> Thanks.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Easiest way I've possibly found is to shove it inside of a function which
will echo it out, but with all the variables in their proper place.
When I want to display something I just use:
$front_page .= 'Text goes here';
In the function outout_html() I just put $front_page wherever I want it to
be displayed (in the main table). If I'd like to change the format a page is
displayed in I can just adjust the function or make a new one entirely, and
I can avoid making a call to string replacement functions.
Seems to work pretty well. I stick the declaration in a global file that all
my scripts use to keep things simple.
I haven't used a tag other than <p>, </p>, and <br> in weeks.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Duke"" <[EMAIL PROTECTED]> wrote in message
002301c0c87d$9f1e3c80$[EMAIL PROTECTED]">news:002301c0c87d$9f1e3c80$[EMAIL PROTECTED]...
> I'm setting up an html "shell" for my webpage that I include with my php
> code so I don't have to see html crap and whatnot.
> I'm wondering what the best way is to insert the html "shell" into my
code?
> Should I just echo the file, should I include(), require(),
include_once(),
> or require_once()??
> One section of the shell, which is in a separate file, is an html form -
> would that change the way I include that particular section of html?
> Thanks.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Is there any special way or anything I should know about opening connections
to 2 different databases in a php script?
thanks
Randy
All the database connection functions return a connection identifier which
you can then use in any subsequent database function calls.
-Rasmus
On Wed, 18 Apr 2001, Randy Johnson wrote:
> Is there any special way or anything I should know about opening connections
> to 2 different databases in a php script?
>
> thanks
>
> Randy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I am trying to update two tables at once from a form using two Insert
statements:
Should I be using two different variable names for $query? Only one table
updates when I use the same name like this. 2 different variable names
give me an error.
$query = "INSERT INTO $table1 VALUES ('$menu_id', '$server',
'$menunumber', '$menuname')";
$query = "INSERT INTO $table2
VALUES('$submenuid','$submenu','$subrefmenu', '$submreflink')";
$result = mysql_db_query($dbname, $query);
I use one form using one submit button:
<form enctype="multipart/form-data" method="post"
action="<?php echo $PHP_SELF ?>">
<INPUT type="submit" name="submit" value="submit">
<INPUT type=reset value="Reset">�
// Display Results if there are results
if ($result) {
MySQL error 0: menu_id: NULL
--
This email was sent using w3mail.
You need to run the mysql_db_query() twice. Once for each statement, and between the
assignments:
$query = ...;
$mysql_db_query(...);
$query = ...;
$mysql_db_query(...);
> I am trying to update two tables at once from a form using two Insert
> statements:
>
> Should I be using two different variable names for $query?
> Only one table
> updates when I use the same name like this. 2 different
> variable names
> give me an error.
>
> $query = "INSERT INTO $table1 VALUES ('$menu_id', '$server',
> '$menunumber', '$menuname')";
> $query = "INSERT INTO $table2
> VALUES('$submenuid','$submenu','$subrefmenu', '$submreflink')";
>
> $result = mysql_db_query($dbname, $query);
>
> I use one form using one submit button:
>
> <form enctype="multipart/form-data" method="post"
> action="<?php echo $PHP_SELF ?>">
>
>
> <INPUT type="submit" name="submit" value="submit">
> <INPUT type=reset value="Reset">
>
> // Display Results if there are results
> if ($result) {
>
> MySQL error 0: menu_id: NULL
>
>
Hi, I ran into strange problem. I was not able to configure my php.ini file
so it would show up in PHP when running on my IIS5 server (at least showing
up in via php_info()) so I tried to delete all the php.ini files on my
computer (I have a backup though :) and restarted the computer - you know
what, the PHP works perfectly and show the default settings! How come?
I'm using version 4.0.5RC1 as CGI with IIS5 server on W2K.
Has anyone experience the same? How did you get back to controlling you PHP?
Regards,
Sumarlidi Einar Dadason
SED - Graphic Design
------------------------------------------
Phone: (+354) 4615501
Mobile: (+354) 8960376
Fax: (+354) 4615503
E-mail: [EMAIL PROTECTED]
Homepage: www.sed.is <- New Homepage!
------------------------------------------
On Thursday 19 April 2001 15:48, you wrote:
> Hi, I ran into strange problem. I was not able to configure my php.ini
> file so it would show up in PHP when running on my IIS5 server (at
> least showing up in via php_info()) so I tried to delete all the
> php.ini files on my computer (I have a backup though :) and restarted
> the computer - you know what, the PHP works perfectly and show the
> default settings! How come?
Because it uses the default settings :)
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
REALITY.SYS corrupted ... reboot Universe [Y,n]?
Hi there
I have some scripts that do a search in a MySQL database
table.
I want to be able to return rows that match a query, in
order of relevancy.
For example, say I have a table that has the following data
|row_id| data
|------|-------------------------------------
| 1 | cat
| 2 | cat cat
| 3 | cat cat cat
| 4 | cat cat
| 5 | cat cat cat cat cat cat cat
| 6 | cat
| 7 | cat cat cat cat
| 8 | cat cat cat cat cat
I want to do a search that would return row_id 5 first, then
row_id 8, then row_id 7, then 3, etc.
So I want to order the return by relevancy.
What should the sql query look like?
select * from table where data like '%cat%' order by ?????
thanks
-jen
You might try this article on devshed on how to create a search engine using
MySql and php.
http://www.devshed.com/Server_Side/PHP/Search_Engine/
I currently use this same Technique to run our classifieds at
http://www.chieftainclassifieds.com
Thank you
Brian Paulson
Sr. Web Developer
[EMAIL PROTECTED]
http://www.chieftain.com
1-800-269-6397
-----Original Message-----
From: Jen Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 7:57 AM
To: php3 Mailing List
Subject: [PHP] search results return by relevancy
Hi there
I have some scripts that do a search in a MySQL database
table.
I want to be able to return rows that match a query, in
order of relevancy.
For example, say I have a table that has the following data
|row_id| data
|------|-------------------------------------
| 1 | cat
| 2 | cat cat
| 3 | cat cat cat
| 4 | cat cat
| 5 | cat cat cat cat cat cat cat
| 6 | cat
| 7 | cat cat cat cat
| 8 | cat cat cat cat cat
I want to do a search that would return row_id 5 first, then
row_id 8, then row_id 7, then 3, etc.
So I want to order the return by relevancy.
What should the sql query look like?
select * from table where data like '%cat%' order by ?????
thanks
-jen
Note that a LIKE query like that is going to be very slow. You are
better off defining those fields as fulltext fields and using MySQL's
built-in fulltext search capability which will automatically return a
relevance value for each hit.
See http://www.mysql.com/doc/F/u/Fulltext_Search.html
-Rasmus
On Thu, 19 Apr 2001, Jen Hall wrote:
> Hi there
> I have some scripts that do a search in a MySQL database
> table.
> I want to be able to return rows that match a query, in
> order of relevancy.
> For example, say I have a table that has the following data
>
> |row_id| data
> |------|-------------------------------------
> | 1 | cat
> | 2 | cat cat
> | 3 | cat cat cat
> | 4 | cat cat
> | 5 | cat cat cat cat cat cat cat
> | 6 | cat
> | 7 | cat cat cat cat
> | 8 | cat cat cat cat cat
>
> I want to do a search that would return row_id 5 first, then
>
> row_id 8, then row_id 7, then 3, etc.
> So I want to order the return by relevancy.
> What should the sql query look like?
> select * from table where data like '%cat%' order by ?????
>
> thanks
> -jen
>
Try "MATCH (FULLTEXT index columns) AGAINST ('keyword')"
Check the MySQL manual at: <http://www.mysql.com> and search for "match
against" or "fulltext"
You need to build FULLTEXT indexes on the columns you want to search
before you can use the above syntax.
However, it will search and sort by relevance.
On Thursday, April 19, 2001, at 09:56 AM, Jen Hall wrote:
> Hi there
> I have some scripts that do a search in a MySQL database
> table.
> I want to be able to return rows that match a query, in
> order of relevancy.
> For example, say I have a table that has the following data
>
> |row_id| data
> |------|-------------------------------------
> | 1 | cat
> | 2 | cat cat
> | 3 | cat cat cat
> | 4 | cat cat
> | 5 | cat cat cat cat cat cat cat
> | 6 | cat
> | 7 | cat cat cat cat
> | 8 | cat cat cat cat cat
>
> I want to do a search that would return row_id 5 first, then
>
> row_id 8, then row_id 7, then 3, etc.
> So I want to order the return by relevancy.
> What should the sql query look like?
> select * from table where data like '%cat%' order by ?????
>
> thanks
> -jen
--
Clarence
-> [EMAIL PROTECTED]
However, note that MySQL does not include stopwords in the FULLTEXT index
--and it currently considers any word of three characters or less to be a
"stopword". So if you really are searching for words as short as "cat",
this isn't the solution (or else you're going to need to make some
modifications to the MySQL source and re-compile).
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Clarence) wrote:
> Try "MATCH (FULLTEXT index columns) AGAINST ('keyword')"
>
> Check the MySQL manual at: <http://www.mysql.com> and search for "match
> against" or "fulltext"
> You need to build FULLTEXT indexes on the columns you want to search
> before you can use the above syntax.
>
> However, it will search and sort by relevance.
>
>
> On Thursday, April 19, 2001, at 09:56 AM, Jen Hall wrote:
>
> > Hi there
> > I have some scripts that do a search in a MySQL database
> > table.
> > I want to be able to return rows that match a query, in
> > order of relevancy.
> > For example, say I have a table that has the following data
> >
> > |row_id| data
> > |------|-------------------------------------
> > | 1 | cat
> > | 2 | cat cat
> > | 3 | cat cat cat
> > | 4 | cat cat
> > | 5 | cat cat cat cat cat cat cat
> > | 6 | cat
> > | 7 | cat cat cat cat
> > | 8 | cat cat cat cat cat
--
CC
how do I make sure the right connection is being used when I have 2
persistent connections. is there any documentation on this ?
thanks
Randy
Well, you won't have two persistent connections to the same database (for
the same username/password). So, as long as you use the link identifier as
the third argument to the mysql_query function (or mysql...whichever you are
using), that is guarantee enough.
HTH
Sam Masiello
Systems Analyst
Chek.Com
(716) 853-1362 x289
[EMAIL PROTECTED]
-----Original Message-----
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 1:08 PM
Cc: [EMAIL PROTECTED]
Subject: [PHP] multiple connects
how do I make sure the right connection is being used when I have 2
persistent connections. is there any documentation on this ?
thanks
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
You know, I tried this before sending my email, and it didn't work as you
describe. And yes, then I re-checked my .htaccess file, and yes, I had
"sybase" turned off. Doh!
Kirk
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
>
> stripslashes() sees the magic_quotes_sybase setting and behaves
> accordingly.
>
> -Rasmus
>
> On Wed, 18 Apr 2001, Johnson, Kirk wrote:
>
> > With magic_quotes_sybase = on, a single quote in
> Get/Post/Cookie data gets
> > escaped with another single quote. Is there a function analagous to
> > stripslashes that will strip off the escaping quote?
> >
> > TIA
> >
> > Kirk
>
Hi,
Is there any function exists which to open a specific file, then find a
specific word, if found, then replace that word with something else.
re: I know fopen is to open, read, and write to specific file, but not
finding and replacing..
Thank you
Mark
Hello,
something like this:
$filename="your_file_name.txt";
$fp = fopen($filename, "r+") or die ("Could not open file");
$content = fread ($fp, filesize($filename));
$new_content = str_replace("old_word", "new_word", $content);
rewind($fp);
fwrite($fp, $new_content);
ftruncate($fp, ftell($fp));
fclose($fp);
Regards,
Avetis
Mark Lo wrote:
> Hi,
>
> Is there any function exists which to open a specific file, then find a
> specific word, if found, then replace that word with something else.
>
> re: I know fopen is to open, read, and write to specific file, but not
> finding and replacing..
>
> Thank you
>
> Mark
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
On 4/19/2001 11:59 AM this was written:
> Is there any function exists which to open a specific file, then find a
> specific word, if found, then replace that word with something else.
>
> re: I know fopen is to open, read, and write to specific file, but not
> finding and replacing..
Unless someone knows something I don't, the only way I can think of is:
rename file to backup
Open 'infile' backup
Open new outfile (original)
Go through each line reading from infile writing to outfile until you find
the word on the line.
Then do a string replace for that line and write the new line.
Continue this way thoughout the file until the end.
--
Thomas Deliduka
IT Manager
-------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/
"Mark Lo" <[EMAIL PROTECTED]> wrote:
> Is there any function exists which to open a specific file, then find
a
> specific word, if found, then replace that word with something else.
In addition to the solution mentioned using PHP filesystem functions, you
could use Unix command like grep, sed, etc. called from within your PHP
script to accomplish this. Or you could use a search and replace program
like rpl (happens to be free) which you can download from
http://www.laffeycomputer.com/rpl.html. rpl's syntax is very simple - "rpl
'old_string' 'new_string' filename" and you can call it using one of the
program execution functions or by enclosing it within backticks.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
Hello,
I am a Newbie at PHP and I have what may be a simple question.
I will try and describe my situation the best I can.
I am trying to setp up a form that does an automatic execution between mine and
another's site. I have a list of tasks that need to be done. They are all the same
tasks, but each have different variables from the
database, like codes and amounts, etc.
When I click on "Perform Now" on one of the tasks, it works perfectly., but then when
I clcik on the next task, it stated that I already did that task. It appears that it
is using the same info from the last task, instead of
updating the form with the new task's info. Even when I hit refresh it says the same
thing. The only way I can go on to the next task is by opening an entirely new
window. This defeats the purpose of time saving,
because if I open a new window, I have to type in my login and password information to
even get into the admin section. Then have to click on the link to get tot the page.
Then I would have to do it all over again for
the over two hundred tasks I have.
I hope you can understand what I am trying to do. Is there a code that resets the
variables to nill, so that it can grab the new info?
Hopefully, you won't need the code that I've used in order to answer my problem, but
if you do, I will privately email it to you.
Thank you in advance for your help for my situation.
Anthony
http://www.php.net/manual/en/function.unset.php
if you have lots of variables, this might be cumbersome, and there's
probably a better way to do it, but this will do what you're asking for.....
-jack
-----Original Message-----
From: Anthony Daniels [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 12:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Help!
Hello,
I am a Newbie at PHP and I have what may be a simple question.
I will try and describe my situation the best I can.
I am trying to setp up a form that does an automatic execution between mine
and another's site. I have a list of tasks that need to be done. They are
all the same tasks, but each have different variables from the
database, like codes and amounts, etc.
When I click on "Perform Now" on one of the tasks, it works perfectly., but
then when I clcik on the next task, it stated that I already did that task.
It appears that it is using the same info from the last task, instead of
updating the form with the new task's info. Even when I hit refresh it says
the same thing. The only way I can go on to the next task is by opening an
entirely new window. This defeats the purpose of time saving,
because if I open a new window, I have to type in my login and password
information to even get into the admin section. Then have to click on the
link to get tot the page. Then I would have to do it all over again for
the over two hundred tasks I have.
I hope you can understand what I am trying to do. Is there a code that
resets the variables to nill, so that it can grab the new info?
Hopefully, you won't need the code that I've used in order to answer my
problem, but if you do, I will privately email it to you.
Thank you in advance for your help for my situation.
Anthony
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hey Folks:
I am using PHP sessions in IE 5.5 and NN 6 successfully, but I am not able
to retrieve the data from my registered variables in Communicator 4.7. I am
passing the session ID via SID and have turned off cookies in each browser
to simplify testing, although Communicator 4.7 doesn't work with cookies
enabled either.
Research shows that with Communicator 4.7 the session ID is being carried
from one page to the next successfully; however, the registered variables
are not. Outside of the page where they are set and registered, they are
not registered nor set even though the session ID is carried successfully.
session.save_path is set to /tmp. When I start a session in Communicator
4.7, the session file is created in /tmp but it contains no data. When
using IE 5.5 or NN 6, the session file does contain the serialized data for
the registered variables, and everything works as it should.
So, it looks like the problem is that in Communicator 4.7, the serialized
data is not being successfully written to the session file in /tmp. Has
anyone dealt with this problem?
If you're still with me, THANK YOU! I created a simplified test app at the
following URL:
http://puredev.com/session/test1.php
If you would be so kind, open this URL and click on the test2.php link and
you should see the following if the data was retrieved:
Test Results: The session data was transferred.
The code for these two test pages is as follows:
TEST1.PHP
<?php
session_start();
session_register("test");
$test = "The session data was transferred.";
echo "Click this link: <a href=\"test2.php?".SID."\">test2.php</a>";
?>
TEST2.PHP
<?php
session_start();
echo "Test Results: ".$test;
?>
You can also view the results of phpinfo() for me server at
http://puredev.com/session/phpinfo.php.
Thank you in advance!
-luke
Luke Muszkiewicz
Pure Development, LLC
http://puredev.com
Hi,
I was wondering whether anyone could direct me in the direction of creating a search
function like the one on php.net?
I have tried looking rather fruitlessly to implement a system, would one possible
implementation be to use reference files for the information and then use string
matching to analyse the information, or search the source .php files (although
security issues of revealing scripts).
Thanks in advance
You may not like this answer, but before anyone gets too far along with any
site search engine method using PHP, I would suggest a review of something
like http://www.htdig.org/. It is free, it works fast and searches your
site just like a web browser so what it indexes is what your viewers see.
Here are some other references:
http://www.phpbuilder.com/forum/archives/1/2000/10/1/104324
http://www.phpbuilder.com/forum/archives/1/2000/9/1/103222
I use htdig with great success and index my site each morning so all new
forum posts are captured for use during the day.
John
> -----Original Message-----
> From: Kevin A Williams [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 1:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Site Searchable function
>
>
> Hi,
>
> I was wondering whether anyone could direct me in the direction
> of creating a search function like the one on php.net?
>
> I have tried looking rather fruitlessly to implement a system,
> would one possible implementation be to use reference files for
> the information and then use string matching to analyse the
> information, or search the source .php files (although security
> issues of revealing scripts).
>
> Thanks in advance
>
>
there is a good starting point for walking a directory tree and printing
out the names of the files at:
http://www.php.net/manual/en/function.readdir.php
it should be no mean feat to add a search file function and voila....
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
-----Original Message-----
From: Kevin A Williams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 1:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Site Searchable function
Hi,
I was wondering whether anyone could direct me in the direction of
creating a search function like the one on php.net?
I have tried looking rather fruitlessly to implement a system, would one
possible implementation be to use reference files for the information
and then use string matching to analyse the information, or search the
source .php files (although security issues of revealing scripts).
Thanks in advance
Which is better?
function blah() {
switch( $bob ) {
case 1:
return "this";
case 2:
return "that";
default:
return "other";
}
}
function blah() {
$retval = "";
switch( $bob ) {
case 1:
$retval = "this";
break;
case 2:
$retval = "that";
break;
default:
$retval = "other";
break;
}
return $retval;
}
In other words, is it good practice to exit out of a block (any
block... not just switch; if, for, while) prematurely as demon-
strated in the first example? Or should you do it as demon-
strated in the second example?
Chris
On Thursday 19 April 2001 19:57, you wrote:
> Which is better?
>
> function blah() {
> switch( $bob ) {
> case 1:
> return "this";
> function blah() {
> $retval = "";
>
> switch( $bob ) {
> case 1:
> $retval = "this";
> break;
> In other words, is it good practice to exit out of a block (any
> block... not just switch; if, for, while) prematurely as demon-
> strated in the first example? Or should you do it as demon-
> strated in the second example?
Well, what is more readable, understandable, clearer?
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
REALITY.SYS corrupted ... reboot Universe [Y,n]?
i say the first style.
unneeded variables and other thingies just
obscure things and make it harder to maintain.
> -----Original Message-----
> From: Boget, Chris [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Which is better coding style...
>
> Which is better?
>
> function blah() {
> switch( $bob ) {
> case 1:
> return "this";
>
> case 2:
> return "that";
>
> default:
> return "other";
>
> }
> }
>
Thank you, Kelly!!!!
I tried compiling again and seems like was good!
The ./configure that ok.
Now, when I execute $./gmake come to error...
pablo@pablito:~/php4 > gmake
Making all in Zend
gmake[1]: Entering directory `/home/pablo/php4/Zend'
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c zend_ini_parser.c
/usr/share/bison.simple:157: conflicting types for `ini_parse'
./zend_ini_parser.y:51: previous declaration of `ini_parse'
/usr/share/bison.simple: In function `ini_parse':
/usr/share/bison.simple:219: number of arguments doesn't match prototype
/usr/share/bison.simple:157: prototype declaration
gmake[1]: *** [zend_ini_parser.lo] Error 1
gmake[1]: Leaving directory `/home/pablo/php4/Zend'
gmake: *** [all-recursive] Error 1
Please, help me!!!!!!!
Pablo Sabatino.
> ----- Original Message -----
> From: "Kelly Cochran" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 8:30 PM
> Subject: Re: [PHP] `AM_PROG_LIBTOOL' not found in library
>
>
> >
> > Do a 'which libtool' and I'd hazard a guess that it'll find the one in
> > /usr/local/bin first. As it's using that libtool (dir: /usr/local/bin)
> > and your normal automake (dir: /usr/bin), the dirs don't match and
> > aclocal fails, as the warning mentions. Either switch your path around
> > to move /usr/local/bin after /usr/bin (and end up using the libtool your
> > system came with), or reconfigure and reinstall libtool 1.3.5 starting
> > with "./configure --prefix=/usr" which will cause it to install into
> > /usr/bin, /usr/share, etc. (otherwise it defaults to /usr/local which
> > is likely the problem you have right now).
> >
> > Pablo Sabatino wrote:
> > >
> > > Hello!!
> > > I am using php4-cvs on Linux Suse 6.4.
> > > I issued the command ./buildconf and got a message:
> > >
> > > pablo@pablito:~/php4 > ./buildconf
> > > buildconf: checking installation...
> > > buildconf: autoconf version 2.13 (ok)
> > > buildconf: automake version 1.4 (ok)
> > > buildconf: libtool version 1.3.5 (ok)
> > >
> > >
> > > WARNING: automake and libtool are installed in different
> > > directories. This may cause aclocal to fail.
> > > continuing anyway
> > > aclocal: configure.in: 810: macro `AM_PROG_LIBTOOL' not found in
> library
> > > make[1]: *** [aclocal.m4] Error 1
> > > make: *** [all] Error 2
> > > pablo@pablito:~/php4 >
> > >
> > > pablo@pablito:~/php4 > whereis libtool
> > > libtool: /usr/bin/libtool /usr/local/bin/libtool /usr/share/libtool
> > > pablo@pablito:~/php4 > whereis automake
> > > automake: /usr/bin/automake /usr/share/automake
> > > pablo@pablito:~/php4 > whereis automake
> > > automake: /usr/bin/automake /usr/share/automake
> > > pablo@pablito:~/php4 >
> > >
> > > I installed libtool-1.3.5.
> > > Help me, please!!
> > > Pablo Sabatino..
> >
> > -- -
> > Kelly Cochran <[EMAIL PROTECTED]>
> > Technical Staff - funschool.com Corporation
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
How can I do a advanced "string" search in my MySQL tables?
Something like: I have a form with name, phone, age, e-mail... and I want
to fill some of those and search in the database where name has "name
typed in the form" and phone has "number typed in the form"....
How Can I do that by a MySQL command?
I don't know if it's somethin like: select * from users where name like
"%$name%"
regards,
Augusto Cesar Castoldi
"Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote:
> How can I do a advanced "string" search in my MySQL tables?
>
> Something like: I have a form with name, phone, age, e-mail... and I want
> to fill some of those and search in the database where name has "name
> typed in the form" and phone has "number typed in the form"....
>
> How Can I do that by a MySQL command?
>
> I don't know if it's somethin like: select * from users where name like
> "%$name%"
SELECT *
FROM users
WHERE name='$name' AND phone='$phone'
Only use the wildcard character '%' if you want to match records with *part*
of the form text contained in the field. If some of the form fields may be
left blank, you'll have to build the SQL statement programatically so the
WHERE clause only contains the fields that are pertinent to the search.
Trying to work around that by using the '%' wildcard and including all
possible fields in the WHERE clause could greatly increase the time
necessary to run the query *and* it's not helping you learn how to program
efficiently in PHP.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
Please can you guide me, I want to use php to update
the following xml with the values the user fills in.
for example add value="" in the "input type text" line
and add checked to the Radio button line. Is there any
functions in php that can be used to step through a
xml and just update the form object lines(e.g. Text,
Radio, Check...)
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="app.xsl"?>
<?cocoon-process type="xslt"?>
<Form>
<Text LABEL="NAME" SIZE="24" NAME="Name"/>
<Radio LABEL="10" NAME="AGE" VALUE="10"/>
<Radio LABEL="20" NAME="AGE" VALUE="20"/>
<Check LABEL="stamps" NAME="hobby" VALUE="stamps"/>
</Form>
Any guidance would be greatly appreciated,
Thank,
Steve
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
> Any guidance would be greatly appreciated,
Please dont cross post like this these questions should be sent to
php-general. I just got three copies of this in my mailbox which isnt really
necessary now is it?
- James
Whenever I try to mail a form I receive this message:
Warning: <?php_track_vars?> is no longer supported - please use the
track_vars INI directive instead in
/mnt/web/guide/corvettebuyers/www/do_sendfeedback.php on line 1
The form is on a UNIX server with PHP installed. The INI directive has me
confused? Thank you.
I have a text area which the client types information into, but is it
possible to format the text for example if the user hits enter ,then it will
place a line break there,
TIA
george