Re: [PHP] Problem with backslashes disappearing

2002-03-06 Thread Richard Crawford

Have you tried escaping the backslash character with another one: \\?


On Wed, 2002-03-06 at 06:34, Torkil Johnsen wrote:
 Hello!
 
 I have a simple form taking in some user text input and storing it in a
 mysql database. My problem is that PHP strips off any backslashes in the
 text. I realize that backspace is used as an escape character in PHP, but
 sometimes i DO want it in there!!
 
 Is there a way to do this so that I can store them? For example replacing
 the backslash with some code? Like amp; can replace ?
 
 Anyone?
 
 - Torkil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] Passing verables along from Java Scripts

2002-03-02 Thread Richard Crawford

Variables can only be passed to a PHP script via POST or GET.  So if you
want to pass JavaScript variables to a PHP script, you must do it that
way.

For your second question, look for the window.open() function in
JavaScript.  Your code would look something like this:

 form 
 input type=button value=Press Me
onClick=javascript:window.open(height=400,width=400,other parameters);

 /form 

You must include the form tags for the button to render properly in
Netscape.



On Sat, 2002-03-02 at 12:11, Philip J. Newman wrote:
 Hi there, I have a few java scripts that have some verables that I wish to
 pass along to my PHP scripts.  Any ideas where to start.
 
 Oh yah and noting to do with PHP --
 
 Can anyone give me a small java script that will pop up a 400x400pix window
 when a button is clicked ... can't wortk that out
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] nullifying php and html tags?

2002-02-18 Thread Richard Crawford

Would strip_tags() do?

On Mon, 2002-02-18 at 21:47, Police Trainee wrote:
 Hello. I just finished creating a simple input form in
 which the contents of a textarea get written to a file
 which in turn gets read by a particular page. is there
 anyway to disable any html or php tags that the user
 might have typed in? it seems pretty dangerous to
 allow a user to enter any amount of php programming at
 their will.
 something as simple as a function that strips all 's
 and 's would work just as well i would imagine.
 
 thanks!
 
 -mark
 
 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] What Do You Think?

2002-02-15 Thread Richard Crawford

I'd be much more interested in microbreweries, though.  Most commercial
breweries like Anheuser Busch and Coors don't brew beer.  Send some of
their product to a lab, and the results will say something like, Your
horse has diabetes.

Hmm.  I'd also be interested in a Guinness Finder site.  Plug in your
zip code, and you get a list of all of the pubs and bars in your area
that serve draft Guinness.  I could support a site like that, or help
build one.


On Fri, 2002-02-15 at 11:34, hugh danaher wrote:
 I think you need to give us the link.  Also, I think a site showing where
 all the commercial breweries are would be a nice project.
 hugh
 - Original Message -
 From: Arik Ashepa [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 15, 2002 10:07 AM
 Subject: [PHP] What Do You Think?
 
 
  I hope you won't consider this as spam...
  A Php-Nuke powered web-site, I got a lot of themes, so you can view
  them, but first you need to sign up...
  anyway, give me your honest opinion.
 
  Sincerely
  Arik
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] What Do You Think?

2002-02-15 Thread Richard Crawford

Tetley's is good stuff.

Try Old Nick.  Only beer I've found that needs a chaser.


On Fri, 2002-02-15 at 11:52, Erik Price wrote:
 
 On Friday, February 15, 2002, at 02:40  PM, Richard Crawford wrote:
 
  Hmm.  I'd also be interested in a Guinness Finder site.  Plug in your
  zip code, and you get a list of all of the pubs and bars in your area
  that serve draft Guinness.  I could support a site like that, or help
  build one.
 
 
 Guiness lovers have it easy.  My favorite beer, of all time, which I 
 love with a passion far greater than the zeal of any Guinness drinker on 
 this list, is Tetley's English Ale.  I live for that stuff.
 
 Not only can I hardly find a place with Tetley's on tap, I can hardly 
 find it in stores!
 
 
 LOVE Tetley's.
 
 
 Erik
 
 
 
 
 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] What Do You Think?

2002-02-15 Thread Richard Crawford

Hmm, let's not forget Sam Adams Triple Bock, if you can find it.  I've
got a bottle that a friend of mine gave me for my birthday three years
ago...  I'm still waiting for the perfect reason to drink it (my wife
doesn't drink and I just don't like to drink alone).  Some of my best
work has been done with the help of Triple Bock.


On Fri, 2002-02-15 at 12:24, Miles Thompson wrote:
 Friday afternoon -- one can tell!
 
 My votes are for Propellor Bitter or Garrison Red, both brewed here in Hfx, 
 NS. Availability of the former more or less determines where we have our 
 weekly Linux get-togethers.
 
 It's now 4:30, so I'm raising one to you all - Miles
 
 At 11:56 AM 2/15/2002 -0800, Richard Crawford wrote:
 Tetley's is good stuff.
 
 Try Old Nick.  Only beer I've found that needs a chaser.
 
 
 On Fri, 2002-02-15 at 11:52, Erik Price wrote:
  
   On Friday, February 15, 2002, at 02:40  PM, Richard Crawford wrote:
  
