Re: [PHP] Surpressing a 'foreach' Error Message

2004-02-06 Thread Chris Edwards
The is_array will still give a warning is the variable array does not exist.
Use isset()
- Original Message - 
From: craig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 5:35 PM
Subject: RE: [PHP] Surpressing a 'foreach' Error Message


  craig mailto:[EMAIL PROTECTED]
  on Friday, February 06, 2004 2:24 PM said:
 
   if (is_array($project))
 foreach ($project as $project_id = $value) {
   $fields[] = $project_id;
   $values[] = $value;
 }
   }
 
  you're missing a curly brace after the if ().
 

 my bad, that's what you get when you don't actually
 run the code. Thank god for compilers ;)

 -Craig

 -- 
 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] The PHP Problem

2004-01-30 Thread Chris Edwards
I have several web sites that I use PHP/mySQL with. I pay approximately $9
per month for a gigabyte of space and unlimited data transfer.

I use CodeWright from Starbase as my editor. It detects PHP code and
colorizes the code as you type i.e. reserved words are blue, comments are
green, literals are red, etc.. This helps with the initial syntax checking.

It does this with just about every language.


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 30, 2004 2:09 PM
Subject: Re: [PHP] The PHP Problem


 Hello Ashley,

 On 30 Jan 2004 at 18:51, Ash wrote:

  Hi,
  I am totally new to PHP and dont know a thing. I tried looking through
the
  articles but they were of no use. My Question is:
  How can I just write php in a text editor, save it as a .php, and view
it in
  internet explorer, offline? I have tried everything and it just wont
work.
  I tried the code:
 
  ?php
  echo Hi, I'm a PHP script!;
  ?
 
  in a .php file and nothing happened. Nothing will work, help!
 
  I dont have a website, I just want to write and use the code.

 I'm afraid things are not quite that simple. A PHP script requires a
processor to interpret
 the code and do whatever needs to be done, so you'll need to have the
processor on
 your computer. If you don't really know what you're going to be doing with
PHP and just
 want to play around with a scripting language without having to install a
web server and
 a PHP interpreter, try JavaScript.

 One of a million sources of introductory info on JavaScript:

 http://www.w3schools.com/js/js_intro.asp


 More info on obtaining and installing PHP here:

 http://www.php.net/manual/en/installation.php

 Good luck,

 Erik

 -- 
 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] Exectution Time?

2004-01-30 Thread Chris Edwards
Either echo out the start and end time to either the page or write it to a
file.

Go to www.php.net and do a search on time. The first example will give you
probably all you need.

- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 30, 2004 4:42 PM
Subject: Re: [PHP] Exectution Time?


 From: Mike Mapsnac [EMAIL PROTECTED]

  Is there a way to find out the execution time of php program?

 If you start a task at 10:00 and finish at 10:15, how long did it take?

 ---John Holmes...

 -- 
 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] Upload file size limits

2004-01-25 Thread Chris Edwards
I would like to give the users of my web site the ability to upload video
type files, up to 12 megs in size.

I notice in my PHI.INI there is a

 memory_limit =8M  ; Maximum amount of memory a script may consume
(8MB)

does this include temporary such as a file being transferred?

Also I intend to set the PHI.INI 'upload_max_filesize = 2M' to
'upload_max_filesize = 12M'.

Am I going in the right direction?

Thanks.

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



Re: [PHP] Error Reporting help

2004-01-20 Thread Chris Edwards
Thanks to all who responded, my ISP must have restarted my web server late
night, as this morning I'm now getting those old familiar error messages.


- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: Chris Edwards [EMAIL PROTECTED]
Cc: 
Sent: Monday, January 19, 2004 2:53 PM
Subject: Re: [PHP] Error Reporting help


 Chris Edwards wrote:
  but do I need to do something to
  get PHP to actually work off of these setting once they have been
changed,

 Restart your web server.

 -- 
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals  www.phparch.com

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


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



Re: [PHP] thumbnail

2004-01-20 Thread Chris Edwards
This works like a charm on JPG, haven't tried it on other files types. This
came from the www.php.net


