[PHP] Re: Strange output by phpinfo()

2001-09-23 Thread Elias Santiago

That's the request string of the W32Nimda worm, it has propagated very fast
in the Internet.

Info and tool for removing it are at:
http:[EMAIL PROTECTED]

If you are running under an IIS webserver, it could be the server itself
that could be infected and sending the request string to itself.   The worm
sends various strange requests to ALL servers found with port 80 open,
including the infected server.


Jeroen Geusebroek [EMAIL PROTECTED] wrote in message
01c143d2$293ad840$0101a8c0@pipi">news:01c143d2$293ad840$0101a8c0@pipi...

 While viewing my phpinfo() page, i got this:

 QUERY_STRING
 
 
 
 %u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb
 d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u%u00
 =a

 REQUEST_URI
 /default.ida?XXX
 
 
 X%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9
 090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0
 078%u%u00=a

 Of course I wasn't using this query for my phpinfo() page. Where did PHP
 get this information from? This info was under the header Environment
 Not that I have any troubles with this, but it seems weird to me.

 Thanks,

 Jeroen

 Ps. Of course I know what that QUERY is, but why is it in my phpinfo()
 output when I didn't use that query?




-- 
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] Hello

2001-08-31 Thread Brian Elias


Dear Neighbor:

I'm having a tax problem and I want you to be the beneficiary 
instead of the IRS...

My business has had a phenomenal year so far in 2001. In fact, 
we've done so well I'm probably going to pay 2½ times more corporate 
taxes than I did last year. And if we make any more money this year, 
the tax problem will only get worse... I'll have to pay even more 
money to the IRS.  

I have employees who I don't want to lay-off. So in order to keep 
my employees busy and not give more money to the IRS, I've decided on 
a strategy that's so bold – so daring – that I doubt anyone else 
would even dare try it.  I have decided to offer windows and siding 
to you, at our basic cost.  In other words, I'm going to offer you 
windows and siding for no personal profit whatsoever!  This will 
increase our expenses thereby decrease our percent of profits. Just 
click the link below to set up an appointment with one of my sales 
representatives today!


Brian Elias
President 
Hansons Windows  Siding

P. S. This a one time email offer only good for the next 9 day 
or until we decrease our tax problem.
























**If you wish to have your e-mail removed from our list, please reply to this
email with REMOVE as the subject.



-- 
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] Re: strange error

2001-08-24 Thread Elias Santiago

Brack wrote:

 if you have structure like
 html
 ?php
 if (isset(...)){
 ..;
 }
 elseif (isset()){
 }
 else {
 ..
 ?
 /html
 then you need to insert } before /html
 or if you use syntax


Correct, in part.  The last ELSE has a starting {,  but no ending }.
It should go before the ? not /html, that would place it outside the PHP
code block.


 html
 ?php
 if (isset()):
 ..;
 elseif (isset()):
 ..;
 else:
 ..;
 ?
 /html
 you have to insert endif;
 If you think you did it but still have an error, try to count your if
 statements and endif; maybe something is missing.

 Youri

the correct structure would be:

html
?php
if ( condition ) {
multiple ;
statements for condition=true, all ended with ; (semi-colon) ;
}
elseif ( other_condition) {
multiple ;
statements for other_condition=true, all ended with ; (semi-colon) ;
}
else {
other block ;
of multiple lines ;
}
?
/html

Note that curly braces (expression group) does not need the semicolon after
them.

If the IF, ELSEIF or ELSE constructs just need to execute one line then

html
?php
if (condition)
echo whatever  ;
?
/html

the constructs themselves don't need an ending semicolon

Elias



-- 
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]


Re: [PHP] The future of PHP

2001-08-23 Thread Elias Santiago

two-cents
Almost all modern technologies are the evolution of previous ones:

C - C++,Perl, PHP, Python;   Basic - QBasic - VBasic/ASP;

Even new languages like Rebol are based (in one way or another) to previous
languages.  Anyone could develop a parser/interpreter for any new language
they could devise. Eventually each language develops it's own
characteristics.

/two-cents




Gabe Da Silveira [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Let's not forget the ecosystem in which these different technologies
 thrive.  It's all based on who's paying whom to do what.  The reality of
 the situation is that the people in charge don't know (or care) about
 all these different technologies.  They may make some broad decisions
 (linux vs win), but you can bet they often rely on individual techies to
 help guide them to the solution they need.  As technology advances, you
 can bet the divide between management and development will only widen.
 All that matters now is the end result.  With the disparity in developer
 skill, the difficulty in estimating development time accurately, and the
 increase in processing power there's a lot of room for developers to
 make their own decisions.

 In this kind of environment, there is a lot of room for different
 programming languages.  PHP has the benefits of lightning fast
 development cycles.  Java has the advantage of being a strict, modern,
 fault-tolerant language that lends itself to well-written code.  ASP has
 advantage of MS 'programming for dummies'-style devlopment tools.  Perl
 has the advantage of its text processing abilities.  C has the speed
 advantage by staying barebones and relatively low level for a verbose
 language.

 In order for one of these technologies to die, something has to come
 along with all the advantages and no new disadvantages.  Somehow I don't
 see this happening to open-source projects like PHP, or MySQL.  It's
 much easier to improve them then to develop something better.  I see it
 much more likely that these projects could fork to encompass different
 goals.




 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Dave) wrote:

  He would see JSP at 19.9% and PHP at 11.2 and say that proves his
point.
 
  And flash developers will claim that the only way to create a site is
have
  the
  whole thing Flash and crap flying across the client screen all the
time...
  Untill the modem access market drops below 50% of the users on the
net...
  hard
  time convincing me that 100's of kb in Flash is worth it.
 
  He obviously is sold on JSP...  let him sink with his ship.  PHP isn't
going
  anywhere anytime soon...  not while *nix boxes are still the most stable
  performers for web.

 --
 __
 Gabe da Silveira, Web Designer
 Twin Cities Student Unions
 University of Minnesota
 http://www.coffman.umn.edu

 wFone: (612)624-7270
 eMail: [EMAIL PROTECTED]
 hPage: http://www.visi.com/~jiblet



-- 
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] Re: The future of PHP

2001-08-22 Thread Elias Santiago

Thomas Deliduka [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 A little background... Skip to THE JIST if you wanna make this quick.

 I am on this webmaster's list where most of the people are fairly new
 webmasters. They're just getting the hang of things. I am probably one of
 the only advanced ones on there (not to toot my own horn really) and I'm
one
 of two who use PHP (the other is just learning.)


I don't know if you refer to this list or other one, but I've been a
webmaster since 1993 and in computers in general since 1988 and I also
consider myself of the advanced type.

 I tout PHP and MySQL as awesome, which they are, but I don't say they're
the
 only technology out there.

 There is another guy, a kid, who is a major Java guy and he's BIG into XML
 and JSP.

 Some guy on this list asked what a good dynamic web solution is, I
 immediately chimed in and said PHP was great, free, and on most all linux
 hosts.  Told him how powerful it was and what could be done with it.

 This kid chimes in and says, something to the affect of that if the guy
 wants to live in the past and not let his website go anywhere then he
should
 go with PHP but JSP is the wave of the future and it's more powerful, and
 has the backing of the almighty Sun and the Open Source community (as if
PHP
 doesn't).

 THE JIST

 So, the jist is, what does PHP have to offer to the web in the future?  I
 think it's still a viable option that will be around for at least another
 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
 think?


He MAY be right, may not.  XML is just not so standardized (if in doubt look
how IE and Netscape each implement it their way) I consider XML like
freestyle HTML.   I know this technology has great potential but if
developers don't decide on how to standardize it, it could die young.  PHP
however (as an avid follower) is on a fast track and even Microsoft
considers it a strong contender to ASP.  However, both PHP and XML
technologies are just scripting engines.  Products like the Zend engine are
just starting to scratch the surface for truly dynamic, cached, real-time
web applications.  I'm not saying that either PHP or XML (or any other
technology that comes along) is going to die or leave the other in the
dust but look what has happened with Java, it has certainly lost momentum.


 --

 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.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]




Re: [PHP] Any point in learning ASP/JSP etc?

2001-08-22 Thread Elias Santiago

I have learned (and used) both PHP and ASP.  However, when I was beginning
with PHP, I always made it first on ASP then re-implemented on PHP.  I
always found PHP to be easier, shorter (but more powerful) logic (scripts
are shorter than ASP).

I guess it has served me well, I have learned to do it the HARD way and
then learn to do it easier and in a short time with PHP.  I guess it is  the
experience you have with programming: all the tinkering, discoveries of
unusual command and function behaviors (c'mon we ALL have been tru this!),
OS and web server particularities, etc.  That's the kind of background any
employer would like to know and I have to agree with John in that point.

I specialize in PHP and MySQL on Windows NT/2K with IIS/Apache.  I know it's
impossible to be good in everything, but at least knowing a good piece from
each is not bad either.  For example, you don't have to be Picasso to paint
a house!  I have to admit, that not all people have the *aptitude* to do
this type of work, that's what makes the difference between exceptional
individuals and plain Joes.  I can't judge myself on what type I am, or
believe that I'm something I may not be, that's a judgement others have to
take about me.  I just do my best to be on the exceptionals list.

my 2 cents.


John Meyer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 At 01:29 AM 8/23/01 +0100, you wrote:
 Ah ha, but am I better off becoming a PHP guru or a
 jackofalltrades-notverygoodatanyofthem kind of person ;-)


 I don't know.  I've learned both PHP and ASP, and neither of them have
 decreased the other in terms of learning.
 The fact is, you are going to learn what you are going to learn.  If you
 want to go with PHP only, that's your choice.





-- 
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]




Re: [PHP] The future of PHP

2001-08-22 Thread Elias Santiago

Just by looking at M$ history we all know that their only interest is
$$money$$.  Even if the product is not fully tested/bug-free and if 20% of
it works, they spit it out and leave the dirty work (and headaches) to the
system administrators and everyone else who's not a plain non-technical
user just trying to get their memo or spreadsheet done.  Then after that,
either M$ continues to develop the product with their famous Service
Packs or drop support after 1-3 years and force everyone to move in their
stream (which continues to produce $$money$$ for them).


Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  So, the jist is, what does PHP have to offer to the web in the future?
I
  think it's still a viable option that will be around for at least
another
  6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
  think?

 Personally I would be a hell of a lot more worried if I was in the Java
 camp.  M$ with .NET and especially CLR is gunning directly for Java and
 its position in the enterprise.  PHP will roll with the punches and work
 alongside .NET and CLR and always keep up with all the latest technologies
 out there because PHP is developed by and for the web community.

 Name a single interested web-related technology that PHP can't interact
 with.  I can't think of one.  And as more come out, we'll find ways to get
 PHP to talk to them.

 -Rasmus




-- 
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] Re: how to disable the automated userID/password in Internet Explor er

2001-08-22 Thread Elias Santiago

You need to go to:

Tools - Internet Options - Content (tab) - Autocomplete - clear the box
beneath User names and passwords on forms also press Clear Passwords if
you're concerned about passwords being remembered. Just check/uncheck the
options you need.


Gabe Da Silveira [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Just look through the preferences, disable forms auto-complete.  That
 should take care of it for forms, I don't know about dialog boxes.

 In article
 [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Zhu George-Czz010) wrote:

  Hi, all.
 
 Sorry, I know there is out of the topic, but you are highly possible
to
 help on this.
  My browser --Internet Exporer will remember my userID and password, and
the
  next time, after I type the first char of my user ID, it will
automatically
  fill in the userID and password. Is there a way to disablt it?
 
  Thanks.

 --
 __
 Gabe da Silveira, Web Designer
 Twin Cities Student Unions
 University of Minnesota
 http://www.coffman.umn.edu

 wFone: (612)624-7270
 eMail: [EMAIL PROTECTED]
 hPage: http://www.visi.com/~jiblet



-- 
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]




Re: [PHP] Re: force download in IE -- conclusion

2001-08-22 Thread Elias Santiago