Hmm.  I'd also be interested in a Guinness Finder site.  Plug in your
zip code, and you get a list of all of the pubs and bars in your area
that serve draft Guinness.  I could support a site like that, or help
build one.
   
  
   Guiness lovers have it easy.  My favorite beer, of all time, which I
   love with a passion far greater than the zeal of any Guinness drinker on
   this list, is Tetley's English Ale.  I live for that stuff.
  
   Not only can I hardly find a place with Tetley's on tap, I can hardly
   find it in stores!
  
  
   LOVE Tetley's.
  
  
   Erik
  
  
   
  
   Erik Price
   Web Developer Temp
   Media Lab, H.H. Brown
   [EMAIL PROTECTED]
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 --
 Sliante,
 Richard S. Crawford
 
 mailto:[EMAIL PROTECTED]  http://www.mossroot.com
 AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
 MSN:  [EMAIL PROTECTED]
 
 It is only with the heart that we see rightly; what is essential is
 invisible to the eye.  --Antoine de Saint Exupery
 
 Push the button, Max!
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] how to pass value from popup window to php program

2002-02-06 Thread Richard Crawford

There is no way of passing a variable from JS to PHP without sending
something back to the server or using a cookie.

I haven't followed the thread at all, but if I needed to pass a value
from a pop-up window to a PHP program, I'd probably do something like
this:

In the pop-up window, once the form's submit button is clicked or a
Click here link is clicked, the page calls the PHP program.  The PHP
program processes the variable (sticking the value in the database,
whatever), then outputs a bit of HTML/JS just to close the window.

Note that absolutely NOTHING will happen if the user closes the window
by clicking the close widget on the window itself.


On Wed, 2002-02-06 at 09:36, Erik Price wrote:
 
 On Wednesday, February 6, 2002, at 12:26  PM, bvr wrote:
 
 
  Storing variables on the client-side using JavaScript
  can be done by setting a cookie.
 
  The cookie data will ofcourse be available to PHP when
  the next script is executed (for example through a link or redirect).
 
 
 Ahh... is this the standard procedure for passing variables form JS to 
 PHP?  Is there a way that will work on browsers with cookies disabled?
 
 
 Erik
 
 
 
 
 
 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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




Re: [PHP] header() and frameset

2002-02-01 Thread Richard Crawford

Clarification: this will only work if you put the script inside the page
that the header() command points to.  If you put the header() command in
the same document with this script, then the header() command won't
work, since you'll be sending output to the browser.

Here's a thought.  Use the header() command to redirect to a page which
contains (a) a script to burst the user out of frames, and (b) uses a
META tag or JavaScript to redirect the user to anywhere.com.


On Fri, 2002-02-01 at 09:23, [EMAIL PROTECTED] wrote:
 Anywhere in the head of the page you're gonna bust out, place this 
 small code --
 
script
   if (parent.frames.length  0) {
 parent.location.href = self.document.location
   }
/script
 
 Benjamin deRuyter wrote:
 
  Does anybody know of a way to break out of a frameset while using the
  following code to redirect the browser:
 
  header(Location: http://www.anywhere.com/;);
  exit();
 
  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 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] ereg et all - new question..

2002-01-31 Thread Richard Crawford

Seems like that makes it a LOT easier.

Use eregi_relace() instead of ereg_replace().  eregi allows for
case-insensitivity.

Try

eregi_replace(this,b\\1/b,$str);

That should do it, though I haven't tried it myself.


On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote:
 Maybe I better ask my question different...
 
 what i want to do is, to highlight certain text in a string...
 
 for example: This equals this equals tHis... has to become:
 bThis/b equals bthis/b equals btHis/b... so dispite the case,
 the b's should be put around it...
 
 does that make it easier? not for me :-)
 
 Greets,
 
 Edward
 
 
 - Original Message -
 From: Jeff Sheltren [EMAIL PROTECTED]
 To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, January 31, 2002 11:06 PM
 Subject: Re: [PHP] ereg et all
 
 
  Ahhh, ok makes more sense now.  Although, I don't think that there is an
  easy way to do what you are asking.  I think that in order to accomplish
  that, you will have to specify all possible cases of a string, and have a
  ereg_replace() statement for each of them.
 
  Jeff
 
  At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
  Oh, that was a typo... sorry...
  
  it should be:
  
  This equals this equals tHis - That equals that equals tHat
  
  Edward
  
  - Original Message -
  From: Jeff Sheltren [EMAIL PROTECTED]
  To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Thursday, January 31, 2002 10:56 PM
  Subject: Re: [PHP] ereg et all
  
  
I'm not sure why you wanted the last word tHis to be changed to
 That
(with a capital)... can you explain further?
   
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 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] ereg et all - new question..