function image_createThumb($src,$dest,$maxWidth,$maxHeight,$quality=100) {
   if (file_exists($src)   isset($dest)) {
   // path info
   $destInfo  = pathInfo($dest);

   // image src size
   $srcSize  = getImageSize($src);

   // image dest size $destSize[0] = width, $destSize[1] = height
   $srcRatio  = $srcSize[0]/$srcSize[1]; // width/height ratio
   $destRatio = $maxWidth/$maxHeight;
   if ($destRatio  $srcRatio) {
   $destSize[1] = $maxHeight;
   $destSize[0] = $maxHeight*$srcRatio;
   }
   else {
   $destSize[0] = $maxWidth;
   $destSize[1] = $maxWidth/$srcRatio;
   }

   // path rectification
   if ($destInfo['extension'] == gif) {
   $dest = substr_replace($dest, 'jpg', -3);
   }

   // true color image, with anti-aliasing
   $destImage = imageCreateTrueColor($destSize[0],$destSize[1]);

//CAE   imageAntiAlias($destImage,true);

   // src image
   switch ($srcSize[2]) {
   case 1: //GIF
   $srcImage = imageCreateFromGif($src);
   break;

   case 2: //JPEG
   $srcImage = imageCreateFromJpeg($src);
   break;

   case 3: //PNG
   $srcImage = imageCreateFromPng($src);
   break;

   default:
   return false;
   break;
   }

   // resampling
   imageCopyResampled($destImage, $srcImage, 0, 0, 0,
0,$destSize[0],$destSize[1],$srcSize[0],$srcSize[1]);

   // generating image
   switch ($srcSize[2]) {
   case 1:
   case 2:
   imageJpeg($destImage,$dest,$quality);
   break;

   case 3:
   imagePng($destImage,$dest);
   break;
   }
   return true;
   }
   else {
   return false;
   }
}
 Calling code

 if ($photosize = 102400 ) {
$blReduce = true;
 }
 // reduce the size of a file down to 720x720 pixels at 80% quality
 if ($blReduce) {
image_createThumb($src,$src,720,720,80);
 }

//Create a thumbnail were the maximum width or height is 100 pixels at
100% quality
// $src is the full path/filename of the large jpg file
   //$desc is the full path/filename of the thumbnail to be created
image_createThumb($src,$dest,100,100,100);




- Original Message - 
From: Matt Matijevich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 6:24 PM
Subject: Re: [PHP] thumbnail


 [snip]
 OK, but how? I already use GD, I need to now how to create a thumbnail,

 somebody now how to use the GD functions to create a thumbnail???
 [/snip]

 http://www.php.net/GD

 I think you want to look at:
 imagecopyresampled -- Copy and resize part of an image with resampling
 imagecopyresized -- Copy and resize part of an image

 or try this pear class  http://pear.php.net/package/Image_Transform
 like [EMAIL PROTECTED] suggested.

 -- 
 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] Error Reporting help

2004-01-19 Thread Chris Edwards
Thanks for all you replies, most of what you have suggested, I had already
tried, in vain, before joining the list.

I retried most of the combinations and still cannot get it to report syntax
errors. If I have errors, from say undefined variables, the error handler
catches those just fine.

Question: when I use the ini_set, does that stay set for the lifetime of the
script executing or is it set for good? The reason I ask, is I wonder if the
permissions on the 'Ini file is blocking me from modifying it.

All help is much appreciated.

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Monday 19 January 2004 07:30, Chris Edwards wrote:

  It's almost like it parses it before it tries to execute any lines and
if a
  syntax error occurs, it doesn't execute any of the script.

 That's right.

  The prior version would run up until the syntax error and then give you
the
  line if error, which usually meant the syntax error was on the previous
  line.

 I don't think any version of PHP has ever done that.

 More likely your prior version of PHP had display_errors enabled. In
general
 you can enable and display all errors using:

   error_reporting (E_ALL);
   ini_set('display_errors', 1);

 But if display_errors (in php.ini) is disabled then syntax errors will
not
 be displayed -- they can only be viewed in the error log.

 -- 
 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
 --
 /*
 Most people will listen to your unreasonable demands, if you'll consider
 their unacceptable offer.
 */

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