Not necessarily an answer but on my work (a computer center for medical
students) we use a propietary Perl web-based course software and when doing
attachments on email messages on the system's bulletin board, the system
sends a header with appplication/octet-stream and IE 5.5 attaches the
.html extension to some downloads (not all). It is a known IE 5.5 bug, the
only way we have done to try to circumvent it (doesn't work everytime) is to
use the Save Link As feature, and sometimes that does the trick.   IE 5.5
is buggy.

Pierre-Yves [EMAIL PROTECTED] wrote in message
004901c12b54$08c1cb50$0100a8c0@py">news:004901c12b54$08c1cb50$0100a8c0@py...
 I worked on a script like yours for a looong time now!

 I need to force the download of various type of file, doc, pdf, zip, even
 html!

 Your script works fine on Opera 5.02 and netscape 4.76 on my win NT 4.0
box,
 but
 not on IE 5.5 On this one, it offers me to download the script file but
 instead of being
 a php file it has now an html extension !!

 Anyhow, I do have a download by email attachment button also, because I
gave
 up on trying
 to find a script to force download

 py


 - Original Message -
 From: David Minor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 22, 2001 4:10 PM
 Subject: [PHP] Re: force download in IE -- conclusion


  I ran some tests of different header configurations of 6
browser/platform
  combinations to find out what worked and what didn't.  I didn't cover
all
 of
  the platforms available, just those that my user-base uses, so this
isn't
  complete.
 
  combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7
 for
  Mac 9.1.  I tested all of these browsers using/not using 'attachment' in
 the
  Content-Disposition header.  and also changed out the Content-Type
header
  with 'application/octet-stream', 'application/download', and '*/*'.
 
  Here's the summary and what I did to make things work as well as
possible.
  My goal is to prompt the user with a save-as dialog for an mp3 file.
 
  IE5.5 for Mac always uses the quicktime plugin to play the file no
matter
  what the disposition or type is.  (also no matter what the file
extension
  is.  Couldn't figure out how to trick it to download the file.)
 
  IE5.5 for Win98 would attempt to download the file if
 (content-disposition:
  attachment; filename=) attachment was there.
 
  All 3 of the Win98 browsers would do prompt with as few clicks as
possible
  when content-type was application/octet-stream.  Therefore,  I test in
 my
  script for the Mac users and give them Content-type:
 application/downlaod
  while I give other users Content-Type: application/octet-stream.  Of
  course, this doesn't help the IE5.5 Mac users who still have to use
  Downlaod Link to Disk routine to get a save-as prompt.
 
  Anyone who sees different ways this could be done, please respond.
 
  Here's my code:
 
  if (eregi(mac,$HTTP_USER_AGENT))
 $type = application/download;
  else
 $type = application/octet-stream;
 
  // stream file to user
  header(Content-Type: $type);
  header(Content-Disposition: attachment; filename=$filename);
  header(Content-Length: .filesize($tmp_file));
  header(Content-Transfer-Encoding: binary);
  readfile($tmp_file);
 
 
 
  --
  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] Re: Browser Detection Redirection -- PHP or Apache ???

2001-08-19 Thread Elias Santiago

Why not use something easier like phpSniff.

http://phpsniff.sourceforge.net/

You don't need a browscap.ini or troubling around with get_browser();

Elias Santiago

Christopher Raymond [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 PHP Folks:

 Does PHP provide some mechanism for browser detection  redirection or is
 this something that Apache Directives can handle?

 For example: I don't want users with browsers less than 4.0 to actually
load
 a page on our site. Instead, I want them redirected to a page that let's
 them know their browser is in-compatible.

 I know this is something JavaScript can do, but again that relies on the
 browser.


 Thanks for any help,

 Christopher Raymond




-- 
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]




Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!

2001-08-17 Thread Elias Santiago

Me too, I've never had any problems with PHP running it with or without the
%s %s.  I guess that IIS 3 required that, but IIS 4./5 not necessarily
require it (a useful bug??).   Nevertheless, it work without them anyways.
I only wish that the PHP ISAPI module is FINALLY made stable (production
quality) to use it on my sites.

Phil Driscoll [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Thursday 16 August 2001 7:35 pm, Elias Santiago wrote:
  I believe that IIS passes the script name to php.exe with the first %s.
I
  think IIS replaces the first %s with the script name.  From the second
  article, I suppose that if the %s is changed to %S, the name passed to
  php.exe would be UPPERCASE.   Can anyone verify this?

 I can't verify that, but I can verify that I've had php running without
any
 trouble at all ever on about a dozen NT4 boxes without %s %s anywhere in
site
 without any problems at all :)

 Maybe the default behaviour of IIS (since it is the sensible behaviour) is
to
 pass the script name to the exe it calls.

 Cheers
 --
 Phil Driscoll



-- 
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] Interesting links

2001-08-16 Thread Elias Santiago

PHP IDE for Linux Only
  a.. Coffeecup Editor (the best IDE for PHP on Linux) PHP editor
  b.. HTML/PHP editors Quanta
  c.. HTML/PHP editors Blue Fish
  d.. HTML editors AswEdit
On Windows
  a.. PHP IDE and Editor PHP Coder and mirror
  b.. Zend PHP IDE
  c.. IDE for PHP scripting (Web browser)
  d.. Nexidion PHP IDE
  e.. In Source Forge, enter the keyword PHP IDE in Search
PHP IDE for Windows Only
  a.. Soyal, a excellent PHP editor (Windows)
  b.. IDE for PHP editor (Windows)
  c.. IDE for PHP (Windows)
  d.. EditPlus Text editor Win32 (high rating 5 stars)
  e.. eNotepad Win32 (high rating 5 stars)
  f.. PHP editor Win32 (high rating 5 stars)
  g.. UltraEdit Win32 with PHP word file
  h.. ScriptWorx editor Win32 (rating 4.5 stars)
  i.. TextPad editor Win32 (rating 4.5 stars)
  j.. PHP editor ASPEdit (rating 3.5 stars) along with PHP code explorer
(rating 4.5 stars)
  k.. HTML/PHP editor Dreamweaver
  l.. HTML/PHP editor Homesite
  m.. HTML/PHP editor Hotdog
PHP IDE for Both Windows and Linux
  a.. PHP editor (for both Windows and Linux/UNIX) (rating 5 stars).
  b.. HTML/PHP editors Amaya
  c.. Folding text editor (Windows and Linux)
  d.. PHP Editor (Windows and Linux)
  e.. Color editor gvim for PHP (Windows and Linux) at and see also ptags
of PHP
  f.. Jed (Windows and Linux)
Editors for PHP
http://www.itworks.demon.co.uk/phpeditors.htm

http://www.oodie.com/tools/index.php?view=editor




-- 
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]




Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!

2001-08-16 Thread Elias Santiago

I've had PHP 3 to 4.01 and now 4.06 running under NT4 SP6a and now with W2K
 IIS 5.  From my experience, the %s %s is a requirement of IIS (not PHP).
This according to Microsoft rules (apparently %s %s is CASE SENSITIVE):
http://support.microsoft.com/support/kb/articles/Q245/2/25.ASP

The %s %s has to do with script mappings within IIS.  The closest i've found
to an explanation is:
http://support.microsoft.com/support/kb/articles/q190/0/11.asp

apparently the %s %s are not necessary for ISAPI extensions, as seen at:
http://www.microsoft.com/TechNet/prodtechnol/iis/deploy/confeat/cgiis4.asp

I believe that IIS passes the script name to php.exe with the first %s. I
think IIS replaces the first %s with the script name.  From the second
article, I suppose that if the %s is changed to %S, the name passed to
php.exe would be UPPERCASE.   Can anyone verify this?   Apparently, the
second %s is used by IIS to pass any additional parameters to the script.
Like running php.exe from the command line, that would be php script1.php
parameters.  I think IIS requires the %s's to emulate that behavior.  I
know that PHP runs fine without these, but I haven't verified if the
filename of the script passed to php.exe is upper or lower case when the %s
%s is dropped.   I'll have to do some testing and post the results here.

Another MS page worth looking at:
http://www.microsoft.com/technet/prodtechnol/iis/deploy/depovg/miglamp.asp

Who on his sane mind would drop Linux in favor of Win2K and IIS5 (with all
the bugs it has, and those yet to be discovered)?
http://www.microsoft.com/technet/prodtechnol/iis/deploy/depovg/lintowin.asp



Phil Driscoll [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:

   Second, make the application extensions point to php.exe (you
   don't need the
   %s %s stuff).
 
  This I have to disagree with.  Without the %s %s, you are rolling dice
as
  to whether the page will work or not.  I never had this problem with
Apache
  under win32, but I have with IIS.  I would definitely leave them in
there.

 I'll have to strongly disagree with your disagreement ;)

 --
 Phil Driscoll



-- 
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]




Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!

2001-08-16 Thread Elias Santiago

Found MS explanation!  (at least the only place I've found the reason WHY %s
%s must be used)

http://support.microsoft.com/support/kb/articles/Q276/4/94.ASP

I know, this is a KB article for Python, but look closely at the line that
says:
(The two %s after the executable are required for console-based script
interpreters but would not be required for an Internet Server API
[ISAPI]-based script interpreter).

It's the only MS explanation I've seen as to why the %s %s must be used.
If anyone finds anything more in-depth please expand on my comments.

Phil Driscoll [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:

   Second, make the application extensions point to php.exe (you
   don't need the
   %s %s stuff).
 
  This I have to disagree with.  Without the %s %s, you are rolling dice
as
  to whether the page will work or not.  I never had this problem with
Apache
  under win32, but I have with IIS.  I would definitely leave them in
there.

 I'll have to strongly disagree with your disagreement ;)

 --
 Phil Driscoll



-- 
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] Re: Emulating a POST

2001-08-10 Thread elias

hope this helps:

///
?php
// simple post method
// version 1.0 by Andrus ([EMAIL PROTECTED])