2002-01-31 Thread Richard Crawford

Sorry, that should be:

eregi_replace((this),b\\1/b,$str);



On Thu, 2002-01-31 at 14:20, Richard Crawford wrote:
 Seems like that makes it a LOT easier.
 
 Use eregi_relace() instead of ereg_replace().  eregi allows for
 case-insensitivity.
 
 Try
 
   eregi_replace(this,b\\1/b,$str);
 
 That should do it, though I haven't tried it myself.
 
 
 On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote:
  Maybe I better ask my question different...
  
  what i want to do is, to highlight certain text in a string...
  
  for example: This equals this equals tHis... has to become:
  bThis/b equals bthis/b equals btHis/b... so dispite the case,
  the b's should be put around it...
  
  does that make it easier? not for me :-)
  
  Greets,
  
  Edward
  
  
  - Original Message -
  From: Jeff Sheltren [EMAIL PROTECTED]
  To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Thursday, January 31, 2002 11:06 PM
  Subject: Re: [PHP] ereg et all
  
  
   Ahhh, ok makes more sense now.  Although, I don't think that there is an
   easy way to do what you are asking.  I think that in order to accomplish
   that, you will have to specify all possible cases of a string, and have a
   ereg_replace() statement for each of them.
  
   Jeff
  
   At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
   Oh, that was a typo... sorry...
   
   it should be:
   
   This equals this equals tHis - That equals that equals tHat
   
   Edward
   
   - Original Message -
   From: Jeff Sheltren [EMAIL PROTECTED]
   To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
   [EMAIL PROTECTED]
   Sent: Thursday, January 31, 2002 10:56 PM
   Subject: Re: [PHP] ereg et all
   
   
 I'm not sure why you wanted the last word tHis to be changed to
  That
 (with a capital)... can you explain further?

 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 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] ereg et all - new question..

2002-01-31 Thread Richard Crawford

\\1, actually.  \\0 refers to the entire source string, not just to the
part inside the parentheses... so I think it would put the bold tags
around the entire contents of $str, not just the this words.

At least, that's according to the source I'm using (_Professional PHP
Programming_ by Castagnetto, et al).  YMMV, so you may wish to try it
both ways.


On Thu, 2002-01-31 at 14:23, Edward van Bilderbeek - Bean IT wrote:
 Wow, thanks a lot...
 
 although it should be \\0 here...
 
 didn't see anything in the manual about the \\ maybe gotta look for it again
 :-)
 
 Thanks,
 
 Edward
 
 - Original Message -
 From: Richard Crawford [EMAIL PROTECTED]
 To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, January 31, 2002 11:20 PM
 Subject: Re: [PHP] ereg et all - new question..
 
 
  Seems like that makes it a LOT easier.
 
  Use eregi_relace() instead of ereg_replace().  eregi allows for
  case-insensitivity.
 
  Try
 
  eregi_replace(this,b\\1/b,$str);
 
  That should do it, though I haven't tried it myself.
 
 
  On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote:
   Maybe I better ask my question different...
  
   what i want to do is, to highlight certain text in a string...
  
   for example: This equals this equals tHis... has to become:
   bThis/b equals bthis/b equals btHis/b... so dispite the
 case,
   the b's should be put around it...
  
   does that make it easier? not for me :-)
  
   Greets,
  
   Edward
  
  
   - Original Message -
   From: Jeff Sheltren [EMAIL PROTECTED]
   To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
   [EMAIL PROTECTED]
   Sent: Thursday, January 31, 2002 11:06 PM
   Subject: Re: [PHP] ereg et all
  
  
Ahhh, ok makes more sense now.  Although, I don't think that there is
 an
easy way to do what you are asking.  I think that in order to
 accomplish
that, you will have to specify all possible cases of a string, and
 have a
ereg_replace() statement for each of them.
   
Jeff
   
At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
Oh, that was a typo... sorry...

it should be:

This equals this equals tHis - That equals that equals tHat

Edward

- Original Message -
From: Jeff Sheltren [EMAIL PROTECTED]
To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, January 31, 2002 10:56 PM
Subject: Re: [PHP] ereg et all


  I'm not sure why you wanted the last word tHis to be changed to
   That
  (with a capital)... can you explain further?
 
  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 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] Got a problem I cant figure out

2002-01-27 Thread Richard Crawford

Very likely a missing closing brace somewhere in your program.  Look for
unpaired {'s or ('s or ['s.


On Sun, 2002-01-27 at 20:55, Ben Turner wrote:
 Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47
 
 I am receiving this error on my page but the problem is that line 47 is the ? and 
last line of the page.  Is their something Im missing here??  
 
 Thanks,
 Ben
-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED]  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] getting a LAMP job in this economy

2002-01-24 Thread Richard Crawford