Re: [PHP] Error Reporting help

2004-01-19 Thread Chris Edwards
Here's a snippet from my  PHI_INI

;   - Show all errors
;
error_reporting  =  E_ALL
;error_reporting = E_ALL  ~E_NOTICE  ~E_WARNING  ~E_CORE_WARNING  
~E_USER_WARNING  ~E_USER_NOTICE  ~E_COMPILE_WARNING

display_errors = On

The commented out error_reporting was the original setting and
display_errors was Off

I changed them to the values you see above. When I execute my script and use
init_get() the values appear to be right, but do I need to do something to
get PHP to actually work off of these setting once they have been changed,
i.e. some kind of refresh

Thanks



Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Monday 19 January 2004 22:34, Chris Edwards wrote:

  I retried most of the combinations and still cannot get it to report
syntax
  errors. If I have errors, from say undefined variables, the error
handler
  catches those just fine.

 Again:

   But if display_errors (in php.ini) is disabled then syntax errors
will
 
  not
 
   be displayed -- they can only be viewed in the error log.

 IOW have a look at the output of phpinfo(), if display_errors is off,
then
 no matter what combinations you try you will NOT be able to see syntax
 errors!

  Question: when I use the ini_set, does that stay set for the lifetime of
  the script executing or is it set for good?

 Only during the execution of the script.

 -- 
 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
 --
 /*
 Wouldn't this be a great world if being insecure and desperate were a
turn-on?
 -- Broadcast News
 */

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



[PHP] Error Reporting help

2004-01-18 Thread Chris Edwards
My hosting company recently upgraded to PHP 4.3.0. Since doing this I no
longer get syntax type errors, from my typo's inside my PHP scripts. These
use to come up in my browser when that page was requested and the script
run.

I have spent hours going through the online help, trying to set a number of
the error reporting levels and parameters  but cannot get to where it will
report on a syntax error.

For example if I code

echo This is a syntax error because of the double quote start and the
single quote end ';

I just get a blank screen.

I have 14 pages of PHP settings printed out, so for any kind person that can
help, I can respond with their values quickly.

Thanks
Chris Edwards

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



Re: [PHP] Error Reporting help

2004-01-18 Thread Chris Edwards
Tried that, thanks, no joy.

It's almost like it parses it before it tries to execute any lines and if a
syntax error occurs, it doesn't execute any of the script.

The prior version would run up until the syntax error and then give you the
line if error, which usually meant the syntax error was on the previous
line.