// Disclaimer:
// everyone can change or use this code however and wherever they want ;)



 // send out browser headers
 function send_headers ($fp) {
  fputs ($fp, Accept: */*\n);
  fputs ($fp, Accept-Language: en\n);
  fputs ($fp, Connection: Keep-Alive\n);
  fputs ($fp, User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows
98)\n);
 }

 // post data and return reply
 function post_data ($host, $url, $data) {
  $fp = @fsockopen ($host, 80, $errno, $errstr, 120);
  $ret = ;
if (strncasecmp ($url, http://;, 7) == 0) $url = substr
($url, 7);
  $p = strpos ($url, '/');
  if (empty ($p)) {
   $req = /;
  } else {
   $req = substr ($url, $p);
  }
  if ($fp) {
   fputs ($fp, POST $req HTTP/1.0\n);
   send_headers ($fp);
   fputs ($fp, Content-type: application/x-www-form-urlencoded\n);
   $out = ;
   while (list ($k, $v) = each ($data)) {
if(strlen($out) != 0) $out .= ;
$out .= rawurlencode($k). = .rawurlencode($v);
   }
   $out = trim ($out);
   fputs ($fp, Content-length: .strlen($out).\n\n);
   fputs ($fp, $out);
   fputs ($fp, \n);
   while(!feof($fp)){
$ret .= fgets($fp,128);
   }
  fclose ($fp);
  }
  return $ret;
 }
// example how to use:

// following code will post variables login and pass to server
www.something.com script /submit.php
$reply = post_data (www.something.com, /submit.php, array (login =
$username, pass = $password));
?
///
Brandon Orther [EMAIL PROTECTED] wrote in message
00cd01c1204b$d5cdb9b0$0a00a8c0@webintel">news:00cd01c1204b$d5cdb9b0$0a00a8c0@webintel...
 Hello,

 I have used perl to emulate a post with LWP:UserAgent   I am looking for
 the same effect in php.  Does anyone know how I can do this?
 Thank you
 Brandon





-- 
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] Re: Difference between win98 and win2000

2001-08-10 Thread elias

In windows 2000 unless you set permission to write files you can't!
I mean that you have to explicitly specify that a certain folder can be
written to.

... [EMAIL PROTECTED] wrote in message
001d01c1215b$0c7613d0$14794ad3@maidew3qujo5j0">news:001d01c1215b$0c7613d0$14794ad3@maidew3qujo5j0...
My messageboard is working properly in Win98 Apache;
However, it doesn't work properly under Win2000 with the same code.
( Problem: it can save the message but cannot read from file)
I have a questionis there any difference between 98 and 2000?
thx for your help

 ...nick




-- 
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] Re: PHP.exe EAT's my win resources... (!)

2001-08-10 Thread elias

Hmm...Maybe because you're installing PHP as CGI.
ISAPI runs fast only only once as you want. But it's not really stable.

Tribun [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Tach!

 Is that correct, that my php.exe opens each time when a user access a page
 (e.g. on my intranet-page) ??

 Is there no way to say php.exe to run only one time and compile the files
 through this instance???

 I've designed a intranet-platform for LAN-parties and at our last one,
there
 were 505 guys, and ~30 accessed my pages at the same time, so the 2
gig-ram
 high-end-power PC was to slow to return the queries whitin the 180 sec.
 timeout...

 (excause my bad english ;)

 I hope, someone knows an answer...

 10x !

 Tribun
 ---
 www.mp3o.net


 PS: the LAN-Party's HomePage is called: www.lankoeln.com
 (may be some other germans from cologne read this ;)





-- 
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] Re: how 2 read an non-existing file?! (I need help)

2001-08-09 Thread elias

As for snap two, try echoing the filename you're trying to fopen:
do:
$fn = http://babynames.pregnancy.yahoo.com/bnfname?n=$name;
echo $fn\n;
$fp = fopen($fn, r);

Weird...maybe this yahoo service was doing at that moment?

Tribun [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 the following problem:

 I want to read out, if the firstname is a boy's name or a girl's name...

 therefore I've written this code: (which allready works)

 -- snap ---


$fp=fopen('http://www.vornamenlexikon.de/main/suchen.asp?kriterium=searchB1
 =Suchenaction=searchnowsearchby='.$name,r);
  if($fp){
   $daten=fread($fp,10);
   fclose($fp);
   $male='/m.gif';
   $female='/w.gif';
   if((strpos($daten,$female)0)(strpos($daten,$male)0)){
if(strpos($daten,$male)strpos($daten,$female))$result='w';
else $result='m';
   }else if(strpos($daten,$female)0)$result='w';
   else if(strpos($daten,$male)0)$result='m';
  }
  if(empty($result)){


$fp=fopen('http://www.kindername.de/'.strtolower(substr($name,0,1)).'-namen.
 htm',r);
   if($fp){
$namen=array();
$daten=fread($fp,10);
fclose($fp);

$daten=strstr($daten,'font size=4 face=Verdana, Arial, Helvetica,
 sans-serifBVORNAMEN MIT');
for($cnt=0;strpos($daten,'tr')0;$cnt++){
 $daten=substr(strstr($daten,'tr'),4);
 $tag=substr($daten,0,strpos($daten,'/tr'));
 if(strpos($tag,'/td')0){
  $x1=substr(strstr($tag,'td'),4);
  while(strpos($x1,' ')0)$x1=str_replace(' ',' ',$x1);//TAB
  while(strpos($x1,'  ')0)$x1=str_replace('  ',' ',$x1);//DBLSPACE
  $x1=trim($x1);
  for($i=1;strpos($x1,'td')0;$i++){

 $field=strtolower(trim(strip_tags(substr($x1,0,strpos($x1,'/td');
   if($i==1)$namen[$cnt]=array($field);
   else if($i==2)$namen[$cnt]['gender']=trim($field);
   else if($i==3){
while(strpos($field,',')0){
 array_push($namen[$cnt],substr($field,0,strpos($field,',')));
 $field=substr(strstr($field,','),1);
}
array_push($namen[$cnt],$field);
   }else if($i==4){
if(in_array($name,$namen[$cnt]))$result=$namen[$cnt]['gender'];
   }
   $x1=substr(strstr($x1,'td'),4);
  } } } } }
 -- /snap ---

 This code works, but I wanted to include another Datebase (Yahoo)

 So I included this function:

 -- snap ---
  $fp=@fopen('http://babynames.pregnancy.yahoo.com/bnfname?n='.$name,r);
  if($fp){
   $daten=fread($fp,1);
   fclose($fp);
   $male='boy';
   $female='girl';
   if((strpos($daten,$female)0)(strpos($daten,$male)0)){
if(strpos($daten,$male)strpos($daten,$female))$result='w';
else $result='m';
   }else if(strpos($daten,$female)0)$result='w';
   else if(strpos($daten,$male)0)$result='m';
  }
 -- /snap ---

 But this code has no effect. It returns only an Error (404)

 The reason therefore is, that the targetting URL does'nt
 exist:

 Try this URL's

 http://babynames.pregnancy.yahoo.com/bnfname?n=Patrick
 or
 http://babynames.pregnancy.yahoo.com/bnfname.htm?n=Patrick
 http://babynames.pregnancy.yahoo.com/bnfname.?n=Patrick
 http://babynames.pregnancy.yahoo.com/bnfnameBLABLA?n=Patrick

 In a Browser its not nessesary to type in the correct Name
 bnfname. So you can add what ever you want, but the result
 is the same (it works)

 But the problem is, to downloading this file, because then the reason
 is an 404-Error (not existing)

 Does anybody know an answer to this problem???

 How can I download this file anyway... and read out the information
 I want?



 Thanks,
 Tribun (Patrick)
 ---
 www.mp3o.net


 PS: I know. its not the best english ;)






-- 
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] Re: veuillez m'inscrire dans la liste

2001-08-07 Thread elias

Fait cela toi même.

Said El Maataoui [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
merci
_
Le journal des abonnés Caramail - http://www.carazine.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] Best way to take a copy of a Database from Server to server

2001-08-07 Thread elias

Hello.

I have two MySql databases running on different servers. I have no root
access and only PHP + Mysql and MysqlAdmin.

How can i take a dump of first database (which is about 1MB) and restore
that dump on the second one?

Actually, I'm doing a structure dump, but the outputed SQL text is very
big!..I'm not able to paste it all in the second server's sql query textbox.

Any ideas?




-- 
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]




Re: [PHP] Best way to take a copy of a Database from Server to server

2001-08-07 Thread elias

No I don't really have Telnet accessI have only access to phpMyAdmin
2.0.1 via my Hosting Control Panel...
And it happens that both servers have this tool to access the database.

How can I copy from a server to another?

Please Help!


Jon Farmer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can i take a dump of first database (which is about 1MB) and restore
 that dump on the second one?


 If you have Telnet access use the mysqldump and mysql clients to export
then
 import.

 Regards

 Jon




-- 
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]




Re: [PHP] MySql help #1

2001-08-03 Thread elias

Miles,

The LIMIT works great with UPDATE too.

Miles Thompson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Come on, you're pushing SQL in directions it's not supposed to go! It is
 set oriented after all.
 So it's experimentation time. I've never tried, but as LIMIT works on a
 SELECT, try it on an update. And let us know what happened.
 Miles

 At 10:30 AM 8/2/01 +0200, elias wrote:
 How can I update only N fields from the database?
 
 usually we do:
 
 UPDATE table1 SET field='VALUE' WHERE condition1
 
 now I want to update fields with a certain condition but only X fields
out N
 total fields.
 
 ie:
 
 id   value
 --- ---
 1a
 2b
 3c
 4d
 5e
 
 how can i update such like:
 UPDATE table1 SET {only 2 records} value='aa'
 so I have any two fields now have the 'aa' value
 
 
 
 
 
 --
 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] Re: How to create session??

2001-08-03 Thread elias

Please post in text format.

session_start();

if (isset($login))
{
  session_register(name, pwd);
  $name=
  $pwd = 
} else if (isset($logout))
{
  session_unregister(name);
  session_unregister(pwd);
}

-

Balaji Ankem [EMAIL PROTECTED] wrote in message
00db01c11be2$57e26c20$[EMAIL PROTECTED]">news:00db01c11be2$57e26c20$[EMAIL PROTECTED]...
Hi! dearest friend,
  how to create session while login and hoe to end session after pressing
logout button.

Thanks in advance.

Regards
-Balaji



-- 
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]




Re: [PHP] MySql help #1

2001-08-03 Thread elias

the structur is like:
 id, item name, items in stock , frogserialnumber, status
 1,  frog,  7, 002121, Reserved
2,  frog,  7, 101011, Free
1,  frog,  7, 212001, Free

that's why I want to mark only N entries Reserved,

Lawrence Sheed [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
 Have you thought about your database design carefully?

 You might want to create a column for item count

 eg

 id, item name, items in stock
 1,  frog,  7

 if, say a customer orders 3 frogs, decrement the items in stock by 3.

 Just an idea...

 Do you know about database normalization?  How is the database designed?



 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: August 2, 2001 6:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MySql help #1


 Someone purchased items from my site let's say 3 items out of 5 total. All
 items are the same. I just want to update 3 items status to Reserved.
 When he buy he just tell how many and not which ones.

 Lawrence Sheed [EMAIL PROTECTED] wrote in message

[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
 ..
  Sounds like a strange request, what are you trying to do?
 
  I don't think you can do this directly in mysql, but you could build an
  array of results in php.
 
  eg something like (crappy code below)
 
  //Grab results
  $db = mysql_connect($db_domain, $db_user,$db_password);
  mysql_select_db($db_databasename,$db);
  $sqlquery=select ID from table1 where condition1;
  $result = mysql_query ($sqlstring,$db);
  $count=0;
  while ($resultset = mysql_fetch_array ($result)) {
  $array[$count]=$resultset [ID];
  $count++;
  }
 
 
  for ($count=0;$count2;$count++){
  update table1 set field='VALUE' WHERE ID=.$array[$count];
  $result = mysql_query ($sqlstring,$db) or die (mysql_error());
  }
 
  -Original Message-----
  From: elias [mailto:[EMAIL PROTECTED]]
  Sent: August 2, 2001 4:30 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql help #1
 
 
  How can I update only N fields from the database?
 
  usually we do:
 
  UPDATE table1 SET field='VALUE' WHERE condition1
 
  now I want to update fields with a certain condition but only X fields
out
 N
  total fields.
 
  ie:
 
  id   value
  --- ---
  1a
  2b
  3c
  4d
  5e
 
  how can i update such like:
  UPDATE table1 SET {only 2 records} value='aa'
  so I have any two fields now have the 'aa' value
 
 
 
 
 
  --
  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] Re: Make associative array from two arrays

2001-08-02 Thread elias

same same...
Thought there was a PHP function to do that...instead of looping,

Tim Ward [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How about ...

 foreach ($keys as $key=$value) $new_array[$value] = $vals[$key];


 Tim
 --
 From:  elias [SMTP:[EMAIL PROTECTED]]
 Sent:  01 August 2001 15:16
 To:  [EMAIL PROTECTED]
 Subject:  Make associative array from two arrays

 Hello!

 I have two arrays:

 $keys = array(a, b, c, d);
 $vals = array(1, 2, 3, 4);

 I would like to get an associative array holding this:
 $aarray = array(a =1, b=2, c=3, d=4);

 I know I can do it with a while loop...but I wonder if there is
 any
 builtin PHP function that can do that.
 Or a better method other than sort of this:

 $aarray = array();
 for ($i=0;$icount($keys);$i++)
 {
   $aarray[$keys[$i]] = $vals[$i];
 }

 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]




[PHP] Re: Hmmm?

2001-08-02 Thread elias

Why you ppl. do this:
  if ($condition) {
//action 1
//action 2
//action 3

  }

instead of this:
  if ($condition)
  {
//action 1
//action 2
//action 3
  }

with the '}' you'll see directly the new code block that belongs to the IF
statment.

anyway...it's just a style after all
Fredrik Arild Takle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I think it's impossible to read/understand my own scripts if i don't do
it.

 Do:

 ?php
   if ($submit) {
 echo Counting from 1-32br;
 for ($ii = '1'; $ii = '32' $ii++) {
   echo $ii. ;
 }
   }
   echo brAll done!;
 ?

 instead of:

 ?php
 if ($submit) {
 echo Counting from 1-32br;
 for ($ii = '1'; $ii = '32' $ii++) {
 echo $ii. ;
 }
 }
 echo brAll done!;
 ?

 Best Regards
 Fredrik A. Takle

 Keith Jeffery [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Simply indent formatting for readability.  I personally don't indent
after
  the ? tag, but to each his/her own.
 
 
  Kyle Smith [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Whenever i get a php script off a website why is it that most of the
main
  parts in the script have a space from the left border. eg
 
  ?php
  echospazzz;
  ?
 
  
 
  -lk6-
  http://www.StupeedStudios.f2s.com
  Home of the burning lego man!
 
  ICQ: 115852509
  MSN: [EMAIL PROTECTED]
  AIM: legokiller666
 
 
 
 
 





-- 
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] Re: Being a SERVER (you cant kill me, im.... DAMN!!)

2001-08-02 Thread elias

If you're running Windows system and you've got the windonws 98 SE original
cdrom, you can just install from it PWS from:
CDROMDRIVE:\addons\pws (...)

Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] MySql help #1

2001-08-02 Thread elias

How can I update only N fields from the database?

usually we do:

UPDATE table1 SET field='VALUE' WHERE condition1

now I want to update fields with a certain condition but only X fields out N
total fields.

ie:

id   value
--- ---
1a
2b
3c
4d
5e

how can i update such like:
UPDATE table1 SET {only 2 records} value='aa'
so I have any two fields now have the 'aa' value





-- 
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] Mysql Help #2

2001-08-02 Thread elias

Hi again.

$result = mysql_query(SELECT id FROM table);
$id_array = array();

while ($r = mysql_fetch_array($result))
   $id_array[] = $r[id];

// now $id_array[] is an array of IDs that was grabbed from the database.

Any faster and/or better approache to build the $id_array?



-- 
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]




Re: [PHP] MySql help #1

2001-08-02 Thread elias

Someone purchased items from my site let's say 3 items out of 5 total. All
items are the same. I just want to update 3 items status to Reserved.
When he buy he just tell how many and not which ones.

Lawrence Sheed [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
 Sounds like a strange request, what are you trying to do?

 I don't think you can do this directly in mysql, but you could build an
 array of results in php.

 eg something like (crappy code below)

 //Grab results
 $db = mysql_connect($db_domain, $db_user,$db_password);
 mysql_select_db($db_databasename,$db);
 $sqlquery=select ID from table1 where condition1;
 $result = mysql_query ($sqlstring,$db);
 $count=0;
 while ($resultset = mysql_fetch_array ($result)) {
 $array[$count]=$resultset [ID];
 $count++;
 }


 for ($count=0;$count2;$count++){
 update table1 set field='VALUE' WHERE ID=.$array[$count];
 $result = mysql_query ($sqlstring,$db) or die (mysql_error());
 }

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: August 2, 2001 4:30 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] MySql help #1


 How can I update only N fields from the database?

 usually we do:

 UPDATE table1 SET field='VALUE' WHERE condition1

 now I want to update fields with a certain condition but only X fields out
N
 total fields.

 ie:

 id   value
 --- ---
 1a
 2b
 3c
 4d
 5e

 how can i update such like:
 UPDATE table1 SET {only 2 records} value='aa'
 so I have any two fields now have the 'aa' value





 --
 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] Re: re:mysql help #1

2001-08-02 Thread elias

Thanks!
That was exactly what I was looking for!


Andras Balogh [EMAIL PROTECTED] wrote in message
news:011f01c11b39$174c0b70$[EMAIL PROTECTED]...
Hi,

Use limit :

update mytable set status='Reserverd'  where purch_id=1 limit 3;

This is mysql specific i think so it won't work with other db.

Best wishes,

Andras.

elias [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Someone purchased items from my site let's say 3 items out of 5 total. All
 items are the same. I just want to update 3 items status to Reserved.
 When he buy he just tell how many and not which ones.






-- 
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]




Re: [PHP] Re: storing array in mysql

2001-08-01 Thread elias

Well, you have to treat all the user's input as a string actually. So
basically only one data type.
Now as for splitting and joining, you can make up a splitting character
let's say: |*^| and see if the user entered this in some of his input.
It's really rare to have such weird combination of characters to be inputed
by users.
Use javascript to validate before submitting.

well yes, The size of string produced by serialize is huge, why not trying
to compress it before storining it? bzcompress()


Warren Vail [EMAIL PROTECTED] wrote in message
001a01c119ce$88a8b640$b5887ed8@nicker">news:001a01c119ce$88a8b640$b5887ed8@nicker...
 I never seem to be lucky enough to be sure of the type of data stored in a
 php array, since php handles mixtures of types so forgivingly, and because
 most of my data comes from forms, with users key in what they like,
 including double and single quotes, parentheses (and especially commas,
how
 do you prevent breaking up your array and putting it back together with a
 different row count because someone keyed in a comma?), etc.  I would
think
 you would have to go to a lot of trouble to make sure that an array
contains
 only numeric data, or only strings that did not contain problem causing
 characters.

 You are right about more space being required for serialize, I often have
to
 resort to TEXT data types to provide enough space in the column for data
 (65k runs out fast), and that is a bit slower as well.

 Warren

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 31, 2001 8:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: storing array in mysql

 Yes true, you can use serialize.

 But since you know the format of your $array variable (which is simply
 holding one data type) you can safely use split() and join()
 better and smaller when stored in that field because they are comma
 seperated.

 Warren Vail [EMAIL PROTECTED] wrote in message
 001701c119c8$562b0ca0$b5887ed8@nicker">news:001701c119c8$562b0ca0$b5887ed8@nicker...
  What I have used to store an array in mysql is;
 
  $value = addslashes(serialize($array));
  $query = INSERT INTO table (column) VALUES (\$value\)
 
  and upon retrieval
  $query = SELECT column FROM table;
  .
  while($row = mysql_fetch_array($result)) {
  $value = unserialize(stripslashes($row[column]));
  }
 
  Note: serialize allows me to store the array in a single column and
  addslashes makes the data mysql safe (i.e. allows me to store quotes in
 the
  column, just in case they are in the array).
 
  Warren Vail
 
  -Original Message-----
  From: elias [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 31, 2001 4:05 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Re: storing array in mysql
 
  when you submit this form, PHP will give a array variable called $name
 
  you can store in in MySql as:
 
  ?
  // will make the $name as a comma seperated string
  $str = join(,, $name);
  insert into tablename(id, value) VALUES(null, '$str');
  ?
 
  now to reget the array, you can select it back from MySql and split it
as:
  ?
$name = split(,, $str);
  ?
 
  //elias
  Matthew Delmarter [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hi all,
  
   I want to store the results of a multiple select input box in a mysql
   db. The box looks like this:
   select name='name[]' size='5' multiple
   option value='id'name/option
   /select
  
   I cannot seem to store the array in a database and then output the
   result using foreach. Any tips?
  
   Regards,
  
   Matthew Delmarter
   Web Developer
  
   AdplusOnline.com Ltd
   www.adplusonline.com
  
   Phone: 06 8357684
   Cell: 025 2303630
  
 
 
 
  --
  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] Re: warnings in php4

2001-08-01 Thread elias

check php.ini and the key error_reporting

Melania Popescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a lot of php scripts developed with php3.
 I've installed php4 and I get some warnings when I
 evaluate variables there are not set (are empty).
 In php3 there was no problem (no warning).
 If I modify the code by using empty($var) or
 isset($var) it's ok, but there are lots of  such
 issues.
 How could I manage this without major changes?


 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.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] Re: Hmmm?

2001-08-01 Thread elias

It's called identing.
It's just there to make the script more readable. That's common to almost
all programming languages.
Some programmers doesn't ident they code anyhow.
Basically you increase the ident whenever you enter in a deeper code block.

Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Whenever i get a php script off a website why is it that most of the main
parts in the script have a space from the left border. eg

?php
echospazzz;
?



-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] Make associative array from two arrays

2001-08-01 Thread elias

Hello!

I have two arrays:

$keys = array(a, b, c, d);
$vals = array(1, 2, 3, 4);

I would like to get an associative array holding this:
$aarray = array(a =1, b=2, c=3, d=4);

I know I can do it with a while loop...but I wonder if there is any
builtin PHP function that can do that.
Or a better method other than sort of this:

$aarray = array();
for ($i=0;$icount($keys);$i++)
{
  $aarray[$keys[$i]] = $vals[$i];
}

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]




[PHP] Re: how can i send SMS from Php Scripts ?

2001-08-01 Thread elias

hehe:)
but what have you wrote already? 3 words? :)

Damien Camus [EMAIL PROTECTED] wrote in message
sb67ed5f.072@senlis_gwia">news:sb67ed5f.072@senlis_gwia...
Sorry for my english but i'm french




-- 
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] Re: Text Database class

2001-07-31 Thread elias

I don't want to parse XML, nor to install or recompile PHP to support the
DBM,

I just want some class to do the text database manipulation from querying
records, updating and inserting new ones.
like simple SELECT form and UPDATE and INSERT.
but not a complicated SELECT with tons of conditions and joints.

Henrik Hansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 [EMAIL PROTECTED] (Elias) wrote:

   http://www.php.net/manual/en/ref.dba.php
   wasn't what I really wanted,
  
   Any other ideas to use text databases?
  

 xml, csv files, what do you need excatly and how advanced?

 --
 Henrik Hansen



-- 
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] Re: Can't write to file via php, just via ftp...Can anyone help?

2001-07-31 Thread elias

Hmm...I'm not a *nix guru, but I remember there is a command that allows you
to change current user.
so suppose it was called: changeuser, do this with PHP as web user:

1)execute changeuser [ftplogin] [ftppassword]
normally the ftp user have the rights to change mode and write to files
2)execute chmod filename newmode (as ftp user)

hope this gives a hint,

//elias

Stephan HüBner [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello all,

 another newbie-question, probably... :-)

 And sorry for my (possibly) bad english, I'm from Germany.

 the problem I noticed is that I have to write to a file on the server. I
 created a directory where I store the files, upload a data-file into it
and
 tried to write to it via a php-file. But it seems I don't have the right
to
 write to it and somehow I can't change that with the ftp-programm I have
 (Interarchy on the Mac). So, does anybody know if there is a solution
for
 this? I mean, others have to write to the server too, so there must be a
way
 to do it... (btw, it's a linux or unix server where the pages are on).
 Thanks for your thoughts.


 Have a nice day,

 Stephan Huebner




-- 
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] Sort by bigger count(*)

2001-07-31 Thread elias

Hello,

I made a query that uses count(*)
now how can i get the results sorted following the biggest count(*) result?




-- 
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] Re: window.open (javascript)

2001-07-31 Thread elias

can you show us the code that does the window.open('myfile.php?test=hey')
for example ?

Eduardo Kokubo [EMAIL PROTECTED] wrote in message
016e01c119b4$d784d920$a102a8c0@cttmar">news:016e01c119b4$d784d920$a102a8c0@cttmar...
I passed some vars to another page using window.open and it worked fine (but
had to hide the toolbar). The problem is that wen I check their values like
this:
?php
if ($test){
  print bTest: /b;
  print $test;
  print brbr\n;}

if ($adicionais){
  print bInformações adicionais: /b;
  print $adicionais;
  print brbr\n;}

?
This code always prints Teste and a 0 when it shouldn't print anything.

?php
if ($test != 0){
  print bTest: /b;
  print $test;
  print brbr\n;}

if ($adicionais != 0){
  print bInformações adicionais: /b;
  print $adicionais;
  print brbr\n;}

?

This one never prints anything. When I use   or ' ' to check the 0, it
happens the same thing that the first code.
The other vars that don't use if are working fine. Can anybody please
explain this?




-- 
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] Re: php3 - php4

2001-07-31 Thread elias

Edit your PHP.ini file and change the error_reporting to:

error_reporting=E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; show only errors

Liviu Popescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a lot of php scripts developed with php3.
 I've installed php4 and I get some warnings when I
 evaluate variables there are not set (are empty).
 In php3 there was no problem (no warning).
 If I modify the code by using empty($var) or
 isset($var) it's ok, but there are lots of  such
 issues.
 How could I manage this without major changes?


 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.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]




Re: [PHP] Re: window.open (javascript)

2001-07-31 Thread elias

There doesn't seem to be any errors,
but why don't you try to put the names near the '' w/ space characters
between them:
  print window.open
(\professor.php?nome=$nomecurriculo=$curriculointeresse=$interesseadicio
nais=$adicionaispublicacoes=$publicacoes;

Eduardo Kokubo [EMAIL PROTECTED] wrote in message
006d01c119c0$e6bac6a0$a102a8c0@cttmar">news:006d01c119c0$e6bac6a0$a102a8c0@cttmar...
 This is the code. I use print (php) three times but in the end the code is
 generated correctly (another test I'm doing) . I just noticed that the
last
 variable a pass can be checked using if, but the others can't. I also
 changed the name of the variable. instead of $test I use $publicacoes.

 ?
 print script language=javascript\n;
 if (!$foto){
  print window.open (\professor.php?nome=$nome  curriculo=$curriculo 
 interesse=$interesse  adicionais=$adicionais  publicacoes=$publicacoes;
  print \, \Professor\, [\toolbar=no\]);\n;}
 else{
  print window.open (\f3_professor.php?nome=$nome  curriculo=$curriculo

 interesse=$interesse  adicionais=$adicionais  publicacoes=$publicacoes;
  print \, \f3_professor\, [\toolbar=no\]);\n;}

 print /script;
 ?
 - Original Message -
 From: elias [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 31, 2001 10:42 AM
 Subject: [PHP] Re: window.open (javascript)


  can you show us the code that does the
window.open('myfile.php?test=hey')
  for example ?
 
  Eduardo Kokubo [EMAIL PROTECTED] wrote in message
  016e01c119b4$d784d920$a102a8c0@cttmar">news:016e01c119b4$d784d920$a102a8c0@cttmar...
  I passed some vars to another page using window.open and it worked fine
 (but
  had to hide the toolbar). The problem is that wen I check their values
 like
  this:
  ?php
  if ($test){
print bTest: /b;
print $test;
print brbr\n;}
 
  if ($adicionais){
print bInformações adicionais: /b;
print $adicionais;
print brbr\n;}
 
  ?
  This code always prints Teste and a 0 when it shouldn't print
anything.
 
  ?php
  if ($test != 0){
print bTest: /b;
print $test;
print brbr\n;}
 
  if ($adicionais != 0){
print bInformações adicionais: /b;
print $adicionais;
print brbr\n;}
 
  ?
 
  This one never prints anything. When I use   or ' ' to check the 0, it
  happens the same thing that the first code.
  The other vars that don't use if are working fine. Can anybody please
  explain this?
 
 
 
 
  --
  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] Re: Embedding PHP into another application...

2001-07-31 Thread elias

I suggest you go to http://www.nombas.com they have a library that can be
easily implemented in almost any language.
After you have it implemented you'll be having a new scripting language that
is like ECMAScript (or JavaScript)

So since you're looking for something easy, JavaScript is more easier than
PHP.

Good luck.

//elias
Richard Lyle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Everyone,

 I'm currently looking at Lua for use as a embedded scripting language
for
 our game, DarkSpace, http://www.palestar.com.

 However, I'd like to find out if PHP can be compiled into a LIB and linked
 into another application to be used as a embedded scripting language, much
 in the way that mod_php4 get's compiled for apache. Since PHP is so much
 like C/C++ it makes it alot easier to write in than learn an entirely new
 language.

 Time is critical for us, since I need to begin work today..

 Thanks,
 Richard Lyle









-- 
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]




Re: [PHP] Re: storing array in mysql

2001-07-31 Thread elias

Yes true, you can use serialize.

But since you know the format of your $array variable (which is simply
holding one data type) you can safely use split() and join()
better and smaller when stored in that field because they are comma
seperated.

Warren Vail [EMAIL PROTECTED] wrote in message
001701c119c8$562b0ca0$b5887ed8@nicker">news:001701c119c8$562b0ca0$b5887ed8@nicker...
 What I have used to store an array in mysql is;

 $value = addslashes(serialize($array));
 $query = INSERT INTO table (column) VALUES (\$value\)

 and upon retrieval
 $query = SELECT column FROM table;
 .
 while($row = mysql_fetch_array($result)) {
 $value = unserialize(stripslashes($row[column]));
 }

 Note: serialize allows me to store the array in a single column and
 addslashes makes the data mysql safe (i.e. allows me to store quotes in
the
 column, just in case they are in the array).

 Warren Vail

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 31, 2001 4:05 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: storing array in mysql

 when you submit this form, PHP will give a array variable called $name

 you can store in in MySql as:

 ?
 // will make the $name as a comma seperated string
 $str = join(,, $name);
 insert into tablename(id, value) VALUES(null, '$str');
 ?

 now to reget the array, you can select it back from MySql and split it as:
 ?
   $name = split(,, $str);
 ?

 //elias
 Matthew Delmarter [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi all,
 
  I want to store the results of a multiple select input box in a mysql
  db. The box looks like this:
  select name='name[]' size='5' multiple
  option value='id'name/option
  /select
 
  I cannot seem to store the array in a database and then output the
  result using foreach. Any tips?
 
  Regards,
 
  Matthew Delmarter
  Web Developer
 
  AdplusOnline.com Ltd
  www.adplusonline.com
 
  Phone: 06 8357684
  Cell: 025 2303630
 



 --
 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] Re: php_oci8.dll

2001-07-31 Thread elias

Basically if you don't have this file you can't use it.
try to see if it exist first. If not go to www.php4win.de or www.php.net and
download the complete PHP Win32 binaries.

Liviu Popescu2 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have installed PHP4 manually to use it with Win2000
I did everything according to installation guide specifications.
I uncommented,  in php.ini, the line:
extension=php_oci8.dll
Afer I stopped and started the Web server, and try to load a page, I
get:
PHP Warning: Unable to load dynamic library 'c:\php/php_oci8.dll' - The
specified procedure could not be found. in Unknown on line 0.
What should I do?






-- 
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] Re: doubt regarding mysql php

2001-07-30 Thread elias

a = b means
PASSWORD(a) = PASSWORD(b)

therefore,
if correct password is 'a' and it was stored in the database like
PASSWORD(a) then the user's inputed password is 'b' and must be equal like:
PASSWORD(a) = PASSWORD(b)

=

Balaji Ankem [EMAIL PROTECTED] wrote in message
002801c11741$14997940$[EMAIL PROTECTED]">news:002801c11741$14997940$[EMAIL PROTECTED]...
Hi dearest friend,
can we update the same row immediately after selection.

please see the following code at line number 29 it is giving error.

code


?php


  // Connect to MySQL

 $connection = mysql_connect( 'localhost', 'balaji', 'pingpong' )
 or die ( 'Unable to connect to server.' );

 // Select database on MySQL server

 mysql_select_db( 'imac' )
 or die ( 'Unable to select database.' );

 // Formulate the query (inv_tag will come by post method

 $sql1 = SELECT * FROM inventory WHERE inv_tag = '$inv_tag';

 // Execute the query and put results in $result

 $result1 = mysql_query( $sql1 )
 or die ( 'Unable to select the data from inventory.' );


 if ( $result1 )
 {

//change the status of the inventory item in inventory table

$sql2=UPDATE inventory SET inv_status=assigned where
inv_tag='$inv_tag' ;  // This is line number 29.

$result2 = mysql_query( $sql2 )
   or die ( 'Unable to execute query for upadation of
inventory table.' );

  $sql3 = insert into status
values('$inv_name','$inv_type','$inv_tag','$issued_to','$issued_by','$issue_
date');

 $result3 = mysql_query( $sql3 )
   or die ( 'Unable to execute query for insertion in to
status table.' );


  }

 else
 {

 // header( 'WWW-Authenticate: Basic realm=Private' );
 // header( 'HTTP/1.0 401 Unauthorized' );
  echo '$inv_tag does not exist';
  exit;

   }


  ?


please inform if any errors.

Thanks in advance.

Regards
-Balaji



-- 
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] Re: Form Data

2001-07-30 Thread elias

maybe the field is too small to hold the whole value?

some code might also help.

Gerard Samuel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey all.  Another thought.  In a form I have there is a drop down box
 with age groups.  ie 20-25 26-35 etc.  If I submit the form and echo the
variable for the dropdown box, the output is correct ie 20-25.
 When I inject the variable in mysql, the data in the database is 20- or
 35-, its only part of the info.  What needs to done for this to work
 correctly??

 Thanks
 Gerard




-- 
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] Text Database class

2001-07-30 Thread elias

I have hosting plan that doesn't support MySQL nor any Databases...Just PHP.

I'm wondering if there is any text database class that simulates the MySql
queries and function calls.

I mean text database, like all the values and data is stored in a raw text
file.



-- 
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] Re: Text Database class

2001-07-30 Thread elias

Thanks guys, I had no idea about this:
http://www.php.net/manual/en/ref.dba.php
I'll take a look to make sure if that's what i really want.

Elias [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have hosting plan that doesn't support MySQL nor any Databases...Just
PHP.

 I'm wondering if there is any text database class that simulates the MySql
 queries and function calls.

 I mean text database, like all the values and data is stored in a raw text
 file.





-- 
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] Re: calling javascript functions inside PHP

2001-07-30 Thread elias

you really can't do that...
try translating the decoding algorithm to PHP.

Dean Martin [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I use a PHP self-validating form for taking orders off my site. (on submit
 it calls itself and if there are no errors a send variable is set and it
 emails me the information, etc - standard stuff).

 I'd like to start taking CC orders and would like to encode the
information
 using javascript
 http://javascript.internet.com/passwords/virgenere-encryption.html.  I'll
 use a hidden value as a codephrase to encode the CC number, then when I
 receive the order I can go to a secure page on the site to decrypt it.

 The question is - how do I call a javascript function from my PHP code?  I
 want to do the encoding just before I email the form variables.  ie -

 if ($send == yes){
 do javascript encoding of cc number
 $mail (information to me)
 echo (Your Order has been sent)
 }

 Thanks for any help,
 Dean




-- 
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] Re: Text Database class

2001-07-30 Thread elias

http://www.php.net/manual/en/ref.dba.php
wasn't what I really wanted,

Any other ideas to use text databases?

Elias [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have hosting plan that doesn't support MySQL nor any Databases...Just
PHP.

 I'm wondering if there is any text database class that simulates the MySql
 queries and function calls.

 I mean text database, like all the values and data is stored in a raw text
 file.





-- 
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] Re: Text Database class

2001-07-30 Thread elias

thanks for sharing http://www.freesql.org link!

Henrik Hansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 [EMAIL PROTECTED] (Elias) wrote:

   Yes, But I still want to know if any Text Database class exist...
  

 dont know, but I know 2 possible ways you can do it,

 using dbm files to store it in, http://www.php.net/manual/en/ref.dba.php
 using xml files to store it in,
 http://www.php.net/manual/en/ref.domxml.php and
http://www.php.net/manual/en/ref.xml.php

 --
 Henrik Hansen



-- 
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]




Re: [PHP] I want to AUTO_INCREMENT fields

2001-07-27 Thread elias

yes, sort of...
both have same number.

Alexander Skwar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
So sprach »elias« am 2001-07-26 um 11:23:56 +0200 :
 first field is the primary key and is called 'id' and is an integer,
 and i want another field of type integer to be also autoincremented...

Pardon me - but what would be the use??   Both columns would contain the
same numbers, no?

Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 18 hours 13 minutes



-- 
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] $str = var_dump()

2001-07-27 Thread elias

Hello!

Actually, var_dump() dumps directly the structure/content of a variable to
the browser...
Now is there is anyway to capture this output and assign it to a string and
then store it to a file?
for logging/debugging purpose?

$str = var_dump($arrays);

echo on [time] [date] varname dump=$str;


//elias



-- 
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] Re: running a function after a form submit

2001-07-27 Thread elias

why don't you save just before the submit was clicked?
what if he clicks submit and then he quickly closes and cancels everything
out? (you just saved for vain!)

Richard Kurth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there a way to run a function when a form is submitted this is an
  example below this form is being feed buy the form above and when the
  customer verifies the data that has input he submits it again I what
  to fire a function when he submits the second time

 ?
 if (! (isset($action))) {
 ?

 form action=?=basename($PHP_SELF)? method=post
 table width=300 border=0 align=center
 tr
 tdVARFirst Name/VAR/td
 tdinput type=text name=fname value=/td
 /tr
 tr
 tdVARLast Name/VAR/td
 tdINPUT TYPE=text NAME=lname VALUE=/td
 /tr
 tr
 tdVARAddress/VAR/td
 tdINPUT TYPE=text NAME=address VALUE=/td
 /tr
 tr
 td colspan=2 align=centerSCRIPT
 document.write (input type=hidden name='AFFILIATE_ID' value=\ +
GetCookie(AFFILIATE) + \);
 /SCRIPTinput type=hidden name=action value=check
 input type=submit name=submit value=Submit
 input type=Reset/td
 /tr
 /table
 /form
 ?php
  }
 if ($action == 'check') {
 ?
   show the info for customer to varafy
 VARFirst Name/VARnbsp;nbsp;A?echo $fname?/Abr
 VARLast Name/VARnbsp;nbsp;A?echo $lname?/Abr
 VARAddress /VARnbsp;nbsp;A?echo $address?/A br

 FORM ACTION=https://www.paypal.com/cgi-bin/webscr; METHOD=POST
 INPUT TYPE=hidden NAME=last_name VALUE=?echo $lname?
 INPUT TYPE=hidden NAME=address1 VALUE=?echo $address?
 INPUT TYPE=hidden NAME=address2 VALUE=?echo $address2?
 INPUT TYPE=hidden NAME=city VALUE=?echo $city?
 input type=submit name=Submit value=Submit
 /form
 ?savetoafil(); }? I what this function to run after the
 submit button is clicked.




 Best regards,
  Richard
 mailto:[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]




Re: [PHP] best php editor

2001-07-27 Thread elias

Then you must be one of the 3% who voted Bad at cnet.com ;)

Martin Marconcini [EMAIL PROTECTED] wrote in message
001401c11673$9b2926a0$[EMAIL PROTECTED]">news:001401c11673$9b2926a0$[EMAIL PROTECTED]...
  languages. It is called HTML-kit! I absolutely love it and felt I had
 to
  share that love with you all.
 
  It is free. A little like Homesite, except better in my view.
 Certainly
  far
  more feature-rich for PHP scripting.
 
  Unless I'm missing some serious drawback, it's the best editor for web
  work
  I've found!! Works on Windows. Wish they had a Linux version.

 TO be honest, I've used it but it was 2 unstable...

 Regards,

 Martin.




-- 
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] Re: best php editor

2001-07-27 Thread elias

 It is free.
How it's for free? and what's than then:
http://www.chami.com/html-kit/register/

Daniel Goldin ) [EMAIL PROTECTED] wrote in message
000601c1166a$9602e0c0$033a22c7@daniel">news:000601c1166a$9602e0c0$033a22c7@daniel...
 Recently there's been a thread about what editor is best for PHP. I have
 discovered a new (for me) fantastic editor for HTML, PHP and other
scripting
 languages. It is called HTML-kit! I absolutely love it and felt I had to
 share that love with you all.

 It is free. A little like Homesite, except better in my view. Certainly
far
 more feature-rich for PHP scripting.

 Unless I'm missing some serious drawback, it's the best editor for web
work
 I've found!! Works on Windows. Wish they had a Linux version.

 Best,

 Daniel




-- 
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] Re: Global Variables - Local Scope

2001-07-27 Thread elias

$varname = hi!;

function read_global()
{
  $varname = $GLOBLS[varname];
}

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can I read in all of the global variables and give them local
 scope?  PLEASE HELP ME.



-- 
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] I want to AUTO_INCREMENT fields

2001-07-26 Thread elias

Hi!

I want to have to fields,
first field is the primary key and is called 'id' and is an integer,
and i want another field of type integer to be also autoincremented...



-- 
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] Re: Avoiding repost

2001-07-26 Thread elias

I remember seeing a solution for this on PHPBuilder.com plz check it out

Ashley M. Kirchner [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I have a card system that will ask for the required information, and
 one hits a 'Send' button to send the card.  This will submit all the
 information to a database and send the viewer to a 'Thank You' page.
 The problem is, if they hit reload on that (Thank You) page, (and answer
 'yes' to the 'Repost Data' question), a second card will get submitted -
 with the same information as the first.  Needless to say, someone can
 sit at that screen, and hit 'reload' several times and send the same
 card over and over again, flooding the recipient's mailbox.

 How can I avoid this?

 --
 H | Hi, I'm currently out of my mind.  Please leave a message.  BP!
   +
   Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
   Director of Internet Operations / SysAdmin. 800.441.3873 x130
   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.





-- 
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] Anyway to reset MySql's AUTO_INCREMENT counter?

2001-07-26 Thread elias

Hi.

Usually, Any AUTO_INCREMENT field in MySql table will have always an
incrementing value.
Now Suppose I emptied the table and then inserted one record, why not this
record LAST_INSERT_ID is not '1' or '0' and why it is the lastid+1 before I
empty the table?

Can't I reset that pointer w/ deleting the table and creating it again?



-- 
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] Re: Install

2001-07-26 Thread elias

www.activestate.com (Perl)
www.editplus.com (good editor for programming)


Roman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello !

 I want to install perl under apache in windows, please send me some
 information
 how can i install, where I find perl software, where I find some perl
 editor...
 Thanks fo all

 roman




-- 
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]




Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread elias

well yes,
somehow my field has like:

field1
--
1.2
99.123
500x120
561x112
5.5

so as you see this 'field1' have both normal numeric values and sometimes
'YYYxYYY' values...
I thought that MySql can somehow compare  with another number  and
compare correctly x with anoter value just like it: x
anyway...I just forgot about it and droped the YYYxYYY from my table and
only allowed numerical input,

The problem is that I'm using the same field for two type of data storage...

Brad Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I would use something like this:

 Select * from table where value1  500 AND value2  100


 hope this helps,
 brad

  From: elias [EMAIL PROTECTED]
  Date: Fri, 13 Jul 2001 07:06:26 -0700
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql number/string comparing ideas...
 
  Hi!
 
  How is it possible to do a MySql query for something like:
 
  SELECT value from table WHERE value  '500x100'
 
  should return all values that part1 must be less than 500 and part2 less
  than 100? like 499x99 and reject something like: 500x101
 
  please give me suggestions!
 
 
 
 
 
  --
  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]




Re: [PHP] MySql number/string comparing ideas...

2001-07-25 Thread elias

Thank you Brad and Lawrence.

I have agreed to only allow numerical input on this specific field.
And make a new one that allows X and Y ...

Thanks again.

Brad Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 elias,
 I would have to agree with Lawrence, and recommend re-designing your
 database, unless there is a specific reason preventing you doing this (ie
 like months of your life invested in the product  ; )

 otherwise, only allowing numerical input is a good start tho :)

 brad
  From: elias [EMAIL PROTECTED]
  Date: Wed, 25 Jul 2001 10:22:32 +0200
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] MySql number/string comparing ideas...
 
  well yes,
  somehow my field has like:
 
  field1
  --
  1.2
  99.123
  500x120
  561x112
  5.5
 
  so as you see this 'field1' have both normal numeric values and
sometimes
  'YYYxYYY' values...
  I thought that MySql can somehow compare  with another number 
and
  compare correctly x with anoter value just like it: x
  anyway...I just forgot about it and droped the YYYxYYY from my table and
  only allowed numerical input,
 
  The problem is that I'm using the same field for two type of data
storage...
 
  Brad Wright [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I would use something like this:
 
  Select * from table where value1  500 AND value2  100
 
 
  hope this helps,
  brad
 
  From: elias [EMAIL PROTECTED]
  Date: Fri, 13 Jul 2001 07:06:26 -0700
  To: [EMAIL PROTECTED]
  Subject: [PHP] MySql number/string comparing ideas...
 
  Hi!
 
  How is it possible to do a MySql query for something like:
 
  SELECT value from table WHERE value  '500x100'
 
  should return all values that part1 must be less than 500 and part2
less
  than 100? like 499x99 and reject something like: 500x101
 
  please give me suggestions!
 
 
 
 
 
  --
  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] Re: removing lines from array

2001-07-23 Thread elias

$recordsarray = file(records);

$remove = schopf.net;
$temp = array();
for ($i=0;$icount($recordsarray);$i++)
{
  if (!strstr($recordsarray[$i], $remove))
  {
$temp[] = $recordsarray[$i];
  }
}
$recordsarray = $temp;
$lines = join($recordsarray, '\n');
$fp = fopen(records, w);
fwrite($fp, $lines, strlen($lines));
fclose($fp);
.
.
//should work

//elias
Richard Kurth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

   I an trying to figure out how to remove lines from a text file from
   within an array.

   I fill the array with this
   $recordsarray = file (../auto/records);

   The lines I what to remove have this in them
 $remove = schopf.net ;

What I need is how to loop through this array and pull out the lines
that have what is in the $remove variable.

Then I will write the array to a temp file and thin copy it back to
the records file


   This is a small sample of the file I what two remove lines from
  mx - schopf.net High www.schopf.net
 ptr - readinggenius.tv 207.200.75.55 24
 a - time-management-by-higher-productivity.com 207.252.75.55 24
 ptr www speedreading123.com 207.200.75.55 24
 ptr - mindbodyspirit123.com 207.200.75.247 24
 a www schopf.net 207.252.75.242 24
 soa - schopf.net
dns1.northwesthost.com:dns2.northwesthost.com:[EMAIL PROTECTED]:1
0800:3600:604800:86400 -











 Best regards,
  Richard
 mailto:[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] Re: HTTP Authentication and PHP

2001-07-23 Thread elias

Try this when you want to logout:

?
header( 'WWW-Authenticate: Basic realm=Private');
header( 'HTTP/1.0 401 Unauthorized' );
?

//elias

Jason Rennie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 I've been playing around with PHP authentication via HTTP.

 I'm using apache, and when i use the header('WWW_Auth...)

 headers i get a username/password dialog pop up (as i wanted).

 How do i get those values unset in the browser, so that i can get a user
 to re authenticate ?

 I need to get a user to re-auth part way through the use of the app i'm
 writing becasue they are deleting files from a file system.

 Also how would i allow them to logout and let someone else log in.

 The docs seemed to imply that the headers command should have repopped the
 auth box.

 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]




[PHP] Re: a goog whatever you want editor

2001-07-19 Thread elias

As we already run into this sort of discussions...here's my opinion again:
http://www.editplus.com
Fast, light, and powerfull! I use it to edit all my files! even my assembly
projects!

Aniceto Lopez [EMAIL PROTECTED] wrote in message
003701c1103d$d1e24140$2a53a8c0@latinia">news:003701c1103d$d1e24140$2a53a8c0@latinia...
My opinion: UltraEdit https://www.ultraedit.com

cheap, powerfull, totally configurable, ftp included,
http://www.ultraedit.com/products/features.html
free tag list (any code), word files, macros

I use it for html, xml, xsl, wml, php, javascript...



Ani Lopez
http://www.lamundial.net
visit us, download, spread our music




-- 
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] Re: Loading values from a select tag

2001-07-19 Thread elias

select name=my_select multiselect
...
/select

then php would read as:
?
 for ($i=0;$icount($my_select);$i++)
{
  echo Value$i={$my_select[$i]}br;
}
?

Mauricio T?Llez Jim?Nez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all, I want to print all the text stored in a select tag. For
example:

 select name=my_select
 option value=1Hello
 option value=2World
 option value=3Again!!!
 /select

 This is the final select, but is created dinamically with javascript.
 So when the sumbit button is pressed, I want that my php script output the
folowing:

 The number of options is:  X(3 in that example)
 The options was:

 value=1, text=Hello
 value=2, text=World
 value=3, text=Again!!!

 and so on.

 Thanks for your help.



-- 
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] Re: Editing Files Using POST Forms

2001-07-19 Thread elias

try stripcslashes()

Rca Web Development [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have created a php page that accepts a variable called $file using GET.
It
 then displays this in a textarea box. You can then edit the file and click
a
 button to save it and it POSTS it to the same page (edit.php) on the
server.
 This works but it adds slashes before any speech marks (). Can somebody
 help me with this.

 Below is an example of how it changes the code and the code for the page
 edit.php

 Regards,
 Corin Rathbone
 www.corin.org.uk
 -

 A page before editing:
 html
 head
 title/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 meta name=author content=Corin Rathbone 2001
 /head
 body

 div class=headingDelete A File/div

 /body
 /html
 -

 The same page after editing:

 !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01 Transitional//EN\

 html
 head
 title/title
 meta http-equiv=\Content-Type\ content=\text/html;
charset=iso-8859-1\
 meta name=\author\ content=\Corin Rathbone 2001\
 /head
 body

 div class=\heading\Delete A File/div

 /body
 /html
 -

 The edit.php page source:
 ?php
 include config.php;

 //Start Pages PHP here

 if(isset($save)){
 $fp = fopen($file, wb) or die(Could not open file!);
 $worked = fwrite($fp, $contents) or die(Could not write file!);
 fclose($fp) or die(Could not close file!);
 $edit=false;
 $save=true;
 }
 elseif(isset($file)){
 $fp = fopen($file, rb) or die(Could not open file!);
 $contents = fread($fp, filesize($file)) or die(Could not read file!);
 fclose($fp) or die(Could not close file!);
 $edit=true;
 $save=false;
 }
 else{
 $edit=false;
 $save=false;
 }

 //End Pages PHP Here
 ?
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;

 html
 head
 titleEdit A File - File Explorer For ?php print($root_url);?/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 meta name=author content=Corin Rathbone [EMAIL PROTECTED]
 meta name=copyright content=Corin Rathbone 2001
 link rel=stylesheet type=text/css href=main.css
 /head
 body
 !-- Start Of Page Content --

 div class=headingEdit A File/div

 ?php
 if($edit){
 print( Contents Of file: b );
 print( $file );
 print( /b\n );
 print( p align=\center\\n );
 print(  form action=\edit.php\ method=\post\ \n );
 print( input type=\hidden\ name=\file\ value=\ );
 print( $file );
 print( \\n );
 print( input type=\hidden\ name=\save\ value=\1\ );
 print(   textarea name=\contents\ rows=\25\ cols=\90\\n );
 print( $contents );
 print(   /textareabr\n );
 print(   input type=\submit\ value=\Save\\n );
 print(  /form\n );
 print( /p );
 }
 elseif($save){
 print( p align=\center\\n );
 print( File: b );
 print( $file );
 if($worked){print( /b has been saved! );}
 else {print( /b has bnot/b been saved! );}
 print( /p );
 }
 else {
 print( p align=\center\bPlease Select A File To Be
Save!/b/p );
 }
 ?

 !-- End Of Page Content --
 BRBRBR
 div class=copyrightcopy;a href=mailto:[EMAIL PROTECTED];Corin
 Rathbone/a 2001/div

 /body
 /html




-- 
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] Re: screen

2001-07-19 Thread elias

you can clear w/ refreshing!

just do it via javascript as:

script
document.open();
document.close();
/script
Jeremy Morano [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 is there any refresh or clear screen function in php?



-- 
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] Re: Cannot copy a file to a dynamic folder

2001-07-18 Thread elias

Hi!

when you use the \ character in a string you have to escape it by putting
\\ instead of one!

 $default_dir = (D:\www\Proj\$textfield2\);
would become:
$default_dir = D:\\www\\Proj\\$textfield2\\;

do the same for the $filename variable.

Vincent Chew [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I get a parse error every time and I've modified the scripts a bunch of
 times already.

 // Make new directory function
 $default_dir = (D:\www\Proj\$textfield2\);
 if(file_exists($default_dir)) rmdir($default_dir);
 mkdir($default_dir, 0777);

 // Copy template.html to new directory
 $filename = D:Automator\auto_2\Template.html;
 copy($filename, ($default_dir) .overview.html);

 Can I not have these two scripts run together? The mkdir function alone
 works. Can someone tell me what I'm doing wrong?

 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]




[PHP] Re: Force new page in browser and wait commands

2001-07-18 Thread elias

a simple example:

?php
  if (isset($submit))
{
  // process something here with all form's variable
 //example:
echo !-- This page is created for $username --;
}
?
html
headtitletest!/title/head
body
form
name:input type=text name=usernamebr
input type=submit name=submit
/body
/html

In this example you won't see the comment in the start of the page unless
the user processes the form.

Hugh Danaher [EMAIL PROTECTED] wrote in message
002501c10f17$876cbf40$2afeb3d1@default">news:002501c10f17$876cbf40$2afeb3d1@default...
Help, I'm new to php, and to writing software in general.  Enough said on
that.  What I want to do, is to have my program wait for user input on a
form and once data is submitted, to have the browser (IE5) generate a new
page.  Right now, my program runs straight through input forms and appends
everything to the existing page.  I now accomplish this by running several
connected php programs, but want to do it in one program.  I've looked
throughout the php manual and website but have yet to find the right
commands.
Your help is greatly appreciated.
Hugh




-- 
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] Re: How make the time

2001-07-18 Thread elias


select count(*) from test1
where
MINUTE(tm1) = 15
and
MINUTE(tm1) = 30
and
HOUR(tm1)=12

this query will return you on column containing how many record found in
that time range, same as how many customers where surfed at that time
where 30-15=interval
and 12 is the hour you're checking in!

David Tandberg-Johansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello!

 I am trying to make an online booking script for a client (restaurant),
and
 I am using MySQL to store the booking information
 The restaurant have openings hour from 11:00 - 01:00, but do only take
 reservation between 11:00-22:30.
 The client wants to get a report written out over each hour like this:

 11:002 Customers
 11:1532 Customers
 11:3012 Customers
 ...
 ...
 22:3014 Customers

 In the MySQL table I have set up the time field as 'time' with 00:00:00 as
 default.

 Everything is ok, but I am stuck on how to make this report. The customer
 have set an interval of 15 mnutes between possible time to book, so I have
 to make an 'SELECT'-query based on when the restaurant opens to the time
of
 the last possible booking time. But how do I make the timeset (11:00:00
and
 up to 22:30:00)

 My far out example:
 interval = 15;
 while (time=endtime){
 time=starttime
 DBCONNECTION
 Select * from booking wher tine_field='time'
 time = time+interval
 }

 Do anyone have any tips on how I can solve this

 David





-- 
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] Re: How make the time

2001-07-18 Thread elias


select count(*) from test1
where
MINUTE(tm1) = 15
and
MINUTE(tm1) = 30
and
HOUR(tm1)=12

this query will return you on column containing how many record found in
that time range, same as how many customers where surfed at that time
where 30-15=interval
and 12 is the hour you're checking in!

David Tandberg-Johansen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello!

 I am trying to make an online booking script for a client (restaurant),
and
 I am using MySQL to store the booking information
 The restaurant have openings hour from 11:00 - 01:00, but do only take
 reservation between 11:00-22:30.
 The client wants to get a report written out over each hour like this:

 11:002 Customers
 11:1532 Customers
 11:3012 Customers
 ...
 ...
 22:3014 Customers

 In the MySQL table I have set up the time field as 'time' with 00:00:00 as
 default.

 Everything is ok, but I am stuck on how to make this report. The customer
 have set an interval of 15 mnutes between possible time to book, so I have
 to make an 'SELECT'-query based on when the restaurant opens to the time
of
 the last possible booking time. But how do I make the timeset (11:00:00
and
 up to 22:30:00)

 My far out example:
 interval = 15;
 while (time=endtime){
 time=starttime
 DBCONNECTION
 Select * from booking wher tine_field='time'
 time = time+interval
 }

 Do anyone have any tips on how I can solve this

 David







-- 
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] Re: Command line args HELP!!!

2001-07-18 Thread elias

argv
Array of arguments passed to the script. When the script is run on the
command line, this gives C-style access to the command line parameters. When
called via the GET method, this will contain the query string.

argc

Contains the number of command line parameters passed to the script (if run
on the command line).

try'em



Paul A. Procacci [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey all,
 I tried passing an argument to a php script that had a plus sign (+)
 in one of the arguments.  Observe the following:

 sciptname
 http://altavista.com/sites/search/web?q=task+managementpg=qkl=XX

 As it turns out the argument gets split into two seperate arguments, but
 I would like to keep it as one argument.  Does anyone know how to
 accomplish this.  I posted a bug report to bugs.php.net, and they
 responded by telling me to read:
 http://www.php.net/manual/en/language.variables.external.php

 But still after searching that page for the information I was looking
 for, nothing seemed to work.  Am I missing something.  Please let me
 know.

 Thanks,
 Paul




-- 
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] How can i pop my mails?

2001-07-18 Thread elias

Hi

Using PHP, how can i check my mail and dump it to a text file?

As if email2text ?




-- 
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] Re: variables.

2001-07-17 Thread elias

Hmm...
It seems that you're variables are beeing reposted upon each page reload.

yes, some code might help.

Johan Vikerskog [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
.
 ok, i still am a newbie to this and therefor ill ask this silly question.

 I have made a small test script which checks the inputted name and pass
against my database and if
 it was successfull it typed out success! and if it wasnt successfull it
types out wrong password!

 My problem is. everytime i reload the page it prints out the last result.
 I mean when i want to reload the page it should be empty.
 But it isnt.

 Does anyone know how i can do this?
 If you dont understand my question ill post the script here, i just
thought i wouldent flame your mailboxes.

 //Johan



-- 
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] Re: Output (Urgent!)

2001-07-17 Thread elias

Well, Yes...
you have to stick to JavaScript + JavaScript and not JavaScript + PHP!
You can let PHP talk w/ JavaScript and not the reverse!

 SCRIPT LANGUAGE=JavaScript type=text
   if (screen.width = 1024) {
 var resolution = 1024;
   } else {
 var resolution = 800;
   }
  document.write(resolution);
 /SCRIPT

btw, why don't you like it?
Fredrik A. Takle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 This fixed it, but I don't like it! If you have any other suggestions,
feel
 free to email me.

 SCRIPT LANGUAGE=JavaScript
   if (screen.width = 1024) {
 var resolution = (1024)
   } else {
 var resolution = (800)
   }
 /SCRIPT

 Best Regards
 Fredrik A. Takle

 Fredrik A





-- 
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] Re: Known bugs with HTTP upload on Windows NT?

2001-07-17 Thread elias

Hmm...
do you have write access on that directory?
IUSR_xxx and IWAM_ users must be appropriate writes on that folder...

Adam Whitehead [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All-

 I'm having trouble with a simple script that allows HTTP upload. It's a
 direct copy
 of the code available on the PHP web site.

 The script works fine on a UNIX machine running PHP 4.0.6 and a Windows 98
 machine running 4.0.6.

 However when I test it on a Windows NT machine running PHP 4.0.6, as soon
 as
 the submit button is clicked it causes a page fault in php.exe.

 Is this a known issue? In php.ini, the temporary upload path is set to a
 correct
 location and no amount of tweaking this path makes any difference.

 The script looks like this:

 ?php
 if (is_uploaded_file($userfile)) {
   move_uploaded_file($userfile,H:\\www\\uploadtest.txt);
   echo Done.;
 }
 ?

 FORM ENCTYPE=multipart/form-data ACTION=uploadtest.php METHOD=post
   INPUT TYPE=hidden name=MAX_FILE_SIZE value=50
 Send this file: INPUT NAME=userfile TYPE=file
 INPUT TYPE=submit VALUE=Send File
 /FORM

 Regards,
 Adam Whitehead




-- 
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] the triple equal sign?

2001-07-16 Thread elias

What is the '===' ?

Please give me an example.



-- 
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] Re: Credit Card script that really works...

2001-07-13 Thread elias

Go to http://www.webberdev.com and search for a credit card script!
I found one that is very good! and I'm using it.

Dhaval Desai [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi!


 Well I jsut downloaded the credit card script from
 this website:

 http://tobiac.supereva.it/checkcard.zip


 I just have one problem with the script. When the
 checkcard.php page loads for the first time I get this
 message always invalid length INVALID, is there any
 way I can stop this message when it loads for the
 first time...


 I really appreciate any help from anyone...


 Thank You
 Dhaval Desai

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.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] Re: Popquiz...

2001-07-12 Thread elias

How you mean *in it's original form* ?

Lasse [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 ..Or call it a riddle.. Whatever... :-)

 What did the following code look like in it's original form?

 function bitdef($prefix, $name, $bitnum)
 {
 define($prefix.B_.$name, $bitnum);
 define($prefix.F_.$name, 1  $bitnum);
 }

 --
 Lasse






-- 
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] Re: Averaging columns in two tables?

2001-07-12 Thread elias

try,
$result = mysql_query(select avg(tbl1.age) as avg1, avg(tbl2.age) as avg2
from tbl1, tbl2);
$r = mysql_fetch_array($result);
$avg = ($r[avg1] + $r[avg2]) / 2;


Jeff Lewis [EMAIL PROTECTED] wrote in message
007d01c10a36$c657f750$76a1a8c0@LEWISJCIT">news:007d01c10a36$c657f750$76a1a8c0@LEWISJCIT...
Is it possible to get the average of two tables.  I have an age column in
two tables.  I can get the age average for one table both can the average of
both tables be found in one statement?   One table is for hitters, the other
for pitchers.

Jeff




-- 
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] Re: Question

2001-07-12 Thread elias

see eregi()

James W Greene [EMAIL PROTECTED] wrote in message
032f01c109fd$53ad0b70$0cfb94d0@calcutta">news:032f01c109fd$53ad0b70$0cfb94d0@calcutta...
 Hi All,
 I have an e-mail message stored in the var $message  How can I grep
for
 say the From lines and such in $message using PHP.  I tried using
preg_grep,
 but I could not seem to get it to work.  Thanks
 Jim G




-- 
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] Re: time compare in my sql

2001-07-12 Thread elias

try this:
select * from table where TIME(time_field)  = 12

Jack [EMAIL PROTECTED] wrote in message
060101c10b0d$cd941940$[EMAIL PROTECTED]">news:060101c10b0d$cd941940$[EMAIL PROTECTED]...
Hi folks
I have a filed in data type time , how would I compare the value submited
from the form with the value in that filed, which is in format 11:00:00 ?
When I do this in query:

select * from table where time  = '12:00:00'; ( in order select all records
that have time before noon)

it keeps saying sql syntax error.

What should I do?
Jack
[EMAIL PROTECTED]
Love your enemies, it will drive them nuts




-- 
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] Re: Silly table and php question.

2001-07-12 Thread elias

You can also do as:

img src=checkonline.php

and create a file: checkonline.php
?
// make some tests to determine if user is online
  if ($online_condition)
{
  Header(Location: ../images/online.gif);
}
else
{
  Header(Location: ../images/offline.gif);
}
exit();

?

Good luck,

Johan Vikerskog [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
.
 Hi all.
 I know this is a silly question but i dont know how to do it so thats why
i am asking.
 Be gentle towards me. Im just a stupid swede! ;-)

 statement:
 I have a table cell in my upper right corner.

 I have a small php script which checks wheter my user is online or not. If
the user is i want to update that cell
 with an gif that i made that says online.
 How do i update just that cell? Is there a special function in PHP to do
that?

 I know the question is silly but bare with me.

 //Johan



-- 
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] Re: Login system

2001-07-12 Thread elias

I can suggest Session Variables instead of cookies,
Try http://www.zend.com / Tutorial Section there, about Authorization and
Session Variables,

Kristjan Kanarik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Dear list,

I'm sorry to bother (or sorry for being stupid!) , but I've been looking
around for some days and can't find what I'd like to have. My knowledge
about sessions is literally non-existent and therefore I decided not to
start creating a 'bycycle' from scratch.

I'm looking forward for an authorisation system which stores user data
(login name, password, etc.) in the MySQL and only if the user has logged
on he/she has got certain priviliges across the whole site. The people who
haven't logged on, can surf around, but certain features are turned off.
And even more - it would be good if I could customize different users for
different rights.

I managed myself to do the authorisation for a single page, but don't think
it is very secure. I don't want to use cookies and therefore I should be
passing the SID to all URL-s, correct? Does this mean I can't really use
post method with forms?

Any hints, good tutorials, previous discussions? A usable script would be
good... :)

TIA
Kristjan

P.S. [EMAIL PROTECTED] to CC: , I'm on the digest.







-- 
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] Re: Using PHP Variables with a Header

2001-07-12 Thread elias

Hey,

A simple example with one field:

?
  if (isset($submit))
  {
// do fields checking here...
if (empty($fname))
{
  $errmsg = Name not entered please fill it in!;
}
else
{
  // proceed here

}
  }
?
html
body
form
? if (isset($errmsg)) { ?
font color=red?=$errmsg?/font
? } ?
*Name: input type=text name=fname value=?=isset($fname) ? $fname :
?
br
input type=submit name=submit
/form
/body
/html

//Elias
Michael Conley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a form that requires a user to enter various information (name,
 address, phone number, etc...).  When they submit this form, the next PHP
 page checks to make sure that the required fields were filled in.  What I
 would like to do is check to see if the required fields are all filled in
 and if they are not, save the values they submitted and go back to the
 original page, display a message that says the fields that need to be
filled
 in and populate the rest of the fields with the information the user
 orignally submitted.  This will keep them from having to type in all of
the
 information again.

 I can run the checks just fine to see if the required fields are all
filled
 in.  I then save the data from all the fields into variables.  What I
would
 like to do is automatically forward the user back to the original page
with
 the values (i already have all of the fields set with
 value=$variablename to allow them to get the data that is sent back).
 The only way I have been able to get this to work is to set this up as a
 regular form with hidden HTML fields and a Submit button.  I really want
 this to be an automatic process.  Any thoughts on how to accomplish this?
 When I set up a Header, the user is forwarded back to the page that I
 want, but none of the variables go with them (they are set by simply
putting
 something like $savedlastname = $lastname, where $lastname is the HTML
 variable from the original form).

 Any help is appreciated.



-- 
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] Re: $HTTP_REFERER 10

2001-07-12 Thread elias

Maybe what you say about smallest refeerer length is true...
but why don't you check via regexps the validity of the REFEERER format only
if it was set?

InéRcia Sensorial [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Is it possible?

   I am writing a recommend script, and I already know that the
$HTTP_REFERER
 can come empty or even not set, tested turning off the 'Enable Referer
 Logging' on Opera.

   But, an invalid $HTTP_REFERER is also one smaller than 10 characters?

   I believe the smallest referer you can have is 'http://a.jp', for
example,
 but I am not sure.

   Anyone saw a smaller $HTTP_REFERER or have any other ideas to check if
it
 is invalid?

 --

   Julio Nobrega.

 One and One and One is Three





-- 
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] Re: form action problem

2001-07-10 Thread elias

hmmdo again as:

?
  function functionA()
  {
// your function goes here
  }

  if (isset($usefunctiona))
  {
functionA();
  }
?

html
body
 form name=form1 method=post action=?=$PHP_SELF? 
   input type=submit name=usefunctiona value=Use functionA
 /form
/body
/html

//elias!

Brad Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,
  i want to have a submit button on a page that has a php function (on the
 same page) as the action.

 ie.

 form name=form1 method=post action=?PHP functionA() ? 

   input type=submit name=Submit value=Use functionA
 /form

 so when the 'Use functionA' button is pressed, the function 'functionA() '
 is called (using  php variables already defined before the form.)

 Thanks
 Brad




-- 
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] Re: Code Examples for Job Interview

2001-07-10 Thread elias

I invite you to the OzoneAsylum (Forum) where you can have tens of comments
and really helpfull ideas

http://www.ozoneasylum.com


Jcampbell [EMAIL PROTECTED] wrote in message
001e01c108c2$9da68c60$779fadac@dhcpserver">news:001e01c108c2$9da68c60$779fadac@dhcpserver...
 Hey Everyone.

 This isn't a request for code or help, just thoughts and ideas.

 I've recently been asked to bring along some code examples for a job
 interview I will be heading to this week. This was the exact request The
 sample does not have to be within any particular language, but something
 that is a substantive representation of your style and logic. 

 I'm not sure what to take. Most of my PHP and other projects are lengthy
and
 involved. I'm not sure if it would be better to print out functions I've
 created that perform tasks, or just find something that did wonderfully
 challenging things and print that out. Anyone have thoughts on this?



 =-
 Jonathan Campbell ( [EMAIL PROTECTED] )

 Mid days haze and I'm still not awake
 I got everything going but my bills are still late
 Funnier than hell and I think it's a blast
 Life's like a laugh when you got no money

 Lyrics from Average Day by Aztek Trip ( http://www.aztektrip.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] Re: Store uploaded files in MySQL-BLOB

2001-07-10 Thread elias

Tom,

First, I suggest using LONGBLOB as a field...
Second, Once the $userfile is uploaded...use the statment as:

$query = INSERT INTO ... (file) VALUES ( LOAD_FILE($userfile));

using the MySql's LOAD_FILE()

Tom Gitzinger [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi friends,

 could anybody tell me how I best store one or several uploaded files in a
 MySQL database (as a BLOB). I use PHP 3.
 Let's say I have the variable $userfile. Is it possible to simply insert
 this into the database?
 $query = INSERT INTO ... (file) VALUES ( . $userfile . );

 By the way: which version of PHP 3 do you need to upload several files at
 once?

 Tom

 --
 GMX - Die Kommunikationsplattform im Internet.
 http://www.gmx.net

 GMX Tipp:

 Machen Sie Ihr Hobby zu Geld bei unserem Partner 11!
 http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a




-- 
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] Re: http header

2001-07-10 Thread elias

It's called HTTP_REFERER

PHP document:

HTTP_REFERER
The address of the page (if any) which referred the browser to the current
page. This is set by the user's browser; not all browsers will set this.

Jack [EMAIL PROTECTED] wrote in message
05c201c1098e$ee947fc0$[EMAIL PROTECTED]">news:05c201c1098e$ee947fc0$[EMAIL PROTECTED]...
Dear all folks,
I want to get the url of the previous page that my visitor came from. Is
this correct to use http_header? Or what function that will help me do this
job?
Jack
[EMAIL PROTECTED]
Love your enemies, it will drive them nuts




-- 
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] Re: exec(), system() and

2001-07-10 Thread elias

Hmm...

why don't try to use eval()

read the PHP file from within your PHP script
and eval the read file,

Siva Subraj [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear list,

 I have a strange problem with the weird behaviour of exec() or system()

 When I do:
 exec('/usr/local/bin/php somescript.php if=infile.txt of=outfile.txt 
 out_somescript ');

 in a script invoked by apache, it works perfectly - the somescript
processes
 'infile.txt' and produces 'outfile.txt' .

 BUT, if I take off the ampersand ''  (ie  I want to exec it and to wait
for
 it to finish before going ahead),  it does NOT work. I find an empty file
 'out_somescript' and no 'outfile.txt' at all.

 I recompiled php (ELF binary in /usr/local/bin) without
 --enable-force-cgi-redirect
 --enable-safe-mode --enable-discard-path

 All files have universal read permission, the directory is writable by
apache
 group. There is suExec module.

 I also tried system() to make a shell invocation.

 The problem persists: with  it's ok, meanwhile without it doesn't execute
 the script.  What is wrong?  Please help me, thanks!!

 Siva



-- 
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] Re: form action problem

2001-07-10 Thread elias

Adam,
It's really better to use the isset() instead of empty() because if you set
the error level report to E_ALL you will see that PHP will produce warnings
if the variable is not set at all!

Adam [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  hmmdo again as:
 
  ?
function functionA()
{
  // your function goes here
}
 
if (isset($usefunctiona))
{
  functionA();
}
  ?
 
  html
  body
   form name=form1 method=post action=?=$PHP_SELF? 
 input type=submit name=usefunctiona value=Use functionA
   /form
  /body
  /html

 i might try:

 ?php

 function a()
 {
 //same idea put function here
 }

 function b()
 {
 //same idea put function here
 }

 if (!empty($func_a)) {
 a($field1);  //this would assume you have passed a variable in the
form
 to use in the function.
 }else if (!empty($func_b)) {
 b($field1);
 }

 ?

 form name=form1 method=post action=?php echo $PHP_SELF ? 
 input type=text name=field value=insert value to be processed by
 function
 input type=submit name=func_a value=true
 /form

 this would also assume you need multiple functions to be used on the same
 form as submit buttons. This seems like the most logical/simple way to do
 it.

 -Adam





-- 
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] Re: Thumbnail code that will do an entire directory at once

2001-07-10 Thread elias

Great work scot!

Scott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 i wrote a little subroutine to make a directory full of
 images into thumbnails...

 it'll make thumbnail images of a specified height and width
 and properly resize the original image to preserve the
 height to width ratio.

 the syntax of make_thumbs() is this:
 make_thumbs($imagedir, $thumbsdir, $size, $quality, $border);
   imagedir = original images are in this dir
   thumbsdir = thumbnails will be saved in this dir
   size = height and width for the generated thumbnails
   quality = quality of JPG output: worst(0..100)best
   border = how thick of a border to put around the image.

 to see some samples of thumbnails that it's created,
 and get the code, go here:
 http://www.furt.com/code/make_thumbs/



-- 
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] Re: how do i remove the first 3 characters from a variable?

2001-07-09 Thread elias

substr($variable, 0, 3);

Doron [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 10x





-- 
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]




Re: [PHP] PHP and Windows XP

2001-06-28 Thread elias

Why not?
if it works with WinME and PWS, I suppose it will with XP too.

Please try it and report what happens please.

Jochen Kaechelin [EMAIL PROTECTED] wrote in message
NFBBLHGFAKNLFNPOHMPHKEKEDEAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHKEKEDEAA.jk@intern...
 Will PHP run under Windows XP?



 --
 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]




Re: [PHP] Pricing Advice Needed

2001-06-28 Thread elias

It all depends on your experience and knowledge.
You know that if you're too experienced you can save lots of research and
learning time.
therefore you have to estimate how much does your hour cost and how much are
you able to do.
you can start by $20/hour...

Alva Chew [EMAIL PROTECTED] wrote in message
9hejcu$3n6$[EMAIL PROTECTED]">news:9hejcu$3n6$[EMAIL PROTECTED]...
 Hi everyone,

 Just don't really know where to post this, so here goes:

 I am working as a freelance programmer. Problem is I don't really have a
 clue how the pricing mechanism in the industry works. I have heard
 calculations based on man hours and lines of code, so perhaps anyone one
can
 tell me on the average, how much should I be charging per man hour, or per
 line of code?

 Sincere thanks and regards,
 Alva Chew, Singapore



 --
 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] EMAIL to FAX

2001-06-28 Thread elias

Hi!

Is there is any code or class written already that allow PHP to send emails
to fax machines?

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]




  1   2   3   >