Heh.  I got my first web development job back when pretty much anyone 
could hang a shingle outside their door and call themselves a web 
developer.  My company worked in a Linux/PHP/Perl/Oracle environment. 
While there I learned quite a bit about Perl and PHP and connecting both 
of them to Oracle, but you're quite right that none of the jobs out 
there these days advertise for OS skills of any sort.

I may end up moving out of the IT field altogether.  Things have been 
pretty tough.


Vincent Stoessel wrote:

 On another list that I am on someone made this very bold
 statement:
 
 I've seen a lot of jobs for ColdFusion  Oracle or MS SQL server
 experience combinations.  Don't let anyone fool you, PHP/MySQL is not
 going to land you a job  [;)] 
 
 now, as someone that was making avery good living doing Linux based
 web application development last year and now among the jobless I am 
 beginning
 to question the validity of having all of my eggs in the LAMP  (linux 
 apache mysql php)
 basket.  I just recently built a NT4 to do some win based development 
 on. I still have
 not installed any development enviroment cause it just feels so alien. 
 Has anyone else
 out there feeling the pressure of going to the win32 side  to pay the 
 bills.
 Thoughts?
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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

2002-01-21 Thread Richard Crawford

Unfortunately, that won't work if the value of the JS variable needs to 
change dynamically based on user interaction; document.write() only 
works as the page is loaded (well... MSIE might be different, but 
writing MSIE-only code is a bad practice).

The best bet is to use an input field; input fields can change 
dynamically, and the value can be captured using JS's DOM.

But there is absolutely no way around the fact that to send a JS 
variable to a PHP script, you must send that variable back to the server 
via POST or GET.



Tim Ward wrote:

 Or get the JS to rewrite a query string in a link, but personally I wouldn't
 rely on JS that far.
 
 Tim
 www.chessish.com http://www.chessish.com 
 
   --
   From:  Richard Crawford [SMTP:[EMAIL PROTECTED]]
   Sent:  20 January 2002 23:32
   To:  Mårten Andersson
   Cc:  [EMAIL PROTECTED]
   Subject:  Re: [PHP] PHP-JavaScript
 
   In a word... No.
 
   Well...
 
   No.
 
 
   Mårten Andersson wrote:
 
Is it posible to get values from javascript to PHP? Without having
 to 
post the variables..

Thanks //Mårten

_
Chatta med vänner online, prova MSN Messenger:
 http://messenger.msn.se


 
 
 
   -- 
   Sliante,
   Richard S. Crawford
 
   mailto:[EMAIL PROTECTED] 
   http://www.mossroot.com
   AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
   MSN:  [EMAIL PROTECTED]
 
   It is only with the heart that we see rightly; what is essential is
 
   invisible to the eye.  --Antoine de Saint Exupery
 
   Push the button, Max!
 
   
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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

2002-01-21 Thread Richard Crawford

Yes, but only in MSIE.  As far as I know, no other browser supports the 
innerHTML property; at least, I have never managed to get it to work in 
Netscape, Mozilla, Konquerer, or Opera.  And I stand firmly behind my 
earlier statement that developing code that bombs on non-MSIE browsers 
is a bad practice.  This is why I didn't recommend use of the innerHTML 
property.  :)


Tim Ward wrote:

 hence my qualification, but you can alter the contents of elements using
 javascript on the fly, using the innerHTML property, for example.
 
   Tim
   www.chessish.com
 
 
-Original Message-
From: Richard Crawford [SMTP:[EMAIL PROTECTED]]
Sent: 21 January 2002 15:59
To:   Tim Ward
Cc:   Mårten Andersson; [EMAIL PROTECTED]
Subject:  Re: [PHP] PHP-JavaScript

Unfortunately, that won't work if the value of the JS variable needs to 
change dynamically based on user interaction; document.write() only 
works as the page is loaded (well... MSIE might be different, but 
writing MSIE-only code is a bad practice).

The best bet is to use an input field; input fields can change 
dynamically, and the value can be captured using JS's DOM.

But there is absolutely no way around the fact that to send a JS 
variable to a PHP script, you must send that variable back to the server 
via POST or GET.



Tim Ward wrote:


Or get the JS to rewrite a query string in a link, but personally I

wouldn't

rely on JS that far.

Tim
www.chessish.com http://www.chessish.com 

 --
 From:  Richard Crawford [SMTP:[EMAIL PROTECTED]]
 Sent:  20 January 2002 23:32
 To:  Mårten Andersson
 Cc:  [EMAIL PROTECTED]
 Subject:  Re: [PHP] PHP-JavaScript

 In a word... No.

 Well...

 No.


 Mårten Andersson wrote:

  Is it posible to get values from javascript to PHP? Without having
to 
  post the variables..
  
  Thanks //Mårten
  
  _
  Chatta med vänner online, prova MSN Messenger:
http://messenger.msn.se
  
  



 -- 
 Sliante,
 Richard S. Crawford

 mailto:[EMAIL PROTECTED] 
 http://www.mossroot.com
 AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
 MSN:  [EMAIL PROTECTED]

 It is only with the heart that we see rightly; what is essential is

 invisible to the eye.  --Antoine de Saint Exupery

 Push the button, Max!

 