Adam I Agnieszka Gasiorowski Fnord [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
 Chris Edwards wrote:

 [cut]

  For example if I code
 
  echo This is a syntax error because of the double quote start and the
  single quote end ';
 
  I just get a blank screen.
 
  I have 14 pages of PHP settings printed out, so for any kind person that
can
  help, I can respond with their values quickly.

 Try putting this at the beginning
  of your script:

  ini_set('display_errors', 1);

 -- 
 Seks, seksiæ, seksolatki... news:pl.soc.seks.moderowana
 http://hyperreal.info  { iWanToDie }   WiNoNa)   (
 http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
 Poznaj jej zwiewne kszta³ty... http://www.opera.com 007

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



[PHP] reading files through ssl protocal

2003-09-23 Thread Chris Edwards
Hi

Trying to read a file via ssl.  It seems to read the file ok.  The content
is correct.  But I get this when using the https protocol.

Warning: fgets(): SSL: fatal protocol error
or
Warning: fread(): SSL: fatal protocol error

When I use regular http, I do not get the warning.


Anyone observed this behaviour and fixed it?

Thanks.

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

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



[PHP] global array, can't assign values from variables

2003-09-05 Thread Chris Edwards
Hi

I'm just going to give the code and output.  It should be self explanatory.
The array, $criteria, is having the issue.  I don't know what it's doing.  I
cannot seem to assign the value from the $data variable to the
$criteria[index] value.  You will see some attempts to debug the situation
which leads me to more puzzlement.

CODE:

// run when cdata is found
function characterDataHandler($parser, $data)
  {
  switch( $GLOBALS['currentTag'] )
{
case MINSTARTDATE : echo $data;/*$GLOBALS['criteria']['minstartdate']
= $data;*/break;
case MAXSTARTDATE : $GLOBALS['criteria']['maxstartdate'] =
junk;/*$data;*/break;
case MINSTAY : $GLOBALS['criteria']['minstay'] = $data; break;
case MAXSTAY : $GLOBALS['criteria']['maxstay'] = $data; break;
case MINRENT : $GLOBALS['criteria']['minrent'] = $data; break;
case MAXRENT : $GLOBALS['criteria']['maxrent'] = $data; break;
case RENTINC : $GLOBALS['criteria']['rentinc'] = $data; break;
case MINBEDS : $GLOBALS['criteria']['minbeds'] = $data; break;
case MAXBEDS : $GLOBALS['criteria']['maxbeds'] = $data; break;
case PROPCOUNT : $GLOBALS['criteria']['propcount'] = $data; break;
default: break;
}
  }




echo pre\n;
print_r($criteria);
echo /pre\n;


OUTPUT:
9/6/2003
Array
(
[maxstartdate] = junk
[minstay] =

[maxstay] =

[minrent] =

[maxrent] =

[rentinc] =

[minbeds] =

[maxbeds] =

[propcount] =

)
Thanks.-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

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



Re: [PHP] global array, can't assign values from variables SOLVED

2003-09-05 Thread Chris Edwards
Hi

$data is not empty.  It's obvious from the :
  OUTPUT:
  9/6/2003

Anyways, it is overwriting itself because of begin and start tags.  I didn't
realize that.
Thanks.
-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: Chris Edwards [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 4:11 PM
Subject: Re: [PHP] global array, can't assign values from variables


 Chris Edwards wrote:

  I'm just going to give the code and output.  It should be self
explanatory.
  The array, $criteria, is having the issue.  I don't know what it's
doing.  I
  cannot seem to assign the value from the $data variable to the
  $criteria[index] value.  You will see some attempts to debug the
situation
  which leads me to more puzzlement.
 
  CODE:
 
  // run when cdata is found
  function characterDataHandler($parser, $data)
{
switch( $GLOBALS['currentTag'] )
  {
  case MINSTARTDATE : echo
$data;/*$GLOBALS['criteria']['minstartdate']
  = $data;*/break;
  case MAXSTARTDATE : $GLOBALS['criteria']['maxstartdate'] =
  junk;/*$data;*/break;
  case MINSTAY : $GLOBALS['criteria']['minstay'] = $data; break;
 [snip]
 
  echo pre\n;
  print_r($criteria);
  echo /pre\n;
 
 
  OUTPUT:
  9/6/2003
  Array
  (
  [maxstartdate] = junk
  [minstay] =
 [snip]


 $data is empty. How are you calling this function?

 -- 
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals  www.phparch.com

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


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



[PHP] a good read about posting to lists.

2003-08-10 Thread Chris Edwards
I know there is alot of heated debate.  Maybe this will help.

http://www.catb.org/~esr/faqs/smart-questions.html

I think a link to this document should be on the php mailing list sign-up
page.

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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



Re: [PHP] Determine memory used from script

2003-06-06 Thread Chris Edwards
If your using an array, how big is it, what's it's dimensions?
-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message - 
From: Shawn McKenzie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 8:45 AM
Subject: [PHP] Determine memory used from script


 Is there a way to determine the amount of memory that a script is
consuming
 at a certain point?  Maybe a function that would return this?

 The reason is, I get this:

 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
 allocate 46080 bytes) in
/home/httpd/vhosts/aaa/httpdocs/bbb/ccc/script.php
 on line 20

 I know why I get the error but would like to know when and why my script
is
 consuming so much.

 Thanks!
 Shawn



 -- 
 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] PHP Email Attachment problem

2003-04-03 Thread Chris Edwards
make sure your form tag has enctype=multipart/form-data in it

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message - 
From: Steve Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 8:00 AM
Subject: RE: [PHP] PHP Email Attachment problem


 I also had a similar problem and it was simply because the directory
 holding the attachment didn't have permission to send the attachment, so
 check the permissions on the directory. Once I changed it it sends fine.
 Cheers,
 Steve Jackson
 Web Developer
 Viola Systems Ltd.
 http://www.violasystems.com
 [EMAIL PROTECTED]
 Mobile +358 50 343 5159
 
 
 
 
 
  -Original Message-
  From: Jason Wong [mailto:[EMAIL PROTECTED] 
  Sent: 3. huhtikuuta 2003 8:23
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] PHP Email Attachment problem
  
  
  On Wednesday 02 April 2003 04:19, Michael Arena wrote:
   the only difference in the server setup is on my remote 
  server it's a 
   RAQ and locally i'm using Xitami with PHP. I don't 
  understand why it 
   won't send. I get the email over the RAQ but no attachment...
  
  Have you checked that the file actually gets uploaded?
  
   are there any other
   settings that could differ that I would need to set? Like in the 
   php.ini file?
  
  Have you enabled file_uploads in php.ini?
  
  -- 
  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
  
  --
  /*
  Our ISP is having {switching,routing,SMDS,frame relay} problems */
  
  
  -- 
  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] whats this!!!!

2003-04-01 Thread Chris Edwards
read: http://php.weblogs.com/

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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



[PHP] how to abort script execution at a certain point?

2003-03-07 Thread Chris Edwards
How would I abort a scripts execution at a certain point in the script.
Say, if stuff doesn't look good about halfway through execution, kill it.

I thought there was this function. abort()  but I don't see it in the
function reference.

Any ideas?  Thanks.

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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



Re: [PHP] PHP Project for a newbie (me) or for hire?

2003-02-28 Thread Chris Edwards
you should check out www.x-cart.com  its sweet.  another is
www.oscommerce.com

if  you need something for reference, www.php.net


--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message -
From: Dan Sabo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 28, 2003 3:16 PM
Subject: [PHP] PHP Project for a newbie (me) or for hire?


 Hi,

 I have a huge potential project and I'm fairly new to PHP.  I've been
 managing shopping carts for years for people, Miva Merchant, doing sites,
 etc., but would like to try my hand at a custom PHP cart if possible.  I
Was
 wondering if for the project requirements below ...

 a.)  Any PHP ready made scripts already exist for the something similar to
 the below requirements, for sale or free, that I could modify, customize,
 etc.  Something with a GUI admin page like PHPbb would be great.  Or

 b.) If any PHP coders reading this might be interested in quoting this
