[PHP] Steps to installin PHP on apache 2

2004-02-16 Thread Philip J. Newman
Can someone send me a link to where i can find easy to read docs on 
getting php set up on Apache ...

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



[PHP] Session, loging users in.

2004-02-13 Thread Philip J. Newman
Whats the best information to add to a session to say a user is logged in?

I currently have $siteUserLogIn=true;

anything else that I could add to beef up security?





---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



Re: [PHP] E-Commerce

2004-02-12 Thread Philip J. Newman
I just about wet my self laughing.

Just look around the net, PHP is used in about 40% of the online shopping sites.


- Original Message - 
From: PHP Email List [EMAIL PROTECTED]
To: Jimmy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 13, 2004 6:48 PM
Subject: RE: [PHP] E-Commerce


 Jimmy jimmy jimmy...
 
 Now if your question is, Can PHP be the most versatile languge that one
 should use for creating the best online shop ever?  Then yes.
 
 Can PHP interact with MySql and just about every other Database program to
 store all your wonderful merchandise, in a nice compact easy to carry
 carrying case. Then YES.
 
 And if your also asking if PHP would be a server side scripting language
 like CGI/ASP/JAVA/~..  Then YES again.
 
 But if your asking whether or not PHP, would be able to SAY?
 Log your client's information
 Store your inventory
 Display your merchandise
 Process orders
 Interact with your clients
 Keep your client's informed of what's in and what's not
 Manipulate your inventory records
 Inform you of what's getting low for reordering
 Track what's selling and what isn't
 Allow online technical support through forums
 Allow 24x7 access to your Storefront
 
 And last but not least, Tuck you in at night?
 
 Then no.  It can't tuck you in at night. But PHP does all the rest and SO
 MUCH MORERead about it here
 http://www.php.net
 Best Shopping cart website setup utility you'll ever need. Enjoy!
 
 Wolf
 
 -Original Message-
 From: Jimmy [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 12, 2004 10:44 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] E-Commerce
 
 
 Hi all. Is PHP a suitable language for building an online shop? Where would
 I go to find out more info on this? Thanks in advance!
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP] $PHP_SELF AND INFORMATION.

2004-02-04 Thread Philip J. Newman
$_SERVER[PHP_SELF]; returns /c/hosting/newman/hello.php

is there an easy way to get get hello.php?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] read file only half the file loads ...

2004-02-02 Thread Philip J. Newman
loadimage.php has the following code in it.


?php 
  $myimage=d:/website/images/no_access_php.jpg;
// above is the file and the location is verified.
  header(Content-type: image/jpeg);  
  readfile($myimage) ;
?

Only half the image is shown ... it stops loading the image or the image wont' load at 
all.

Any Ideas what the problem could be?


---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



Re: [PHP] Script Needed

2004-01-14 Thread Philip J. Newman
payme $80 a hour and i can write one ... (o;

- Original Message - 
From: Eric Belardo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 2:33 PM
Subject: [PHP] Script Needed


 Good evening all,
  
 I am designing a website were different users will be posting their
 portfolios and I am seeking a PHP Contact form script that will email
 JUST the person on the profile and the profiled person's email will
 remain anonymous. 
  
 Does anyone know if this script exists??
  
 Eric Belardo
 

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



[PHP] Hiding files away from /public_html/

2004-01-09 Thread Philip J. Newman
Hi, just wanted to pick someones brain.

I want to store some images outside the /public_html/ how ever my isp has decided that 
i'm not aloud
to write files in that area.  Would the next best solution that wold be as secure to 
maybe put them
in a folder with a .htaccess file in it?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] counting charactors

2004-01-06 Thread Philip J. Newman
can someone point me to the right place for a thing that would count charactors in a 
string?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



Re: [PHP] A simple instruction

2004-01-01 Thread Philip J. Newman
echo$PHP_SELF;

maybe?

- Original Message - 
From: Dino Costantini 
To: PHP Mailing List [EMAIL PROTECTED]
Sent: Friday, January 02, 2004 11:30 AM
Subject: [PHP] A simple instruction


i have a file name with the path ex food/italy/pizza/margherita.php. how can i obtain 
the name of
the file in this case margherita.php i know there is a function, but i don't 
remember it.
thx

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



Re: [PHP] PHP New Year

2003-12-31 Thread Philip J. Newman
yes HNY to you too

- Original Message - 
From: Larry Brown 
To: PHP List [EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 1:37 PM
Subject: [PHP] PHP New Year


 Happy New year all!
 
 Looking forward to bigger better things this year.
 
 Larry
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP] Best place to search archives

2003-12-20 Thread Philip J. Newman
Hay guys, Where is the best place to search the general-php archives (o;

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

Ph: +64 9 576 9491
Fx: +64 9 576 2532
Mob: +64 21 0483 999

-
This communication, including any attachments, is confidential. 
If you are not the intended recipient, you should not read
it - please contact me immediately, destroy it, and do not
copy or use any part of this communication or disclose
anything about it. Thank you. Please note that this 
communication does not designate an information system for
the purposes of the Electronic Transactions Act 2002.
--

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



[PHP] Best way to store data.

2003-12-18 Thread Philip J. Newman
Hi, is the best way to store data in a mysql database in the text it was submitted, or 
in HTML
format ... changing all the \r's and things to br


---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] $_POST[]

2003-12-18 Thread Philip J. Newman
?php if ($_POST[formReviewBy]==Cade Lloyd) { echo selected; } ?

Should $_POST[formReviewBy] have quotes or dose it not matter?
---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] Line breaks in PHP.

2003-12-16 Thread Philip J. Newman
Question:

When you hit enter in a text box is that classified as a \n?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



Re: [PHP] Line breaks in PHP.

2003-12-16 Thread Philip J. Newman
Ok thats cool, guess i'll look for both, and only one in the data

- Original Message - 
From: Justin French [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 5:35 PM
Subject: Re: [PHP] Line breaks in PHP.


 On Wednesday, December 17, 2003, at 03:10  PM, Philip J. Newman wrote:
 
  Question:
 
  When you hit enter in a text box is that classified as a \n?
 
 
 generally, yes.
 
 depending on the client platform, it might be an \r\n or \r (I've 
 heard)...
 
 justin
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP] What would the best way to veladate a URL string?

2003-12-13 Thread Philip J. Newman

What would the best way to veladate a URL string?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] Whats wrong with this statement.

2003-12-13 Thread Philip J. Newman


?php
## ASSUME DATABASE IS CONNECTED AND THESE 2 ITEMS ARE NOT IN THE DATABASE
## THIS RETURNS 1,0 all the time.

$websiteUrl=http://www.philipnz.com/;;
$websiteEmail=[EMAIL PROTECTED];

// CHECK TO SEE IF DATA MATCHS WHATS IN THE DATABASE.
 $sql = SELECT hUrl,hContactEmail FROM hyperlinks_data;
 $sql_result = mysql_query($sql, $connection) or die (Could not get Query); 

 $exists_hUrl = 0;
 $exists_hContactEmail = 0;
 
 while ($row = mysql_fetch_array($sql_result))   {

  if ($websiteUrl==$row[hUrl]) { $exists_hUrl = 1; break;  }
  if ($websiteEmail==$row[hContactEmail]) { $exists_hContactEmail = 1;  break;  }
  
 }

  Echo $exists_hUrl, $exists_hContactEmail;

?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] Trying to check for a valid URL String.

2003-12-13 Thread Philip J. Newman
so far i got ...

?php
if (!ereg(^http:\/\/([_\.0-9a-zA-Z-]+\.)+[a-zA-Z]/i,$websiteUrl) {
echoNot Valid;
} else {
echovalid;
}
?

and i can't get it to work

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



Re: [PHP] Re: What would the best way to veladate a URL string?

2003-12-13 Thread Philip J. Newman
Hay that works better thanks

- Original Message - 
From: Paul Chvostek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 14, 2003 2:17 PM
Subject: [PHP] Re: What would the best way to veladate a URL string?


 On Sun, Dec 14, 2003 at 11:23:25AM +1300, Philip J. Newman wrote:
 
  What would the best way to veladate a URL string?

 Validate?  How about something like:


eregi('^(f|ht)tp://([a-z0-9._:-]+@)?([a-z0-9][a-z0-9-]+\.)+[a-z][a-z]+(/([a-z0-9.%=-]+)?)?',$string
);

 You can adjust the get part to suit...

 -- 
   Paul Chvostek [EMAIL PROTECTED]
   it.canadahttp://www.it.ca/
   Free PHP web hosting!http://www.it.ca/web/

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


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



[PHP] Checking a URL string.

2003-12-12 Thread Philip J. Newman
I would like to check if i have a correct url enterend

?php
eregi(^http://[([0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$, $websiteUrl);
?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] The best way ...

2003-12-12 Thread Philip J. Newman
what is the best way to remove extra \'s from strings ... would be ?

---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]

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



[PHP] Call to undefined function: imagecreatefromjpeg()

2003-11-28 Thread Philip J. Newman
http://www.php.net/manual/en/function.imagecreatefromjpeg.php

After using this code for some time it suddenly returns ...

Fatal error: Call to undefined function: imagecreatefromjpeg() in 
/home/crushme/public_html/includes/inc_members.php on line 564


?Php

// SNIP

   $quality=70; // JPEG Image Quality (0-95 Higher Value == Better)
   // Resize Create the Output Image (Do Not Disturb this part)
   $src_img = imagecreatefromjpeg($src_img);
   $dst_img = imagecreatetruecolor($dest_width,$dest_height);
   imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, 
$src_width, $src_height);
   imageinterlace($dst_img, 1);
   imagejpeg($dst_img, $dest_file, $quality);
   imagedestroy($src_img);
   imagedestroy($dst_img);