-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
  http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] How should I cache database data for php?

2002-01-21 Thread Richard Crawford

Are you sure that cacheing database data is the right way to approach 
the problem?  How about using a cron job to write static HTML pages from 
live data?  You could set up such a system to run every few hours or so. 
  I haven't done that in PHP, but it's something I'm looking at doing 
for a Perl project I'm working on.

It seems to me that the major problem with news sites such as cnn.com or 
msnbc.com on dates like 9/11 was the sheer number of visitors coming to 
the site.  No matter how the pages were served up, the load was 
unbearable for the servers.


val petruchek wrote:

Since reading your first post I've been racking my brains/teasing my

 memory. I'm sure there's an article on one
 
of the popular PHP sites that talks about exactly this: creating a web

 page dynamically, but serving it as
 
static HTML (ie with no back-end db access per serving).

 
 This idea came to me after September 11 - many news sites were down because
 of too many visitors.
 Some of them refused from dynamic page generation to survive, because huge
 amounts of visitors looked like hacker attack.
 
 In any case this is obvious solution of a problem ;)
 
 
 Valentin Petruchek (aki Zliy Pes)
 http://zliypes.com.ua
 mailto:[EMAIL PROTECTED]
 
 
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] How should I cache database data for php?

2002-01-21 Thread Richard Crawford

Even with straight HTML, a server's load capacity is not infinite.  If 
my own server, an old Pentium with 4 GB of hard drive space, and which 
serves nothing but static HTML pages, got hit with more than a couple 
hundred hits in a short period of time, it would bomb.

I must be misunderstanding your question.  I've re-read your original 
post, and it seems to me that what you're trying to do is save 
webpage-bound database data in a way which will seriously reduce the 
load on a webserver; creating static HTML pages from database data 
instead of building pages dynamically when the user calls them would 
accomplish that goal, and that is what I was suggesting.



val petruchek wrote:

It seems to me that the major problem with news sites such as cnn.com or
msnbc.com on dates like 9/11 was the sheer number of visitors coming to
the site.  No matter how the pages were served up, the load was
unbearable for the servers.

 
 You see, giving user static or dynamic pages differs a lot.
 
 Just send html or generate it before with php is not the same.
 
 Valentin Petruchek (aki Zliy Pes)
 http://zliypes.com.ua
 mailto:[EMAIL PROTECTED]
 
 
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] How should I cache database data for php?

2002-01-21 Thread Richard Crawford

DL Neil wrote:

Even with straight HTML, a server's load capacity is not infinite.  If
my own server, an old Pentium with 4 GB of hard drive space, and which
serves nothing but static HTML pages, got hit with more than a couple
hundred hits in a short period of time, it would bomb.

I must be misunderstanding your question.  I've re-read your original
post, and it seems to me that what you're trying to do is save
webpage-bound database data in a way which will seriously reduce the
load on a webserver; creating static HTML pages from database data
instead of building pages dynamically when the user calls them would
accomplish that goal, and that is what I was suggesting.

You are right ;)

 
 
 er, yes and no!
 
 Jeff's original post mentioned reducing load on the db server - are the db and web 
servers on the same physical
 device - and thus his concern?
 - or perhaps if there are other apps needing to 'compete' with the web server to 
gain access to the db
 concurrently?
 
 =dn


In which case, it seems to me that my solution would still be a good 
one.  Reducing the number of hits on the database server by building 
static pages as needed to be served up by a web server would still 
reduce the load on the database server.


-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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

2002-01-20 Thread Richard Crawford

In a word... No.

Well...

No.


Mårten Andersson wrote:

 Is it posible to get values from javascript to PHP? Without having to 
 post the variables..
 
 Thanks //Mårten
 
 _
 Chatta med vänner online, prova MSN Messenger: http://messenger.msn.se
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] /19, the / doesn't work??

2002-01-18 Thread Richard Crawford

That's weird.  But try '\/19; use the back-slash to escape the control 
character.


Scott Fletcher wrote:

 Hi!
 
 When I put the data, /19; into a PHP variable,   I found that it
 produce only 9 in the variable.  PHP probably think that /1 is like
 /r, /n, etc.  So, what substitute do I need to use to make it /19
 instead of 9.  I don't know of any PHP code or shortcut to cancel out that
 effect.
 
 Thanks,
  Scott
 
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] quick and easy(php newbie)

2002-01-18 Thread Richard Crawford

Try something like:

$Entry = $openingEntry . $numberAtt . \ . $myNumber . \ . $nameAtt...

and so on.