job,
 or

 c.)  Can anyone point me towards any books, sites, etc that would have a
how
 to, or sample scripts, snippets of code, etc geared towards the below
 project that I myself could use to do this project myself?



 What I'm looking for is a hotel reservation system, just for a small bed
and
 breakfast, six rooms.  It would enable a potential hotel guest to rent a
 room on either one or a consecutive block of dates.  Using a click able
 calendar tied to the payment system.  Once the renter is ready to pay via
 credit card, the code would generate a price and then go into a simple
 shopping cart where the customer can enter in his billing info and pay by
 credit card.

 Maybe the same customer could rent more than one room with the same date
 ranges, or on the same order rent different rooms for different dates, and
 date ranges, etc., with discounts available for quantity purchases of
either
 rooms, or extended date ranges, or both.  Also with the ability (for me)
to
 set discounts differently (in the code) depending on if a customer rents
 more than one room, or more than one day, and extra discounts for renting
 multiple rooms only, multiple days only, and also additional discounts for
 renting both multiple rooms and multiple days, like for a convention.
With
 ability to set my own discounts in various ways, i e depending on length
of
 stay, number of rooms rented, number of days, etc etc, etc.

 I'd like it so that a customer could place a deposit on a room or group of
 rooms for the reservation, with the administrator (me) able to set the
 required deposit depending on what the price range is for the reservation,
i
 e, a percentage of the purchase price of the total order.  This option is
 not absolutely necessary but it would be a very nice feature.

 I need a service fee for cancellations, with variable cancellation fees
 settable by me, which depend on both the closeness of the reserved date to
 the cancellation and the amount of the sale, independently.  The
 cancellation would be automatic, so that if a customer cancels a
 reservation, they are auto refunded on their CC either their deposit or