// SNIP

?

Is this the server or code that needs to be changed.



Re: [PHP] Call to undefined function: imagecreatefromjpeg()

2003-11-28 Thread Philip J. Newman
... just what i was thinking, i'll get back to them and complain.

Thanks


- Original Message - 
From: Marek Kilimajer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, November 29, 2003 8:29 AM
Subject: Re: [PHP] Call to undefined function: imagecreatefromjpeg()


 Philip J. Newman wrote:
  http://www.php.net/manual/en/function.imagecreatefromjpeg.php
 
  After using this code for some time it suddenly returns ...

 It's not suddenly, someone must have recompiled php without gd/jpg support.

 
  Fatal error: Call to undefined function: imagecreatefromjpeg() in
/home/crushme/public_html/includes/inc_members.php on line 564
 
 
  ?Php
 
  // SNIP
 
 $quality=70; // JPEG Image Quality (0-95 Higher Value == Better)
 // Resize Create the Output Image (Do Not Disturb this part)
 $src_img = imagecreatefromjpeg($src_img);
 $dst_img = imagecreatetruecolor($dest_width,$dest_height);
 imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, 
  $dest_height, $src_width,
$src_height);
 imageinterlace($dst_img, 1);
 imagejpeg($dst_img, $dest_file, $quality);
 imagedestroy($src_img);
 imagedestroy($dst_img);
 
  // SNIP
 
  ?
 
  Is this the server or code that needs to be changed.
 
 


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



[PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Philip J. Newman
My goal is to input the amount of Bytes used by a user as $inputbox and
calculate how many kbs,megs,gigs along with $cost for the price per meg.

?

$inputbox = 414478244;

// PROCESS DATA
$kbs = $inputbox/1024;
 $megs = $kbs/1024;
 $gigs = $megs/1024;

// CALC COST OF MEGS
cost = $megs * 0.05;

// OUT PUT DATA.
echob$inputbox bytes = /bbr$kbs kb.br$megs meg @ $0.05c per Meg =
\$$costbr$gigs gig.brbr;

?

This is what I get outputted.

414478244 bytes =
404763.910156 kb.
395.277256012 meg @ $0.05c per Meg = $19.7638628006
0.386012945324 gig.

Questions?
1. Should I be dividing by 1024 or 1000? This was passed to me by word of
mouth ...
2. Any way of rounding to 2 or 3 digests after the decimal point.
3. to remove any , from the inputted string.

/ Josh



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



Re: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25

2003-07-19 Thread Philip J. Newman
thanks
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 06, 2003 7:06 PM
Subject: Re: [PHP] Re: Failed to Receive in E:\...\mailscript.php on line 25


 On Sunday 06 July 2003 14:59, HÃ¥kon Strandenes wrote:
  This is not my server, so I cannot change the settings in php.ini. This
  is my ISP's server, and I think they run SMPT om the same server. And
  yes, this is a Windows 2000 server.

 A quick and easy way to check whether mail() would work is to use the
 error_log() function.

  How do I set the SMTP server I shall use in the script? I have no access
  to the php.ini...

 I believe you can set that at run-time using ini_set().

  I will contact my ISP at moonday and tell them about my problem.

 Good idea!

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Theory is gray, but the golden tree of life is green.
 -- Goethe
 */


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





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



[PHP] Small problem with date and location information?

2003-06-21 Thread Philip J. Newman
I run a website from New Zealand.  The problem is when ?php echo date(F j, Y, g:i 
a); ? it shows the time of the server, that just happens to be located in Dallas 
USA. Is there a way that I can change the time so it matchs New Zealand Time?

[PHP] Email Valadation

2003-06-17 Thread Philip J. Newman
How would i valadate an email string to see if it has invalid charactors?

/ Philip

Re: [PHP] / [Newman] When i send an email it ...

2003-06-15 Thread Philip J. Newman
My code is this ...

?php

// MAIL HEADERS.

 $headers = X-Priority: 1\n;
 $headers .= Return-path: [EMAIL PROTECTED]\n;
 $headers .= From: \Philip Newman\  [EMAIL PROTECTED]\n;
 $headers .= Reply-To: \[EMAIL PROTECTED] [EMAIL PROTECTED]\n;
 
 $msg = Dear $mUserName,\n\n;
 $msg .= You have requested a user account on  Untouched. To activate 
this account\n;
 $msg .= click on the link below.  Please save this email so you dont 
forget your user\n;
 $msg .= name and password.\n\n; 
 $msg .= $siteDomain/b.php?ID=$timestamp.\n\n;
 $msg .= If you have received this email in error please disregard it and 
delete it...\n\n;
 $msg .= Username: $mUserName.\n;
 $msg .= Password: $mPassword\n\n;
 $msg .= Thanks.\n;
 $msg .= Philip Newman\n;

  mail($mEmail, The Crush Me Account Info., $msg, $headers);


?
 
Warning: mail() [function.mail]: SMTP server response: 550 , Sender unknown in 
D:\Hosting\Undercover\includes\inc_signup.php on line 138


Thats my error ... will the server only relay the message to A local account?


- Original Message - 
From: Catalin Trifu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 16, 2003 10:08 AM
Subject: [PHP] Re: [Newman] When i send an email it ...


 Hi,
 
 This a SMTP server error.
 It looks like you did not add the header
 FROM: yourname [EMAIL PROTECTED]; looks like u'r SMTP
 does not allow for messages without FROM header
 as the PHP function:
 mail ( string to, string subject, string message [, string
 additional_headers [, string additional_parameters]])
 shows, you can add extra headers to the mail message, so this
 is what you need to do.
 
 Cheers,
 Catalin
 
 Jason Marks [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 When i send an email i get the following error.
 
 
  Warning: mail() [function.mail]: SMTP server response: 550 , Sender unknown
 in D:\Hosting\Crushme\includes\inc_register.php on line 138
 
 Is this a server or a PHP error?
 
 / Philip
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

Re: [PHP] / [Newman] When i send an email it ...

2003-06-15 Thread Philip J. Newman
Ahh yess .. I found the issue.

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

The sendmail_from was not a valid email it was set to an email that was
deleted from the system a week ago.

Sweet as

- Original Message -
From: Michael Geier [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]
Cc: PHP [EMAIL PROTECTED]
Sent: Monday, June 16, 2003 2:56 PM
Subject: Re: [PHP] / [Newman] When i send an email it ...


 The error is your answer.  The server is setup to relay mail for specific
 domains/users.  Evidently, the user [EMAIL PROTECTED] is not one of
those
 users/domains.

 If you are the administrator for this box, check your documentation for
your
 specific SMTP server for setting relay for that domain.
 If you are not the admin, contact that person.

 Quoting Philip J. Newman [EMAIL PROTECTED]:

  My code is this ...
 
  ?php
 
  // MAIL HEADERS.
 
   $headers = X-Priority: 1\n;
   $headers .= Return-path: [EMAIL PROTECTED]\n;
   $headers .= From: \Philip Newman\
  [EMAIL PROTECTED]\n;
   $headers .= Reply-To: \[EMAIL PROTECTED]
  [EMAIL PROTECTED]\n;
 
   $msg = Dear $mUserName,\n\n;
   $msg .= You have requested a user account on  Untouched.
To
  activate this account\n;
   $msg .= click on the link below.  Please save this email
so you
  dont forget your user\n;
   $msg .= name and password.\n\n;
   $msg .= $siteDomain/b.php?ID=$timestamp.\n\n;
   $msg .= If you have received this email in error please
  disregard it and delete it...\n\n;
   $msg .= Username: $mUserName.\n;
   $msg .= Password: $mPassword\n\n;
   $msg .= Thanks.\n;
   $msg .= Philip Newman\n;
 
mail($mEmail, The Crush Me Account Info.,
$msg,
  $headers);
 
 
  ?
 
  Warning: mail() [function.mail]: SMTP server response: 550 , Sender
unknown
  in D:\Hosting\Undercover\includes\inc_signup.php on line 138
 
 
  Thats my error ... will the server only relay the message to A local
  account?
 
 
  - Original Message -
  From: Catalin Trifu [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, June 16, 2003 10:08 AM
  Subject: [PHP] Re: [Newman] When i send an email it ...
 
 
   Hi,
  
   This a SMTP server error.
   It looks like you did not add the header
   FROM: yourname [EMAIL PROTECTED]; looks like u'r SMTP
   does not allow for messages without FROM header
   as the PHP function:
   mail ( string to, string subject, string message [, string
   additional_headers [, string additional_parameters]])
   shows, you can add extra headers to the mail message, so this
   is what you need to do.
  
   Cheers,
   Catalin
  
   Jason Marks [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
   When i send an email i get the following error.
  
  
Warning: mail() [function.mail]: SMTP server response: 550 , Sender
  unknown
   in D:\Hosting\Crushme\includes\inc_register.php on line 138
  
   Is this a server or a PHP error?
  
   / Philip
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  


 ===
 Michael Geier
 CDM Sports, Inc. Systems Administration
email: [EMAIL PROTECTED]
phone: 314.692.3540

 ---
  This email sent using CDM Sports Webmail v3.1
   [ http://webmail.cdmsports.com ]




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



[PHP] Documents on Images.

2003-06-10 Thread Philip J. Newman
Can someone point me to some documents about pulling images from out side the doc root?

thanks


/ Phil

[PHP] Loading an image file as a PHP file.

2003-06-10 Thread Philip J. Newman
To Do:

I would like to call image /user/mysite/image_01.jpg using something like 
/user/mysite/public_html/loadimage.php?image=1

is this a simple procedure or hard ...

any suggestions or someone want to point me in the right direcion/ Phil



[PHP] Newman Asks, Changeing to CAPS?

2003-06-08 Thread Philip J. Newman
Is there a way of changing only the 1st letter of a string to caps and the rest to 
lower?

eg: foo bar 
  to
  Foo Bar

??

/ Phil
PhilipNZ.com
[EMAIL PROTECTED]

[PHP] Checking for Valid Charactors.

2003-06-08 Thread Philip J. Newman
I would liek to check for 0-9 and . charactors i'm using ...

$email = 60.00;

if eregi(^[0-9.])?$,$email) {

echovalid;

} else {

echonot valid;

}

Its not working well. umm ... help ...

Re: [PHP] Checking for Valid Charactors.

2003-06-08 Thread Philip J. Newman
thanks

- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 8:57 PM
Subject: Re: [PHP] Checking for Valid Charactors.


 On Sunday 08 June 2003 16:22, Philip J. Newman wrote:
  I would liek to check for 0-9 and . charactors i'm using ...
 
  $email = 60.00;
 
  if eregi(^[0-9.])?$,$email) {
 
  echovalid;
 
  } else {
 
  echonot valid;
 
  }
 
  Its not working well. umm ... help ...

   eregi(^([0-9.])*$, $string)

 will match:
   an empty string
   a string containing only 0-9 and periods

 It is better for you to learn the preg_*() functions instead of the
ereg*()
 ones.

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 This fortune is false.
 */


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





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



[PHP] [Newman] How to pass an image through PHP.

2003-06-07 Thread Philip J. Newman
I would like to know where i should be looking to pass an image through PHP

Thanks

/ Phil

[PHP] Newman's Problem with Images.

2003-06-05 Thread Philip J. Newman
My problem is this:

I have a site that has 3 levels of access.

1,2,3  

when i upload files to say $unixtimestamp/image1.jpg anyone can list the images in 
this directory $unixtimestamp/.  I would like to hide the images out side the doc root 
... is this possable .. so i can load something like /image/image.php?no=1 and it 
loads $unixtimestamp/image1.jpg if the access level is right .. else it would load 
nothing  

Any Ideas where to start?


/ Phil

Re: [PHP] Re: Internet Explorer toolbar

2003-03-28 Thread Philip J. Newman
Mummy and Daddy sto fighting.

- Original Message -
From: Dan Rossi [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]; Leif K-Brooks
[EMAIL PROTECTED]
Cc: Peter Houchin [EMAIL PROTECTED]; Dan [EMAIL PROTECTED];
php-general [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 7:04 PM
Subject: RE: [PHP] Re: Internet Explorer toolbar


 heh sorry excuse my arrogance , of then , find me a solution that doesnt
 require echoing javascript ?

 -Original Message-
 From: Philip J. Newman [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 6:49 PM
 To: Dan Rossi; Leif K-Brooks
 Cc: Peter Houchin; Dan; php-general
 Subject: Re: [PHP] Re: Internet Explorer toolbar


 Now Now children.


 - Original Message -
 From: Dan Rossi [EMAIL PROTECTED]
 To: Leif K-Brooks [EMAIL PROTECTED]
 Cc: Peter Houchin [EMAIL PROTECTED]; Dan [EMAIL PROTECTED];
 php-general [EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 6:47 PM
 Subject: RE: [PHP] Re: Internet Explorer toolbar


  ??? who cares i gave a solution, there is no other #**#% way
 
  -Original Message-
  From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 28, 2003 3:39 PM
  To: daniel
  Cc: Peter Houchin; Dan; php-general
  Subject: Re: [PHP] Re: Internet Explorer toolbar
 
 
  Yes, but that has nothing do to with PHP!  It's not doing it with PHP as
  was asked, it's doing it with javascript.
 
  daniel wrote:
 
  yes simply buffer the exact javascript code and then echo it
  
  ie
  
  $buffer .= 'a href=#
 

onclick=window.open('something.php','something,'scrollbars=no,width=100,he
  igh
  t=100'/a';
  
  sorry i forget the no toolbar part from the top of my head.
  
  
  = Original Message From Leif K-Brooks
[EMAIL PROTECTED]
  =
  Correct, but he asked about doing it with PHP.
  
  Peter Houchin wrote:
  
  
  
  yes there is java script
  
  Dan wrote:
  
  
  
  On Thu, 27 Mar 2003 12:32:06 -0800 (PST), [EMAIL PROTECTED]
(Manuel
  Ochoa) wrote:
  
  
  Is there any way of using php to launch a new browser without the IE
  toolbars?
  
  
  
  No. PHP is server side, not client side.
  
  
  
  
  
  
  --
  The above message is encrypted with double rot13 encoding.  Any
  unauthorized
  
  
  attempt to decrypt it will be prosecuted to the full extent of the law.
  
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  
  
  
  
 
  --
  The above message is encrypted with double rot13 encoding.  Any
 unauthorized
  attempt to decrypt it will be prosecuted to the full extent of the law.
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



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



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



[PHP] Random Password Making.

2003-03-28 Thread Philip J. Newman
Whats the best way to make a random password with 4 letters and 2 numbers?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]


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



[PHP] Time stamp and changing to a date.

2003-03-28 Thread Philip J. Newman
$mydate = 20030328231154;

$myPrintDate=date (l dS of F Y h:i:s A,$mydate);

echo $myPrintDate;

Whats wrong

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]


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



[PHP] Checking a string for # of charactors.

2003-03-28 Thread Philip J. Newman
I would like to check that a string as more than 20 charactors in it.  Can
someone point me in the right direction.

Thanks ..

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]



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



Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Philip J. Newman
$HTTP_X_FORWARDED_FOR

phpinfo();

Check that its in your PHP Info.

$REMOTE_ADDR will return the Remote Address.

I use This small loop.

if (!$HTTP_X_FORWARDED_FOR) {
$HTTP_X_FORWARDED_FOR=$REMOTE_ADDR;
}

/ Phil

- Original Message -
From: Joakim Larsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 6:04 AM
Subject: [PHP] logging ip address when submitting a form


 Hello,

 Is there a command in php that would logg the ip address of the user
viewing
 the php file.
 I need someway of finding out who posted the form.

 thanx



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




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



Re: [PHP] Uploading Files Via PHP

2003-03-27 Thread Philip J. Newman
You could chnage the permissions when you want to write something then
change it back when your done.  Thats what i do.

/ Phil

- Original Message -
From: Jennifer Goodie [EMAIL PROTECTED]
To: Dan Rossi [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 6:17 AM
Subject: RE: [PHP] Uploading Files Via PHP


 A world writeable directory is a security risk.  Why not just fix the
 owner/group and only give the permissions needed, 775 at most.

 -Original Message-
 From: Dan Rossi [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 1:45 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Uploading Files Via PHP


 did u even read it ? chmod 777 + owned by httpd

 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 9:40 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Uploading Files Via PHP


 On Thursday 27 March 2003 18:25, Marek Kilimajer wrote:
  not necesserily both, either of them is enought:

 Not quite true :)

 If owned by 'httpd' then 'httpd' still needs write permission (o+w).

  drwxrwxrwt2 root root   188416 Mar 27 11:23 /tmp
  or
  drwx--2 apache apache   188416 Mar 27 11:23
  /var/www/uploads
 
  daniel wrote:
  possibly a permissions problem , dir needs to be 777 and owned by httpd

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 In good speaking, should not the mind of the speaker know the truth of
 the matter about which he is to speak?
 -- Plato
 */


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


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


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




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



Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Philip J. Newman
Now Now children.


- Original Message -
From: Dan Rossi [EMAIL PROTECTED]
To: Leif K-Brooks [EMAIL PROTECTED]
Cc: Peter Houchin [EMAIL PROTECTED]; Dan [EMAIL PROTECTED];
php-general [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 6:47 PM
Subject: RE: [PHP] Re: Internet Explorer toolbar


 ??? who cares i gave a solution, there is no other #**#% way

 -Original Message-
 From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 3:39 PM
 To: daniel
 Cc: Peter Houchin; Dan; php-general
 Subject: Re: [PHP] Re: Internet Explorer toolbar


 Yes, but that has nothing do to with PHP!  It's not doing it with PHP as
 was asked, it's doing it with javascript.

 daniel wrote:

 yes simply buffer the exact javascript code and then echo it
 
 ie
 
 $buffer .= 'a href=#

onclick=window.open('something.php','something,'scrollbars=no,width=100,he
 igh
 t=100'/a';
 
 sorry i forget the no toolbar part from the top of my head.
 
 
 = Original Message From Leif K-Brooks [EMAIL PROTECTED]
 =
 Correct, but he asked about doing it with PHP.
 
 Peter Houchin wrote:
 
 
 
 yes there is java script
 
 Dan wrote:
 
 
 
 On Thu, 27 Mar 2003 12:32:06 -0800 (PST), [EMAIL PROTECTED] (Manuel
 Ochoa) wrote:
 
 
 Is there any way of using php to launch a new browser without the IE
 toolbars?
 
 
 
 No. PHP is server side, not client side.
 
 
 
 
 
 
 --
 The above message is encrypted with double rot13 encoding.  Any
 unauthorized
 
 
 attempt to decrypt it will be prosecuted to the full extent of the law.
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 

 --
 The above message is encrypted with double rot13 encoding.  Any
unauthorized
 attempt to decrypt it will be prosecuted to the full extent of the law.




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




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



Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Philip J. Newman
Again ... Now Now Kiddies your all way out of line.

- Original Message -
From: Leif K-Brooks [EMAIL PROTECTED]
To: Dan Rossi [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 7:55 PM
Subject: Re: [PHP] Re: Internet Explorer toolbar


 Correct, but he asked for a PHP solution. HE DID NOT ASK FOR A
 JAVASCRIPT SOLUTION, AND YOU SHOULD NOT DISCUSS CLIENT-SIDE MATTERS ON
 THE PHP LIST!

 Dan Rossi wrote:

 ??? who cares i gave a solution, there is no other #**#% way
 
 -Original Message-
 From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 3:39 PM
 To: daniel
 Cc: Peter Houchin; Dan; php-general
 Subject: Re: [PHP] Re: Internet Explorer toolbar
 
 
 Yes, but that has nothing do to with PHP!  It's not doing it with PHP as
 was asked, it's doing it with javascript.
 
 daniel wrote:
 
 
 
 yes simply buffer the exact javascript code and then echo it
 
 ie
 
 $buffer .= 'a href=#

onclick=window.open('something.php','something,'scrollbars=no,width=100,h
e
 
 
 igh
 
 
 t=100'/a';
 
 sorry i forget the no toolbar part from the top of my head.
 
 
 
 
 = Original Message From Leif K-Brooks [EMAIL PROTECTED]
 
 
 =
 
 
 Correct, but he asked about doing it with PHP.
 
 Peter Houchin wrote:
 
 
 
 
 
 yes there is java script
 
 Dan wrote:
 
 
 
 
 
 On Thu, 27 Mar 2003 12:32:06 -0800 (PST), [EMAIL PROTECTED]
(Manuel
 Ochoa) wrote:
 
 
 Is there any way of using php to launch a new browser without the IE
 toolbars?
 
 
 
 No. PHP is server side, not client side.
 
 
 
 
 
 
 
 
 --
 The above message is encrypted with double rot13 encoding.  Any
 
 
 unauthorized
 
 
 
 
 attempt to decrypt it will be prosecuted to the full extent of the law.
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 
 
 
 
 --
 The above message is encrypted with double rot13 encoding.  Any
unauthorized
 attempt to decrypt it will be prosecuted to the full extent of the law.
 
 
 
 
 
 

 --
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.






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



[PHP] How do i valadate an email address?

2003-03-26 Thread Philip J. Newman
How would i check that an e-mail has the right parts in it. for example.

username @ domain . ext

Thanks

/ Jim Bob





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



[PHP] Formatting code.

2003-03-25 Thread Philip J. Newman
Is there any documents on how code should be layed out?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]


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



[PHP] PHP Send Mail Main headers.

2003-03-24 Thread Philip J. Newman
$headers .= MIME-Version: 1.0\r\n;
$headers .= Content-type: text/html; charset=iso-8859-1\r\n;
$headers .= From: .$from_name. .$from_address.\r\n;
$headers .= Reply-To: .$from_name. .$from_address.\r\n;
$headers .= X-Priority: 3\r\n;
$headers .= X-MSMail-Priority: Normal\r\n;
$headers .= X-Mailer: iCEx Networks HTML-Mailer v1.0;

Is this about all i need to send a mail in PHP excluding the mail();



--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]


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



[PHP] Wrapping text output

2003-03-21 Thread Philip J. Newman
$my_data = This is a really long string that could go on for ever and ever
and ever and ever and ever and ever and ever and ever and ever and ever and
ever and ever and ever and don't wrap to my table it makes it bigger;

echo $my_data;

How can I make this wrap to the table?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]



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



[PHP] $siteGalleryUserPath when it is made by PHP dose not give 0777 access for $destination to be made.

2003-03-20 Thread Philip J. Newman
MY ERROR:

Warning: mkdir(/home/newmanpj/public_html/galleries/philip/20030320223553) 
[function.mkdir]: Permission denied in 
/home/crushme/public_html/siteadmin/upload_set_step3.php on line 72

MY PROBLEM:

$siteGalleryUserPath when it is made by PHP dose not give 0777 access for $destination 
to be made.




 SNIP

$datestamp = date(YmdHis); 
$sUser=philip;

//Variables for Directories
$siteGalleryPath=$sitePath/$siteGalleriesInclude;
$siteGalleryUserPath=$siteGalleryPath/$sUser;
$destination = $siteGalleryUserPath/$datestamp;
$dir_path = /$siteGalleriesInclude/$sUser/$datestamp;

//If the Directory for UserName already exists, don't create it.. else create it.. 

if (file_exists($siteGalleryUserPath)) {
echoBDirectory for User, $sUser, Already Exists.../Bbrbr;
} else {
echoBDirectory for User, $sUser, Doesn't Exist.. Creating../Bbrbr;
  mkdir($siteGalleryUserPath,0777);
}

//Code to Add the gallery photoset directory here..
//(add a directory $datestamp under the username dir.. 
  mkdir($destination,0777); // LINE 72 from error above.

 end snip


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

[PHP] LIsting all the Members who have not loged in for 60 days ...

2003-03-18 Thread Philip J. Newman
$lastDate is a unix time stamp in mySql ... how can i list ONLY the users
who have not logged in for 60days?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]



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



[PHP] File System

2003-03-16 Thread Philip J. Newman
How do i delete a file  ... ?

kill?? dele *srugs*

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999


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



Re: [PHP] File System

2003-03-16 Thread Philip J. Newman
how about just 

   if (file_exists($dest_file)) {
   unlink ($dest_file);

 }

- Original Message - 
From: Charles Kline [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 6:04 PM
Subject: Re: [PHP] File System


 $result = unlink(file.txt) or die(Operation failed!');
 
 On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
 
  How do i delete a file  ... ?
 
  kill?? dele *srugs*
 
  --
  Philip J. Newman.
  Head Developer
  [EMAIL PROTECTED]
 
  +64 (9) 576 9491
  +64 021-048-3999
 
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP] Confused a little with = to and grater than ...

2003-03-15 Thread Philip J. Newman
Well i thought about changeing access levels into numbers so that only
LARGER numbers can access lower numbers and Lower numbers can't access
anything higher ... if that makes sence ...

So 3 can access 2 and 1,
2 can't access 3, but can access 2 and 1 and one can't access 2 or 3, but
can 1 ...

assuming that $siteAccessLevel is = to eather level-1, level-2 or level-3
...

  if ($slevel = $glevel) {

is the line i can't seem to get right.

*GRIN*  any help? code below.


 if ($siteAccessLevel == level-1) { $slevel = 1; }
 else if ($siteAccessLevel == level-2) { $slevel = 2; }
 else if ($siteAccessLevel == level-3) { $slevel = 3; }

 if ($gAccessLevel == level-1) { $glevel = 1; }
 else if ($gAccessLevel == level-2) { $glevel = 2; }
 else if ($gAccessLevel == level-3) { $glevel = 3; }

  if ($slevel = $glevel) {

//LOAD PAGE

}else {

// ERROR MESSAGE HERE.

{


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



[PHP] File upload Stuff ... well kinda.

2003-03-15 Thread Philip J. Newman

RIghto then.  Just make a nice website, on my windows box and everything and
when i moved it to the live server, the things that didn't work where file
uploads.  What (if any) settings do i have to use for a Linux dir ..

to allow access for the file to be uploaded?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



[PHP] My PHP mysql Command

2003-03-14 Thread Philip J. Newman
Assuming that gAccessLevel = eather one of level-1, level-2, level-3 ...

 if (!$gStart) { $gStart=0; }

   $sql = SELECT * FROM gallerys WHERE gMode = '$mode' AND ;

  if ($siteAccessLevel == level-1) {

   // LEVEL-1 VIEWING ONLY.

$sql .= WHERE (gAccessLevel = 'level-1');

  } else if ($siteAccessLevel == level-2) {

   // LEVEL-2 AND LEVEL-1 VIEWING ONLY.

$sql .= WHERE (gAccessLevel = 'level-1' OR gAccessLevel = 'level-2');

  } else if ($siteAccessLevel == level-3) {

   // PAYING, ACCESS ALL IMAGES!

$sql .= WHERE (gAccessLevel = 'level-1' OR gAccessLevel = 'level-2' OR
gAccessLevel = 'level-3');

  } else {

   // IF ERROR SHOW LEVEL ONE.

$sql .= WHERE (gAccessLevel = 'level-1');

  }

  $sql .=  ORDER BY gId DESC LIMIT $gStart, 10;

  echo $sql;

$sql_result = mysql_query($sql, $connection) or die (mysql_error());


MY ERROR MESSAGE IS ...

10You have an error in your SQL syntax near 'WHERE (gAccessLevel = 'level-1'
OR gAccessLevel = 'level-2' OR gAccessLevel = 'l' at line 1

as gAccessLevel = level-3 ...

Any Ideas why this is weong?








--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



Re: [PHP] mysql_connect issue

2003-03-14 Thread Philip J. Newman


try

mysql_connect(loghost:3306,$username,$password);


- Original Message -
From: Steve Shead [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 15, 2003 12:14 PM
Subject: [PHP] mysql_connect issue


 I'm trying to get a small PHP based log reader to run but get this error
every time:

 Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/weblog/weblog.php on line 58

 Here is the PHP I'm using ... does anyone know what is happening here?

 ?php
 /*
 Simple syslog web viewer
 by NDG Tech team - www.ndgtech.ro.

 version: 0.5.1

 Authors: Adrian Badea adi [at] ndgtech.ro
 Radu Solea radu [at] ndgtech.ro
 Contributor: Hannes Gruber hannes [at] usw.at

 Tested with:
 Apache 2.0.36
 PHP 4.3.0
 MySQL 3.23.51
 Slackware Linux 8.1
 kernel version 2.4.20
 on an AthlonXP 1800+ 512 MB SDRAM
 */

 error_reporting(E_ERROR+E_WARNING);
 $configuration=parse_ini_file('weblog.ini');

 function htmlerror()
 {
 echo htmlheadtitleError page/title/head;
 echo bodybrbrbrbrfont size=4bWebLog errorbr/bhr size=1
width=62% align=left;
 echo This program has performed an illegal operation. Software police has
been notified./hrbrbr;
 echo /font/body/html;
 exit;
 }


 if (($_POST[user]!=NULL)  ($_POST[pass]!=NULL))
 {
 setcookie(user,$_POST[user],time()+3600);
 setcookie(pass,$_POST[pass],time()+3600);
 $username=$_POST[user];
 $password=$_POST[pass];
 }
 elseif (($_COOKIE[user]!=NULL)  ($_COOKIE[pass]!=NULL))
 {
 $username=$_COOKIE[user];
 $password=$_COOKIE[pass];
 }
 else
 {
 htmlerror();
 };


 function getmicrotime(){ // code from the PHP manual
 list($usec, $sec) = explode( ,microtime());
 return ((float)$usec + (float)$sec);
 }
 $time_start = getmicrotime();

 mysql_connect(loghost:3306,$username,$password);

 if (mysql_errno()!=0)
 {
   echo Mysql error:nbsp;;
   $error=mysql_error();
   echo $error;
   exit;
 }

 mysql_select_db(system); // previously created database

 $create_query=create temporary table filenames (name varchar(255) unique,
sep varchar(255));
 $p1=mysql_query($create_query);

 $load_query=load data infile '.$configuration['config_file'].' into
table filenames fields terminated by '\t';;
 $p2=mysql_query($load_query);

 if ($_POST[lo]==NULL)
 {
 $file_get=select * from filenames limit 1;
 $result=mysql_query($file_get);
 $row=mysql_fetch_array($result);
 $filename=$row[name];
 $separator=$row[sep];
 }
 else
   if ($_POST[load]==NULL)
 {
 $filename=$_POST[fn];
 $file_get=select sep from filenames where name='$filename';
 $result=mysql_query($file_get);
 $row=mysql_fetch_array($result);
 $separator=$row[sep];
 }
 if ($_POST[load]!=NULL)
 {
 $filename=$_POST[files];
 $file_get=select sep from filenames where name='$filename';
 $result=mysql_query($file_get);
 $row=mysql_fetch_array($result);
 $separator=$row[sep];
 $lo_val=0;
 $hi_val=15;
 $esearch=NULL;
 $vsearch=NULL;
 }


 /**
 $filepath=dirname($filename)./;
 $file=basename($filename);
 exec(find $filepath -name '$file*' -type f -print0 | xargs -ifile -0 cat
'file'  /tmp/mesaje);
  */
 exec(cp $filename /tmp/mesaje);
 exec(chmod 444 /tmp/mesaje);

 $hostname=exec('echo ${HOSTNAME%%.*}');

 mysql_query(create temporary table syslog (date varchar(16), message
varchar(255)));
 $query=load data infile '/tmp/mesaje' into table syslog fields terminated
by ' $separator ';

 mysql_query($query);

 if (($_POST[vsearch]!=NULL) || ($_POST[search]!=NULL))
{
 $pula=$_POST[vsearch];
 $query=select COUNT(*) from syslog where message like '%$pula%';
 }
 else
 {
 $query=select COUNT(*) from syslog;
 }

 $res=mysql_query($query);
 $maximum=mysql_fetch_row($res);
 $maximum=$maximum[0];

 echo headtitleSyslogd web viewer/title/head;

 echo center;
 echo body text=\#00\ bgcolor=\#F2EAEA\bfont size=12;

 echo table border=0 align=center cellpadding=5;
 echo tr bgcolor=\#9db3cc\ align=center width=60% height=10tdfont
size=5bWebLog - Syslogd Web Viewer/b/font/td/tr;
 echo /table;
 echo /fontbr/center/body/b;
 echo body bgcolor=\C0C0C0\;

 if ($_POST[lo]==NULL)
 {
 $lo_val=0;
 $hi_val=15;
 }
 elseif ($_POST[hi]==NULL)
 {
 $lo_val=0;
 $hi_val=15;
 }
 else if ($_POST[next]!=NULL)
 {
 $lo_val=$_POST[hi];
 $hi_val=2*$_POST[hi]-$_POST[lo];
 }
 else if($_POST[prev]!=NULL)
 {
 $lo_val=2*$_POST[lo]-$_POST[hi];
 $hi_val=$_POST[lo];
 }
 else if($_POST[go]!=NULL)
 {
 $lo_val=$_POST[lo];
 $hi_val=$_POST[hi];
 }
 else if($_POST[rst]!=NULL)
 {
 $lo_val=0;
   $hi_val=15;
 $esearch=NULL;
 $vsearch=NULL;
}
 else if($_POST[bsearch]!=NULL)
 {
 $lo_val=0;
 $hi_val=15;
 }
 else if($_POST[esearch]!=NULL)
 {
 $lo_val=0;
 $hi_val=15;
 }

 if (($_POST[bsearch]!=NULL)  ($_POST[search]!=NULL))
 {
 $esearch=1;
 $vsearch=$_POST[search];
 }
 elseif ($_POST[esearch]!=NULL)
 {
 $esearch=$_POST[esearch];
 $vsearch=$_POST[vsearch];
 }
 else
 {
 $esearch=NULL;
 $vsearch=NULL;
 }

 if ($_POST[load]!=NULL)
 {
 $esearch=NULL;
 

[PHP] Crypting Passwords for storage.

2003-03-13 Thread Philip J. Newman
I have a user admin for a site, how ever passwords are stored in plane text.
Is there away to crypt and then read the crypt when verifying that string vs
the plane text in the password box?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]



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



[PHP] Making a Loop.

2003-03-12 Thread Philip J. Newman
I have this code to make this form list $x amount of times.

  for ($i = 1; $i = $number; $i++) {

  echoselect name=\$number\ size=\1\;

   // LIST ALL PRODUCTS IN DATABASE.

   $sql = SELECT * FROM products ORDER BY productCode ASC;
  $sql_result = mysql_query($sql, $connection) or die (Could not
get Query);

  while ($row = mysql_fetch_array($sql_result)) {

   $productCode=$row[productCode];
   echo option value=\$productCode\$productCode/optionbr;

   } // END WHILE.

 echo/select;


  }

and it dose not work any help?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



Re: [PHP] Making a Loop.[Scanned]

2003-03-12 Thread Philip J. Newman
assuming the value is 10, I stall can't get it to work


- Original Message -
From: Michael Egan [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 9:29 PM
Subject: RE: [PHP] Making a Loop.[Scanned]


Philip,

I might be missing something but just looking at the top few lines of your
code the $number variable has no value.

The loop will run on howver many times corresponds to this value - with the
value being null it's not going to run.

You'll need to pass in a value from elsewhere.

Michael Egan

-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 08:21
To: [EMAIL PROTECTED]
Subject: [PHP] Making a Loop.[Scanned]


I have this code to make this form list $x amount of times.

  for ($i = 1; $i = $number; $i++) {

  echoselect name=\$number\ size=\1\;

   // LIST ALL PRODUCTS IN DATABASE.

   $sql = SELECT * FROM products ORDER BY productCode ASC;
  $sql_result = mysql_query($sql, $connection) or die (Could not
get Query);

  while ($row = mysql_fetch_array($sql_result)) {

   $productCode=$row[productCode];
   echo option value=\$productCode\$productCode/optionbr;

   } // END WHILE.

 echo/select;


  }

and it dose not work any help?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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


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



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



[PHP] Checking for a Valid Email String.

2003-03-11 Thread Philip J. Newman
Required: Help for checking for a valid email string.

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED] 


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



Re: [PHP] Checking for a Valid Email String.

2003-03-11 Thread Philip J. Newman
how ever i don't think most ISPs let users pick names with the + sign in it

- Original Message -
From: Paul Chvostek [EMAIL PROTECTED]
To: David E.S.V. [EMAIL PROTECTED]
Cc: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 2:37 PM
Subject: Re: [PHP] Checking for a Valid Email String.


  On Wed, 12 Mar 2003, Philip J. Newman wrote:
 
   Required: Help for checking for a valid email string.

 On Tue, Mar 11, 2003 at 08:19:36PM -0500, David E.S.V. wrote:
 
  you mean something like this?
 
  //checking if the email is valid
 
  if
(eregi(^[0-9a-z]([-_.]?[0-9a-z])[EMAIL PROTECTED]([-.]?[0-9a-z])*\\.[a-z]{2,3}$,
$email, $check))
   {
if ( !getmxrr(substr(strstr($check[0], '@'), 1),
$validate_email_temp) )
  $mensaje=server not valid;
 
// checking DNS
if(!checkdnsrr(substr(strstr($check[0], '@'), 1),ANY))
   $mensaje=server not valid;
 
   }

 Don't forget plus signs.  When providing email addresses to lists and
 web sites, I regularly tag my address (as the From address on this
 message demonstrates).  Using procmail for local delivery allows these
 addresses to be delivered to my account, and I can more easily track
 down the origin of tagged spam.  When I come across a web site or list
 that doesn't allow my address with a plus sign, I find another site or
 list.  So I use:

 function isvalidemail($what) {
 if
(!eregi('[a-z0-9][a-z0-9._=+-]*@([a-z0-9][a-z0-9-]*\.)+[a-z][a-z]+$',$what))
return(false);
 list($user,$domain) = explode(@,$what);
 if (!getmxrr($domain,$mxhosts)) return(false);
 if (!count($mxhosts)  0) return(false);
 return(true);
 }

 --
   Paul Chvostek [EMAIL PROTECTED]
   Operations / Abuse / Whatever
   it.canada, hosting and development   http://www.it.ca/





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



Re: [PHP] Checking for a Valid Email String.

2003-03-11 Thread Philip J. Newman
You have used the ' in sted of the  i assume that there is no difference?

- Original Message -
From: Paul Chvostek [EMAIL PROTECTED]
To: David E.S.V. [EMAIL PROTECTED]
Cc: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 2:37 PM
Subject: Re: [PHP] Checking for a Valid Email String.


  On Wed, 12 Mar 2003, Philip J. Newman wrote:
 
   Required: Help for checking for a valid email string.

 On Tue, Mar 11, 2003 at 08:19:36PM -0500, David E.S.V. wrote:
 
  you mean something like this?
 
  //checking if the email is valid
 
  if
(eregi(^[0-9a-z]([-_.]?[0-9a-z])[EMAIL PROTECTED]([-.]?[0-9a-z])*\\.[a-z]{2,3}$,
$email, $check))
   {
if ( !getmxrr(substr(strstr($check[0], '@'), 1),
$validate_email_temp) )
  $mensaje=server not valid;
 
// checking DNS
if(!checkdnsrr(substr(strstr($check[0], '@'), 1),ANY))
   $mensaje=server not valid;
 
   }

 Don't forget plus signs.  When providing email addresses to lists and
 web sites, I regularly tag my address (as the From address on this
 message demonstrates).  Using procmail for local delivery allows these
 addresses to be delivered to my account, and I can more easily track
 down the origin of tagged spam.  When I come across a web site or list
 that doesn't allow my address with a plus sign, I find another site or
 list.  So I use:

 function isvalidemail($what) {
 if
(!eregi('[a-z0-9][a-z0-9._=+-]*@([a-z0-9][a-z0-9-]*\.)+[a-z][a-z]+$',$what))
return(false);
 list($user,$domain) = explode(@,$what);
 if (!getmxrr($domain,$mxhosts)) return(false);
 if (!count($mxhosts)  0) return(false);
 return(true);
 }

 --
   Paul Chvostek [EMAIL PROTECTED]
   Operations / Abuse / Whatever
   it.canada, hosting and development   http://www.it.ca/





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



[PHP] Join

2003-03-09 Thread Philip J. Newman

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED] 


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



[PHP] Images out side the wwwroot

2003-03-09 Thread Philip J. Newman
If i was to use PHP to call all my images from out side the wwwroot, dose
anyone have a method that they use?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



Re: [PHP] PHP SQL Code

2003-03-02 Thread Philip J. Newman
This one returns a 'Could not get Query' warning ... so thats out.


- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Philip J. Newman' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 5:31 AM
Subject: RE: [PHP] PHP SQL Code


  I would like yo show the users in a list that have a date that is more
  than
  60 days old.

 $sql = SELECT * FROM stompers WHERE sUpdated  CUR_DATE() - INTERVAL 60
 DAY AND sActive = 'Y' ORDER BY sUpdated DESC;

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/




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



[PHP] Checking Access to a directory Via a PHP/MYSQL Databace.

2003-03-01 Thread Philip J. Newman
Is there a way that i can restrict access to an entire directory using
PHP/MYSQL so only valid users in the Database can have access to a resource?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



[PHP] Upper and lower case.

2003-03-01 Thread Philip J. Newman
Question:

is it better to store user names as upper and lower case? should they bee
converted to one case?

I have a script the checks for names and  ...

Mark is not the same as mark, or MaRk ...

is there a way of making a string into lower case?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



Re: [PHP] Upper and lower case.

2003-03-01 Thread Philip J. Newman
LOL got a reply to this before i ever got the message my self ... 

- Original Message - 
From: Philip J. Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 02, 2003 10:56 AM
Subject: [PHP] Upper and lower case.


 Question:
 
 is it better to store user names as upper and lower case? should they bee
 converted to one case?
 
 I have a script the checks for names and  ...
 
 Mark is not the same as mark, or MaRk ...
 
 is there a way of making a string into lower case?
 
 
 --
 Philip J. Newman.
 Head Developer
 [EMAIL PROTECTED]
 
 +64 (9) 576 9491
 +64 021-048-3999
 
 --
 Friends are like stars
 You can't allways see them,
 but they are always there.
 
 --
 Websites:
 
 PhilipNZ.com - Design.
 http://www.philipnz.com/
 [EMAIL PROTECTED]
 
 Philip's Domain // Internet Project.
 http://www.philipsdomain.com/
 [EMAIL PROTECTED]
 
 Vital Kiwi / NEWMAN.NET.NZ.
 http://www.newman.net.nz/
 [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP] PHP SQL Code

2003-03-01 Thread Philip J. Newman
I would like yo show the users in a list that have a date that is more than
60 days old.


$sql = SELECT * FROM stompers WHERE sUpdated 
from_unixtime(unix_timestamp(now())-(15760*60)) AND sActive = 'Y' ORDER BY
sUpdated DESC;

This don't quite work ..

Any suggestions?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]



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



[PHP] Checking for HTTP:// at the start of a string and more ////

2003-02-28 Thread Philip J. Newman
I would like to check for HTTP:// at the start of a string and for at least
1 . and a / at the end of a string.

I have tried ereg, but the documentation is not too clear how to format.




--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]

--
Quote:

God gave men both a penis and a brain,
but unfortunately not enough blood supply
to run both at the same time.

- Robin Williams
(Commenting on the Clinton/Lewinsky affair).



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



[PHP] IS there a way.

2003-02-28 Thread Philip J. Newman
  Is there a way to PING a URL and check if it returns a valid code like 200
... ??

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[EMAIL PROTECTED]

--
Quote:

God gave men both a penis and a brain,
but unfortunately not enough blood supply
to run both at the same time.

- Robin Williams
(Commenting on the Clinton/Lewinsky affair).



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



[PHP] I would like to display a list of the same products only if productPublic = staff or members.

2003-01-31 Thread Philip J. Newman
I would like to list 2 possable items in a mysql queary.

SELECT * FROM products WHERE productType = '$productType AND Where
productPublic = 'staff' OR productPublic = 'members' ORDER BY productId DESC
LIMIT 10

I would like to display a list of the same products only if productPublic =
staff or members.

At the moment what i have just gives me the 1st 10 items.

Any help





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




Re: [PHP] test

2003-01-12 Thread Philip J. Newman
this was a functional email

- Original Message - 
From: Karl James [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 13, 2003 12:24 AM
Subject: [PHP] test


 test
 


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




[PHP] Loading Information into an array.

2003-01-10 Thread Philip J. Newman
I have a table with images and comments.

if i have $x amout of images that each have a comment.

the comments are displayed in the center colum of the table with the images loading 
left and right of each comment.

http://www.philipnz.com/example.jpg

I can get the images to load in their left and right position, how ever i can't get 
the right array to print each comment with the image.

Any help would be cool.

Phil



[PHP] makeing an array

2002-12-31 Thread Philip J. Newman
Can someone help me make an array ...

I have $foo amount of loops to preform (1-20), and would like to make the
veriable work for me like $comment_1, $comment_2 etc etc.

http://nz.php.net/manual/en/function.array.php makes no sence to me after i
read it and read it ...

help me please

---
Philip J. Newman.
Head Developer.
PhilipNZ.com New Zealand Ltd.
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (9) 5769491.

VitalKiwi Site:
Philip J. Newman
Internet Developer
http://www.newman.net.nz/
[EMAIL PROTECTED]

*
  Friends are like Stars,
  You can't always see them,
  But you know they are there.

*

ICQ#: 20482482
MSN ID: [EMAIL PROTECTED]
Yahoo: [EMAIL PROTECTED]
AIM: newmanpjkiwi


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




Re: [PHP] makeing an array

2002-12-31 Thread Philip J. Newman
So in saything that I could do this ...

$s = 10

$comment[1] = '$comment_1';
$comment[2] = '$comment_2';
$comment[3] = '$comment_2';

for($i = 0; $i = $s; $i++) {

 echo $comment[$i].br;

}



- Original Message -
From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 01, 2003 6:12 PM
Subject: Re: [PHP] makeing an array


 Example of an Array:

 $my_first_array = array(1 = 'first', 2 = 'second', 3 = 'third');

 You can now access these like so:

 echo $my_first_array[1];   etc etc

 of if you had this:  $my_first_array = array('first_name' = 'Philip',
 'last_name' = 'Newman');

 You could do this:

 echo $my_first_array['first_name'];

 The thing to remember is that array's start at 0 see below!! (I started
at
 1 at the top to make it easier).

 You can also make an array like so:

 $first[] = 'Philip';
 $first[] = 'John';
 $first[] = 'Paul';

 Now you can simply do:

 echo $first[0];  // this could output 'Philip';

 You can then look at multi dimensional etc...

 I trust this get's you on your way.


 Timothy Hitchens (HiTCHO)
 [EMAIL PROTECTED]


 HiTCHO | Open Platform Web Development
 Consulting - Outsourcing - Training - Support


 - Original Message -
 From: Philip J. Newman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 01, 2003 2:57 PM
 Subject: [PHP] makeing an array


  Can someone help me make an array ...
 
  I have $foo amount of loops to preform (1-20), and would like to make
the
  veriable work for me like $comment_1, $comment_2 etc etc.
 
  http://nz.php.net/manual/en/function.array.php makes no sence to me
after
 i
  read it and read it ...
 
  help me please
 
  ---
  Philip J. Newman.
  Head Developer.
  PhilipNZ.com New Zealand Ltd.
  http://www.philipnz.com/
  [EMAIL PROTECTED]
 
  Mob: +64 (25) 6144012.
  Tele: +64 (9) 5769491.
 
  VitalKiwi Site:
  Philip J. Newman
  Internet Developer
  http://www.newman.net.nz/
  [EMAIL PROTECTED]
 
  *
Friends are like Stars,
You can't always see them,
But you know they are there.
 
  *
 
  ICQ#: 20482482
  MSN ID: [EMAIL PROTECTED]
  Yahoo: [EMAIL PROTECTED]
  AIM: newmanpjkiwi
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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



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




[PHP] XML into PHP

2002-11-12 Thread Philip J. Newman
How would i call a page in PHP that is XML?

eg; if i had a file that was like below.

http://www.philipnz.com/news/rss.xml

and i wanted to include it onto a page.

HELP (looking through the docs now)

--- 
Philip J. Newman.
Head Developer.
PhilipNZ.com New Zealand Ltd.
http://www.philipnz.com/ 
[EMAIL PROTECTED]

Mob: +64 (25) 6144012. 
Tele: +64 (9) 5769491.

Family Site: 
Philip J. Newman
Internet Developer
http://newman.net.nz/
[EMAIL PROTECTED]

*
  Friends are like Stars,
  You can't always see them,
  But you know they are there.

*

ICQ#: 20482482
MSN ID: [EMAIL PROTECTED]
Yahoo: [EMAIL PROTECTED]
AIM: newmanpjkiwi



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




[PHP] Showing online users!

2002-09-24 Thread Philip J. Newman

The best way to show online users ...

every page that is loaded while a user is online the time stamp is updated
in there profile

?

$sql = SELECT sUser FROM members WHERE sUpdated  
from_unixtime(unix_timestamp(now())-(10*60));
$sql_result = mysql_query($sql, $connection) or die (mysql_error());

while ($row = mysql_fetch_array($sql_result)) {
$sUser=$row[sUser];

echoba
href=\/actual/thesite.php?startWeb=profilesUser=$sUser\$sUser/a/b,
;

}

?

Is this the best way to do this?

---
Philip J. Newman.
Head Developer.
PhilipNZ.com New Zealand Ltd.
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (9) 5769491.

Family Site:
Philip J. Newman
Internet Developer
http://www.newman.net.nz/
[EMAIL PROTECTED]

*
  Friends are like Stars,
  You can't always see them,
  But you know they are there.

*




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




Re: [PHP] Installing php in windows 95

2002-09-24 Thread Philip J. Newman

windows 95 your jokeing right?

- Original Message -
From: Uma Shankari T. [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 4:13 PM
Subject: [PHP] Installing php in windows 95



 Hello,

   I need to install php for windows under particular folder namely under
 C:\web..In the installation manual it is mentioned that dll should be
 copied to c:\windows..but the dll is not available under c:\web...can any
 please telll me how to do this..

 Regards,
 Uma


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



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




[PHP] Ah ha ... confirm delete.

2002-09-24 Thread Philip J. Newman

confirm() returns a true or fulse.

what is confirm called as a veriable?

 ?php

 if ($confirm == true) {

 $sql = DELETE FROM stompers WHERE sUser='$sUser' AND sEmail='$sEmail'
LIMIT 1;

 $sql_result = mysql_query($sql, $connection) or die (Could not get
Query);

 } else if ($confirm == false) {

 }

 ?

---
Philip J. Newman.
Head Developer.
PhilipNZ.com New Zealand Ltd.
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (9) 5769491.

Family Site:
Philip J. Newman
Internet Developer
http://www.newman.net.nz/
[EMAIL PROTECTED]

*
  Friends are like Stars,
  You can't always see them,
  But you know they are there.

*




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




Re: [PHP] Mail problem with more than 1k users

2002-09-23 Thread Philip J. Newman

I suggest you get a mailing list program if your sending to more than 1k of
users

Philip

- Original Message -
From: Justin French [EMAIL PROTECTED]
To: Research and Development [EMAIL PROTECTED]; PHP General List
[EMAIL PROTECTED]
Sent: Tuesday, September 24, 2002 1:57 PM
Subject: Re: [PHP] Mail problem with more than 1k users


 This gets discussed quite frequently.

 My guess is that your ISP *may* be imposing some limitations, but more
 likely your PHP script is timing out or something similar.

 Justin


 on 24/09/02 9:08 AM, Research and Development ([EMAIL PROTECTED]) wrote:

  Hello. I wrote a PHP script that will pull records from a database
  (emails) and then mail something to the emails in the result set.
  Pretty simple and it worked.
 
  Now that the database has over 1 thousand records I began to experience
  performance problems. I figured that my problem was that Sendmail does
  not process emails that have more than x number of emails.
 
  So I re-designed the script to send emails in parts. 500 emails per
  header. But after the database reached more than 3,000 records the
  emailing did not work at all. Sendmail refused to send to any of the
  emails in the database result set.
 
  Any thoughts?
 


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



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




[PHP] return the amount of records in a mysql databace

2002-09-22 Thread Philip J. Newman

Can someone point me in the right direction to find out how i can return the
amount of records in a mysql databace ?

---
Philip J. Newman.
PhilipNZ.com New Zealand
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (9) 5769491.

Family Site:
Philip J. Newman
Internet Developer
http://www.newman.net.nz/
[EMAIL PROTECTED]




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




Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Philip J. Newman

?php

$sql = SELECT count(*) FROM stompers  WHERE 1;
$sql_result = mysql_query($sql, $connection) or die (Could not get Query);

$row = mysql_fetch_array($sql_result);
$sUsers=$row[count(*)];

echo brWe have b$sUsers/b registered users.;

?

This would be the best way (suggestions would be cool);



- Original Message -
From: Mark Charette [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 1:28 AM
Subject: RE: [PHP] return the amount of records in a mysql databace


 select count(*) as n from ... where ...

 -Original Message-
 From: Philip J. Newman [mailto:[EMAIL PROTECTED]]

 Can someone point me in the right direction to find out how i can return
the
 amount of records in a mysql databace ?



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




Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Philip J. Newman

select count(*) as n from ... where ...

This worked well for me.

- Original Message - 
From: John Holmes [EMAIL PROTECTED]
To: 'Jeff Bluemel' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 1:28 PM
Subject: RE: [PHP] return the amount of records in a mysql databace


 Then do a SHOW DATABASES query before that and loop through the results,
 counting the rows in each table. 
 
 If you have to do this, though, I think you have some normalization
 issues with your database...
 
 ---John Holmes...
 
  -Original Message-
  From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, September 22, 2002 11:46 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] return the amount of records in a mysql databace
  
  this is only going to return records in a table, and not in a database
  
  
   select count(*) as n from ... where ...
  
   -Original Message-
   From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
  
   Can someone point me in the right direction to find out how i can
 return
  the
   amount of records in a mysql databace ?
  
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP] Enhancement of script

2002-09-07 Thread Philip J. Newman

Looks good if your keen to shear the code we could have a tinkle with it and
see if we can work it out.

Phil

- Original Message -
From: Ray Healy (Data Net Services) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 07, 2002 10:11 PM
Subject: [PHP] Enhancement of script


 Dear All

 I have recently downloaded a calendar from CST (which is no longer
 supported ) and I have made a few changes to the script.

 The calendar will be used to see when something is booked and you can
assign
 messages to it as well which the general user cannot see. In this respects
I
 have created 2 pages - welcome .php for the general viewer and
admin_welcome
 for the updating of the calendar.

 What I would like to do is to be able to enter multiple dates in at the
same
 time - either saying from a start date for so many days or from a start
date
 to an end date.

 After spending hours looking at the code and in this forum I cannot seem
to
 get it right - basically I cannot do it.

 I was wondering if someone could have a look and tell me where I am going
 wrong.

 I have attached the files to this email along with the mySQL table file in
 case another column needs to be added.

 You can see the script running at
 www.matrix-hosting.co.uk/prestige/welcome.php for the general view and
 www.matrix-hosting.co.uk/prestige/admin_welcome.php for the admin side.

 Any help would be appreciated


 Ray

 P.S. if any one also knows how to get it to display a 2 or 3 months at a
 time or even a year this would also be a bonus as I have tried to do this
as
 well.









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


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




Re: [PHP] Re: Proposal for securing PHP sessions

2002-09-07 Thread Philip J. Newman

You could use a SUB NET (o; to block a group of users ie 202.*.*.* would
kill most of New Zealand and Oz

- Original Message -
From: Dave at Sinewaves.net [EMAIL PROTECTED]
To: PHPlist [EMAIL PROTECTED]; M1tch [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 8:34 AM
Subject: RE: [PHP] Re: Proposal for securing PHP sessions


 You're going to be shutting out a lot of AOL users (bah! who needs em! ;p)
 if you do that, as AOL changes a user's IP address about as often as you
 read the word the...

 Dave


 -Original Message-
 From: M1tch [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, September 07, 2002 12:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Proposal for securing PHP sessions


 Why not just use IP?
 I created a nice system, whereby if your IP is changed (or someone is
 hacking your session), the session is destroyed, and the user must log in.
 Does not add much overhead either.

 Also, I built it using database (using my own session functions in
 savehandler), that stores the ip as well.
 This prevents people snooping.

 Still not 100% secure I imagine, but much better.

 Andy

 Mar Tin [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  Dear all:
 
  Until I read the article PHP Session security
  (http://www.webkreator.com/php/configuration/php-session-security.html)
  I haven't noticed how insecure PHP Sessions are.
 
 
 
  Basically there're 2 problems:
 
  *) It's possible to hijack a session if you know the
  SID (session id)
 
   1) If you're on a shared server (cheap webhosting)
  other users can get the SIDs by doing ls /tmp/sess_*
  (/tmp/ is defined on session.save_path on the config
  file, so it may be different).
 
   2) When a user clicks on an external link, the
  browser sends the REFERER url and sometimes it
  contains the SID (if session.use_trans_sid is enabled)
 
  PHP offers a security measure: with
  session.referer_check it will reject SIDs comming from
  other referers, but the referer url can be easily
  forged.
 
  *) Users can read session data from the session files,
  which are owned by the server process (every user
  which has an account on the webserver can read server
  owned files)
 
  (If you're intrested in the subject I would recommend
  to read full the article:
  http://www.webkreator.com/php/configuration/php-session-security.html)
 
  I have developed some functions to avoid this
  problems. They replace the standard session functions
  (using session_set_save_handler), so you only have to
  include the file at the beggining of your script and
  (afaik) you're safe :)
 
  This is the idea:
 
  Apart from the session cookie, I set another one (with
  the same name and the string '_sec' appended). On this
  cookie I set a random KEY.
  The name of the file which contains the session data
  is the md5 hash of the SID and the KEY together. This
  turns impossible to guess the session id by looking at
  the filenames.
 
  To hide the data inside the file, the serialized
  string is crypted using the KEY as password, so nobody
  can see the content of your user's sessions.
 
  You can find the code here:
  http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt
 
  Im looking for suggestions to make it 100% compatible
  with the standard session functions, and I would like
  to hear some thougts about the idea
 
  Martin Sarsale
  [EMAIL PROTECTED]
 
  __
  Do You Yahoo!?
  Yahoo! Finance - Get real-time stock quotes
  http://finance.yahoo.com



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


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



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




Re: [PHP] How to program very basic chat on PHP?

2002-09-07 Thread Philip J. Newman

You could create a scema, or module that is called with each page load, that
checks for messages when the user is logged in.  So when the message is
stored into the databace, when the user loads the anypage while logged in it
checks for new messages, and if the user has messages then the window pops
up and the user can eather reply etc etc

Phil

- Original Message -
From: M [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 10:09 AM
Subject: [PHP] How to program very basic chat on PHP?


 Hello, this question is about dynamic communication between browsers.

 I have a site to meet people (PHP/Mysql).These people have their
 profiles and pictures stored into the site.
 I would like to make some kind of chat (very single chat), so when
 people log into system, I can trace their nicknames and list all active
 users onto some table.

 When someone wants talk to any other listed person, he just click on
 nick name, and some window will open on the other people browser's. This
 way, a single chat between two users could be stablished easily.

 Is this possible to program just using PHP?. I cant figure here how to
 control remotely the other user's browse (open chat window for instance)
 using only PHP.

 Thanks for any help

 Mig


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



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




[PHP] The page before for newman.

2002-07-25 Thread Philip J. Newman

I'm looking for the global veriable that lists the page before the page that
i just came from.  Anyone know what i'm talking about?

---
Philip J. Newman.
PhilipNZ.com Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (25) 6144012.

Personal Site:
Philip J. Newman
Internet Developer
http://www.philipsdomain.com/
[EMAIL PROTECTED]




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




[PHP] Newman Asks, Do i have to use session_name('sid') every ...

2002-07-25 Thread Philip J. Newman

session_name('sid');
session_start();

Do i have to use session_name('sid'); every time i use session_start(); or
can session_name be used once?

---
Philip J. Newman.
PhilipNZ.com Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (25) 6144012.

Personal Site:
Philip J. Newman
Internet Developer
http://www.philipsdomain.com/
[EMAIL PROTECTED]




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




[PHP] Newman's PHP sessions management.

2002-07-24 Thread Philip J. Newman

One question.

When i start a new session i get the veriable PHPSESSID=what ever added to
links that I want PHPSESSID to be called sid.  How can i do this?

---
Philip J. Newman.
PhilipNZ.com Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (25) 6144012.

Personal Site:
Philip J. Newman
Internet Developer
http://www.philipsdomain.com/
[EMAIL PROTECTED]




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




[PHP] Newman and his session management.

2002-07-23 Thread Philip J. Newman

I have started a session on the server, and now would like to add a user
name and password, and some other information to the session to carry it
across all the other pages that are in this session.  Any hints on where to
start?


--- 
Philip J. Newman. 
PhilipNZ.com Design Solutions 
http://www.philipnz.com/ 
[EMAIL PROTECTED] 

Mob: +64 (25) 6144012. 
Tele: +64 (25) 6144012. 

Personal Site: 
Philip J. Newman
Internet Developer
http://www.philipsdomain.com/
[EMAIL PROTECTED]




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




[PHP] Newman and sessions.

2002-07-23 Thread Philip J. Newman

I have started a session on the server, and now would like to add a user
name and password, and some other information to the session to carry it
across all the other pages that are in this session.  Any hints on where to
start?

---
Philip J. Newman.
PhilipNZ.com Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]

Mob: +64 (25) 6144012.
Tele: +64 (25) 6144012.

Personal Site:
Philip J. Newman
Internet Developer
http://www.philipsdomain.com/
[EMAIL PROTECTED]




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




Re: [PHP] Newman and sessions.

2002-07-23 Thread Philip J. Newman

so how would i get the $username and $password into the session

session_register('$username','$password');

??

- Original Message -
From: Wee Keat [EMAIL PROTECTED]
To: Philip J. Newman [EMAIL PROTECTED]
Sent: Wednesday, July 24, 2002 5:43 PM
Subject: Re: [PHP] Newman and sessions.


 I got this from the Internet... but could not remember from where...

 Have a look and see if this helps you...


 - Original Message -
 From: Philip J. Newman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, July 24, 2002 3:30 PM
 Subject: [PHP] Newman and sessions.


  I have started a session on the server, and now would like to add a user
  name and password, and some other information to the session to carry it
  across all the other pages that are in this session.  Any hints on where
 to
  start?
 
  ---
  Philip J. Newman.
  PhilipNZ.com Design Solutions
  http://www.philipnz.com/
  [EMAIL PROTECTED]
 
  Mob: +64 (25) 6144012.
  Tele: +64 (25) 6144012.
 
  Personal Site:
  Philip J. Newman
  Internet Developer
  http://www.philipsdomain.com/
  [EMAIL PROTECTED]
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php





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




[PHP] Newman Says: Only one value from a msSQL field.

2002-06-01 Thread Philip J. Newman

Only one value from a msSQL field.

I have many values the same in a field and would like to know how i can select one of 
each (not mating).

$sql = SELECT * FROM brands WHERE 1 ORDER BY `sId` DESC LIMIT 6;

lists everything ..

ANy help would be cool.

Phil





[PHP] Newman Says: Error when starting sessions.

2002-03-31 Thread Philip J. Newman

I'm trying to start a session, and I get this error.

I have been told its something to do with a missing dir is my php dir?

Warning: open(1\sess_0513b5c5d7021f1acdcf9f732032081f, O_RDWR) failed: No such file or 
directory (2) in Unknown on line 0


Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012



[PHP] Re: Newman Says: Error when starting sessions.

2002-03-31 Thread Philip J. Newman

so it should be

session.save_path = c:\php\temp

at the moment it says

session.save_path = 1

- Original Message -
From: Yasuo Ohgaki [EMAIL PROTECTED]
Newsgroups: php.general
To: Philip J. Newman [EMAIL PROTECTED]
Sent: Monday, April 01, 2002 2:16 PM
Subject: Re: Newman Says: Error when starting sessions.


 Philip J. Newman wrote:
  I'm trying to start a session, and I get this error.
 
  I have been told its something to do with a missing dir is my php dir?
 
  Warning: open(1\sess_0513b5c5d7021f1acdcf9f732032081f, O_RDWR) failed:
No such file or directory (2) in Unknown on line 0
 

 You have invalid session.save_path

 --
 Yasuo Ohgaki







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




Re: [PHP] Some Problems that Newman has with PHP since reinstall.

2002-03-30 Thread Philip J. Newman

Still didn't work, found the problem thoe. it was a file I never put into my
system32 folder (o;  Thanks for your help.s

- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 31, 2002 6:10 AM
Subject: Re: [PHP] Some Problems that Newman has with PHP since reinstall.


 On Saturday 30 March 2002 14:26, Philip J. Newman wrote:
  Hi People,
  I just installed PHP again, and am having some problems with a few
things.
  When Posting to a form, veriables do not travel across the pages.  I
have
  checked the PHP.INI for something but nothing seems to change this.

 Is it vanity that prompts you include your name in every post you send?

 If you're using PHP  4.0.6 then the default behaviour regarding GET, POST

 COOKIES vars has changed. Either refer to them through $_POST[] or (not
 recommended) set

 register_globals = on

 in php.ini

  ... ALSO ...
 
  My redirect scripts have stoped responding.
  Any Ideas??

 No.

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







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




[PHP] From Newman: Just installed, get this error message.

2002-03-29 Thread Philip J. Newman

Security Alert! PHP CGI cannot be accessed directly. 
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a 
page will only be served up if the REDIRECT_STATUS CGI variable is set. This variable 
is set, for example, by Apache's Action directive redirect. 

You may disable this restriction by recompiling the PHP binary with the 
--disable-force-cgi-redirect switch. If you do this and you have your PHP CGI binary 
accessible somewhere in your web tree, people will be able to circumvent .htaccess 
security by loading files through the PHP parser. A good way around this is to define 
doc_root in your php.ini file to something other than your top-level DOCUMENT_ROOT. 
This way you can separate the part of your web space which uses PHP from the normal 
part using .htaccess security. If you do not have any .htaccess restrictions anywhere 
on your site you can leave doc_root undefined. If you are running IIS, you may safely 
set cgi.force_redirect=0 in php.ini. 


Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012



[PHP] From Newman: Redirect function not working.

2002-03-29 Thread Philip J. Newman

I have just updated my copy of PHP and changed the INI file.  Some of my redirect 
commands no longer work.

Any Suggestions.

Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012



[PHP] Some Problems that Newman has with PHP since reinstall.

2002-03-29 Thread Philip J. Newman

Hi People,
I just installed PHP again, and am having some problems with a few things.
When Posting to a form, veriables do not travel across the pages.  I have
checked the PHP.INI for something but nothing seems to change this.

... ALSO ...

My redirect scripts have stoped responding.
Any Ideas??

Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012




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




  1   2   >