travis wrote:

 just a quick syntax question: here is my php
 
 ?
 $openingItemTag = item\n;
 $openingEntry =  entry ;
 $numberAtt = number=;
 $nameAtt = name=;
 $dateAtt = date=;
 $messageAtt = message=;
 $linkAtt = link=;
 $closingEntry = /\n;
 $closingItemTag = /item;
 
 $Entry=
 $openingEntry.$numberAtt.$myNumber.$nameAtt.$myName.$dateAtt.$myDate.
 $messageAtt.$myMessage. $linkAtt.$myLink.$closingEntry;
 $Item = $openingItemTag.$Entry.$closingItemTag;
 
 $fp = fopen (news.xml, a);
 fwrite($fp,$Item);
 fclose($fp);
 ?
 
 
 if done twice it returns this:
 
 item
  entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/
 /itemitem
  entry number=01name=travisdate=01.08.02message=hello worldlink=http://www.me.com/
 /item
 
 i want it to display as follows:
 
 item
  entry number=01 name=travis date=01.08.02 message=hello world 
link=http://www.me.com/;
 /item
 item
  entry number=01 name=travis date=01.08.02 message=hello world 
link=http://www.me.com/;
 /item
 
 now it is writing to the file I want perfectlybut but but I need to add
 quotes around the attributes and spaces between each attribute, and a line
 break before each item
 what do I need to add to $Entry to get that to display correctly
 
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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

2002-01-18 Thread Richard Crawford

You might have better luck using the Print command from MSIE or 
Netscape, something which allows you to set up printer parameters.


fitiux wrote:

 Hi friends,  =)
 
 someone have experience using  printer functions  ?
 I mean... I would like to print a php generated page with a link within this
 page
 
 example:
 I have an html page with a table..but I need to print without header, footer
 and also I need to print in landscape... all of this with a link within this
 generated page.
 
  can I do this with PHP ?
 
 
 thanks for your advice.
 best regards..
 
 (sorry me... my english isn't good enough)   :-)
 
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] how to send to URL on if statement?

2002-01-18 Thread Richard Crawford

If you have already sent output to the browser, then you won't be able 
to use the PHP header() command to redirect the browser.

There are a couple of ways around this, though; look into the META tag 
in HTML, or you can use JavaScript to redirect the browser.

If what you want to do is send all users to the same original page, but 
then send certain users to another page if the if condition is met, 
then use PHP to generate the META tag...

if (condition) {
print(meta-equiv=\Refresh\ content=\15\; URL=\http://my.page.com\;);
}

I've done that before.  It's a pretty useful feature.



Andrea Caldwell wrote:

 Sorry,  I'm new at this...
 
 I have already sent output... any way to do this?
 
 Thanks again,
 Andrea
 
 Ing. Daniel Manrique [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
Can anyone advise or direct me to the documentation that references how

 to
 
send a user to a URL if an 'if' statement is satisfied?

Assuming you hadn't sent any output before:

if ($condition){
header(Location: http://wherever.com;);
exit;
}


 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



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

2002-01-18 Thread Richard Crawford

Consider yourself fried. ;-)

Seriously, though, I think that there are more advanced PHP lists that 
would probably be more to your liking.  Try doing a search on php.net or 
yahoogroups.com for something more technical.  I, personally, joined 
this list just over a year ago when I was assigned a project at work to 
rebuild Phorum to work against my former company's custom database.  The 
respondents on this group were incredibly helpful; and most of the 
responses to technical questions I've seen on this list have usually 
included comments like, This works because..., or You can find more 
information about this at

I've found that this list is an excellent resource for beginners, as 
well as an excellent place for advanced users to get quick answers to 
urgent questions.


Nick Wilson wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 
 Hi all, 
 just a very quick note: I've been following the list for about a
 week and I probably follow one or two threads a day. Some of the stuff
 here is *very* interesting. Unfortunately most of the stuff posted is a
 little ridiculous in that it's posted by people that clearly don't know
 where the online manual is located.
 
 Don't get me wrong, I'm no expert and I don't object to the 'I had a
 look but...' posts I just think the list might be a little more
 interesting if those that *really* know there stuff stopped giving
 detailed answers to Q's like 'my html page shows the php code' and were
 just a little less tolerant.
 
 Feel free to fry me.
 - -- 
 
 Nick Wilson
 
 Tel:  +45 3325 0688
 Fax:  +45 3325 0677
 Web:  www.explodingnet.com
 
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)
 
 iD8DBQE8SJLTHpvrrTa6L5oRAg8SAKCLzzFk6i29BzABak9ezbtsVIIw9wCgnn4o
 +Evq2JM0f2FDj1O1WEvm82o=
 =NaDy
 -END PGP SIGNATURE-
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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 Security - view source code

2002-01-16 Thread Richard Crawford

Well, if you do View Source on any browser, it will only show the 
source code of the HTML that the page has rendered, not the 
PHP/Perl/ASP/Cold Fusion/whatever that was used to generate the HTML 
code.  So using View Source will never show you the programming behind 
the HTML.

That said, I don't believe it is very easy to view the source code of a 
PHP program that generates a web page.  If you can get into the server, 
you can see the program.  I have never tried it, so I'm not sure. 
Standard security measures apply.


Phil Schwarzmann wrote:

 How easy/hard is it to view the PHP source code when you're at website?
 
 I noticed when I was using Internet Explorer, if I pressed view
 source...it would show the HTML but not the PHP.
 
 -Phil
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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 HTML: newbie question

2002-01-16 Thread Richard Crawford

Just out of curiosity, what is the name of your page?  It might be as 
simple as making sure it has a .php extension on your page.  If it has 
an .html extension it won't work properly.  Just a thought; I could be 
wrong about this.


Nick Wilson wrote:

 * On 16-01-02 at 22:29 
 * Richard said
 
 
Hi there

I just signed up for an account at Spaceports so I can play with PHP ­ I
placed some PHP code in an HTML page and uploaded it to the server.

But when I checked it in my browser I got the error message: can¹t parse
line 1

Line 1 is simply the HTML tag!!

On one of their user forums someone suggested getting rid of the HTML tags
so I did and just left the PHP code on its own and this works fine ­ so how
can I use PHP with HTML?

 
 html
 head
 titleRTFM/title
 body
 ?
 print(h1The Manual is your friend/h1);
 ?
 /hody
 /html
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

It is only with the heart that we see rightly; what is essential is 
invisible to the eye.  --Antoine de Saint Exupery

Push the button, Max!



-- 
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] Newbie database question