paid
 in full price, minus a pre cancellation fee which is variable, with the
 ability to set that cancellation fee depending on the total sale price.

 Is this do able by a newbie with lots of gumption and the right books,
 snippets?  I already have Wellings PHP and MySQL web Development and
 Professional PHP 4 Wrox.  I read on another forum that there is a book
 written for Dreamweaver MX and a sample project is a hotel reservation
 system in PHP, but I use Go Live 6 and don't want to waste the money on
that
 one.

 Thanks.


 --
 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] good database design tool?

2003-02-28 Thread Chris Edwards
Hi

Anyone have any suggestions on a good and cheap database design tool.  I'm
looking at something that has the features of MS Visio but thats way
cheaper.  I want it to be able to help me build entity-relationship diagrams
and stuff.

Thanks.
--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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



Re: [PHP] array question

2003-02-24 Thread Chris Edwards
try something like this:

$groups= file(group);
$number_in_group = count($groups);

for( $i = 0; $i  $number_in_group; $i++)
  {
  $temp = explode(:,$groups[$i]);
  $group[$i]['pass'] = $temp[1];
  $group[$i]['id'] = $temp[2];
  $group[$i]['list'] = $temp[3];
  }


for( $i = 0; $i  count( $group ); $i++)
  {
  echo site . $i . : . $group[$i]['pass'] . : . $group[$i]['id'] .
:;
  $temp = explode( ,, $group[$i]['list'] )
  foreach ($temp as $k = $v)
echo $v;
  }

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message -
From: Richard Kurth [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 3:23 PM
Subject: [PHP] array question


 This is the code I am using to get the data out of the text file
 below. Now I need to turn the $group[3] into an array of its own so
 that I can make changes to it. How do I turn this into an array that
 I can reference with $group[0]. What I need to be able to do is
 search for the label in $group[0] and then make changes to the stuff
 in $group[3] like delete add or change.

 ?
 $groups= file(group);
 $number_in_group = count($groups);
 ?
 table border=1
 ?
 for ($i=0; $i$number_in_group; $i++){
 $group=explode(:,$groups[$i]);
 ?
 tr
 td? echo$group[0]?/td
 td? echo$group[3]?/td
 /tr
 ?}?
 /table


 The DATA

 site1:x:503:tester1
 site2:x:504:tester2,tester2a
 site3:x:505:tester3,tester3a,tester3b
 site4:x:506:tester4
 site5:x:507:tester5,tester5a,tester5b
 site6:x:508:tester6
 site7:x:509:tester7,tester7a,tester7b



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

2002-12-03 Thread Chris Edwards

Anyone having/had stability and performance problems running Apache 1.3 on
Windows 2000 Server?

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] IIS 5

2002-12-02 Thread Chris Edwards
I'm getting You are not authorized to view this page when trying to run
.php files.  How do I fix this?  I'm running php isapi on iis 5 on w2k
server.

thanks.

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] running php on apache 2 on windows??

2002-11-21 Thread Chris Edwards
Anyone got it working?

I'm getting this:
C:\Program Files\Apache Group\Apache2\binApache.exe
Syntax error on line 183 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Cannot load C:/php/sapi/php4apache2.dll into server: The specified procedure
could not be found.

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] PHP SAPI modules

2002-11-19 Thread Chris Edwards
Does anyone know if the PHP SAPI modules are better in the newer releases?
Are they currently stable enough for production websites?

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] isapi mod on iis

2002-11-19 Thread Chris Edwards
is anyone running the isapi mod on iis?  why does it ask for authenitcation
when I run a script?

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] speed comparison

2002-11-18 Thread Chris Edwards
Which would run faster and generate less load on the server, or does it
matter:

?php

$output = 
table
...
...html

 $name $phone ...
;

echo $output;
?

--  OR -

table
...
...
?php echo $name ? ... ?php echo $phone ?
..
/table

I find it sucks to try and put all the php tags around stuff, so I just
include it all.

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] stores / ecommerce

2002-07-22 Thread Chris Edwards

What are some good e-commerce stores written out there for PHP and mySQL??



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