2002-01-13 Thread Richard Crawford

Which database are you using?


Dean Ouellette wrote:

 I am entering info from form into database, is there a way to check say 
 firstname, lastname and address to see if it is a duplicate to what is 
 already in database and if it is then just enter any new information 
 they may enter and not create a new entry
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight. --Clarence Darrow

Push the button, Max!



-- 
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] Newbie database question

2002-01-13 Thread Richard Crawford

I don't think that there's an easy way to do it in MySQL.  I usually use 
some hack along the lines of, select x from t where x = $y, and if 
there are any results returned, return a message of some sort (That 
value already exists in the database!).

Bear in mind that sometimes people have very similar contact 
information.  At the university where I used to work, there were two 
employees who shared the same first, middle, and last names, as well as 
birth dates, and their social security numbers differed by exactly one 
digit.  A rare circumstance, to be sure, but not impossible.

Dean Ouellette wrote:

 MySql
 
 
 At 10:10 AM 1/13/2002 -0800, Richard Crawford wrote:
 
 Which database are you using?


 Dean Ouellette wrote:

 I am entering info from form into database, is there a way to check 
 say firstname, lastname and address to see if it is a duplicate to 
 what is already in database and if it is then just enter any new 
 information they may enter and not create a new entry




 -- 
 Sliante,
 Richard S. Crawford

 mailto:[EMAIL PROTECTED]  http://www.mossroot.com
 AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
 MSN:  [EMAIL PROTECTED]

 When you have lost the ability to laugh at yourself, you have lost 
 the ability to think straight. --Clarence Darrow

 Push the button, Max!



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



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight. --Clarence Darrow

Push the button, Max!



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

2002-01-09 Thread Richard Crawford

The presence of the final / in the line makes the page XHTML compliant. 
  It should be left in, and it has no effect whatsoever on the 
functionality of the input tag.  In fact, it should be included in the  
input type=text  tag as well.

I can't find a darn thing wrong with your script.  You might wish to 
double-check your Apache configuration settings; something there might 
be screwy.

Good luck.


Intruder wrote:

 I don't like this line:
 input type=submit name=submit value=Submit /
 change it:
 input type=submit name=submit value=Submit
 
 to my mind it could help ;
 
 
 
 
 PK html
 PK   head
 PK   titleMy Form/title
 PK   /head
 PK   body
 PK   form action=test2.php method=GET
 
 PK   My name is:
 PK   br input type=text name=YourName
 
 PK   input type=submit name=submit value=Submit /
 PK   /form
 PK   /body
 PK   /html
 
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight. --Clarence Darrow

Push the button, Max!



-- 
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] Maybe OT but I was wondering....

2002-01-08 Thread Richard Crawford

I believe that this is something you actually set in your webserver. 
Which webserver are you running?  Check out the documentation for that.

Ben Turner wrote:

 I am trying to set up a completely dynamic site using php and a mysql
 backend.  I am trying to find somewhere that I can identify a custom 404
 error page and then pull the page based on the document directory.  Problem
 is, is this even possible in PHP?  I haven't found too much related to
 custom 404 pages done in php.
 
 So I was thinking, if anyone knows some information on this topic, might you
 have a url or maybe a book title that I could check out to research this a
 bit further?
 
 thanks for your help
 Ben
 
 



-- 
Sliante,
Richard S. Crawford

mailto:[EMAIL PROTECTED] 
http://www.mossroot.com
AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
MSN:  [EMAIL PROTECTED]

When you have lost the ability to laugh at yourself, you have lost the 
ability to think straight. --Clarence Darrow

Push the button, Max!



-- 
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] link variables space problem in netscape

2001-04-24 Thread Richard Crawford

Two words:

URL Encode.



 Original Message 

On 4/24/01, 11:23:02 AM, Mark Lo [EMAIL PROTECTED] wrote regarding 
[PHP] link variables space problem in netscape:


 Hi,

  I am having a problem in link variables in netscape.  etc.
 www.domain.com?xx=1xxx=2=mark loxxxee=polol

 if the above link contains space, then everyting is faded after the 
space,
 how to over come this problem in netscape.  In IE5, it is okay to have 
space
 in link variables.

 Thank you


 Mark


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
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] if... then... else with HTML

2001-04-23 Thread Richard Crawford


Alternatively, and this is what I would do because it would be easier to 
maintain should you want to change the content later on, you could use 
includes as per the following:


?php
print(html\nhead\ntitleTry This/title\n/head\nbody\n);
if(condition)
include(html_block_1.html);
else
include(html_block_2.html);
print(/body\n/html);
?

I suppose it would depend on how big your HTML blocks are.

Either way -- using includes or using the method below -- will work, and 
with neither method will you have to escape out your special characters.



 Original Message 

On 4/23/01, 3:59:41 PM, elias [EMAIL PROTECTED] wrote 
regarding Re: [PHP] if... then... else with HTML:


 yes, consider this:

 html
 body
 ?  if (isset($name)) { ?
 your name is ?=$name?
 ? } else { ?
 h1name is not set!/h1
 ? } ?
 /body
 /html

 -elias
 http://eassoft.cjb.net

 Martin Thoma [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hello !
 
  I want to do something like
 
  if (condition)
  output this html-block
  else
  output that html-block
 
 
  Without printig or echoing the html-block out (because the block has a
  lot of  , which I all would have to slash out...)
 
  How can I do that ?
 
  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 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] insert data to mysql

2001-04-23 Thread Richard Crawford

Concatenate your string.

...VALUES ('.$client.','.$contact.') (etc.)

Or just replace the double-quotes within the string with single quotes.  
That should do it.


 Original Message 

On 4/23/01, 10:32:47 AM, shawn [EMAIL PROTECTED] wrote regarding 
[PHP] insert data to mysql:


 Hello,

 I am just wondering if someone can help me out with this. This is what I 
have so far, but it isnt working:

 MYSQL_CONNECT($hostname, $username, $password)
  or die(Unable to connect to database);

 @mysql_select_db( $dbName)
  or die( Unable to select database);

 $sql = INSERT INTO $userstable (client, contact, email, address, city, 
state, zip, phone, fax, model, country, details, type)

 VALUES($client, $contact, $email, $address, $city, $state, 
$zip, $phone, $fax, $model, $country, $details, $type);

 $result = MYSQL_QUERY($sql) or die (Couldn't execute query);

 MYSQL_CLOSE();

 Im new (no kidding?), so i hope this is easy, also, is there a address 
anyone can point me to for a archive of this list?
 Thanks in advance,

 Shawn

--
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] Single Quotes in Oracle Queries

2001-04-11 Thread Richard Crawford

Before we go about writing new functions to handle single quotes for our 
Phorum reengineering project, I need to know if there is a way for PHP to 
easily handle the issue of passing strings to a PL/SQL script, which 
requires that single quotes be doubled up: that "I don't know" is 
properly translated into "I don''t know".  In my dreams, this is handled 
by OCIParse or even OCIExecute, but I have a sinking feeling that this 
isn't the case, and that we'll need to do an extra parsing step for all 
of our strings that are inserted into the database, just for single 
quotes.

Help!

Richard


--
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] Single Quotes in Oracle Queries

2001-04-11 Thread Richard Crawford

The quotes are indeed coming from a FORM.  I'll look into 
magic_quote_sybase.  Thanks!


 Original Message 

On 4/11/01, 11:19:26 AM, "Johnson, Kirk" [EMAIL PROTECTED] wrote 
regarding RE: [PHP] Single Quotes in Oracle Queries:


 Where are the strings coming from? If from a FORM, then
 magic_quotes_sybase (in php.ini) is your friend. If from elsewhere, see
 magic_quotes_runtime for possible help (also in php.ini).

 Kirk

  -Original Message-
  From: Richard Crawford [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 11, 2001 12:05 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Single Quotes in Oracle Queries
 
 
  Before we go about writing new functions to handle single
  quotes for our
  Phorum reengineering project, I need to know if there is a
  way for PHP to
  easily handle the issue of passing strings to a PL/SQL script, which
  requires that single quotes be doubled up: that "I don't know" is
  properly translated into "I don''t know".  In my dreams, this
  is handled
  by OCIParse or even OCIExecute, but I have a sinking feeling
  that this
  isn't the case, and that we'll need to do an extra parsing
  step for all
  of our strings that are inserted into the database, just for single
  quotes.
 
  Help!
 
  Richard
 
 
  --
  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]