[PHP] test for ascii or binary string

2002-11-29 Thread Jonathan Sharp
Is there a way to determine if a string has ascii or binary data in it?

-js


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




[PHP] Re: test for ascii or binary string

2002-11-29 Thread Jonathan Sharp
Doh, so simple. I guess the correct form of the question would be how do
I determine if a string has just a-zA-Z0-9 in it plus punctuation...

thanks,
-js


Paul Chvostek wrote:
> On Fri, Nov 29, 2002 at 10:27:05PM -0600, Jonathan Sharp wrote:
> 
>>Is there a way to determine if a string has ascii or binary data in it?
> 
> 
> You could always see if it matches a regular expression that represents
> the ascii range you're considering.  I.e., ereg('[^a-zA-Z0-9]',$string)
> will return true if non-alphanumerics are in the string.
> 
> Remember that a string is just a string.  Whether the data contained in
> it is represented as ASCII or something else is completely a matter of
> implementation.  ALL 7-bit data can be represented as ASCII.  All 8-bit
> data can be represented as "IBM Extended ASCII" or whatever you want to
> call it.  But the string is just a string of bits.
> 




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




RE: [PHP] Passing arguments to the same script

2002-12-01 Thread Jonathan Sharp
I think you\'d want to use:
if ( $_SERVER[\'QUERY_STRING\'] == \'samples\')
{
// code
}

otherwise if you use , set your links as:


-js


On Sun, 1 Dec 2002 22:38:54 -0500 Holmes wrote:
> 
> 
> > I\'m sure this is easy, but I\'m drawing a blank.  I need to have links
> at
> > the
> > bottom of the page that passes arguments to the same script (itself)
> when
> > it
> > gets reloaded.  How do we do this?
> > 
> > I have the links like this now:
> > 
> > 
> > 
> > How do I determine what is passed?  I need to do an \"if\" statement
> with
> > different outputs depending on the argument.
> > 
> > if ($samples) { do something }
> 
> if(isset($_GET[\'samples\']))
> { do something }
> 
> ---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




RE: [PHP] Passing arguments to the same script

2002-12-01 Thread Jonathan Sharp
I think you\'d want to use:
if ( $_SERVER[\'QUERY_STRING\'] == \'samples\')
{
// code
}

otherwise if you use , set your links as:


-js


On Sun, 1 Dec 2002 22:38:54 -0500 Holmes wrote:
> 
> 
> > I\'m sure this is easy, but I\'m drawing a blank.  I need to have links
> at
> > the
> > bottom of the page that passes arguments to the same script (itself)
> when
> > it
> > gets reloaded.  How do we do this?
> > 
> > I have the links like this now:
> > 
> > 
> > 
> > How do I determine what is passed?  I need to do an \"if\" statement
> with
> > different outputs depending on the argument.
> > 
> > if ($samples) { do something }
> 
> if(isset($_GET[\'samples\']))
> { do something }
> 
> ---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




Re: [PHP] Who can tell me the best php-base webmail?

2002-12-02 Thread Jonathan Sharp
also take a look at hord-imap (http://www.hord.org)

-js


On Mon, 2 Dec 2002 14:06:01 +0100 [EMAIL PROTECTED] wrote:
> Le Lundi 2 D¨¦cembre 2002 13:30, [EMAIL PROTECTED] a ¨¦crit :
> 
> > Who can tell me the best php-base webmail?
> > I want a webmail for my mail server,
> > give me a suggest, please!
> >Joskey Liaus
> >[EMAIL PROTECTED]
> 
> This is a hard question to answer ;-)
> I use SquirrelMail (http://www.squirrelmail.org/), Which is quite good...
> IlohaMaim (http://ilohamail.org/) Looks quite fine, too.
> Have you tried IMP ?
> 
> -- 
>,,
>   ( ¡ã>  Nicolas Costes
>   /||\IUT de La Roche / Yon
>  ( ^ )   [EMAIL PROTECTED]
>   ^ ^http://luxregina.free.fr
> 
> -- 
> 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 send an MSWORD email?

2002-12-15 Thread Jonathan Sharp
search google for RFC HTML email, or look at phpmailer.sourceforge.net. 

It's roughly along the lines of: 


Subject: My html email
Content-type: multipart/mime
Content-boundry(): BOUNDRY-ABC

---BOUNDRY-ABC---
Content-type: text/html
...more headers...

Hello! This is an html email with an image -> cid:abc123";>


---BOUNDRY-ABC---
Content-type: image/jpeg
Content-id: abc123
Content-encoding: base64

BKJSDFIWEIJELFJSELIFJEL


On Sun, 15 Dec 2002 14:35:48 -0800 (PST) Chris Shiflett wrote:
> --- See Kok Boon <[EMAIL PROTECTED]> wrote:
> > I want to send emails that have graphics, for example
> > the pub logo. I know that there are 2 ways to do so
> > (maybe there are more, pls enlighten me):
> > 
> > 1. use html email with
> >http://www.mydomain.com/logo.gif";>
> > 
> > 2. use MSWORD to insert the logo into the email.
> >MSWORD will then send the logo.gif as an
> >attachment and will ALSO use  tags.
> 
> I doubt anyone on this list is going to know what your
> second method is, though I would guess that MS Word does
> nothing special and does the same thing you mention in your
> first method, except that it attaches the image to the
> email rather than reference it via URL.
> 
> You can probably search the archives for more information
> on sending HTML email as well as sending attachments, which
> is all you are trying to do. I detest such email myself, so
> I cannot offer any help.
> 
> Chris
> 
> -- 
> 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] Executing a Perl/CGI program from PHP

2002-12-15 Thread Jonathan Sharp
You're trying to mix two different things. SSI (Server Side Includes) and PHP. 

The page you're calling gets parsed ONLY by PHP. So echoing #exec won't work.

Look at the virtual() function ~~> http://php.net/virtual

-js


On Sun, 15 Dec 2002 14:10:17 -0800 Troy May wrote:
> Hello,
> 
> I have a logging program I wrote in Perl that writes basic info to a MySQL
> database.  I can't get it working from within PHP.  I've tried:
> 
> print "";
> echo ("");
> include("vislog.cgi");
> 
> Nothing works. What am I missing?
> 
> Thanks,
> Troy
> 
> 
> -- 
> 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] creating objects by reference?

2002-12-18 Thread Jonathan Sharp
Is it better to do:
$obj = &new object();

verses:
$obj = new object();

thanks,
-js



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




Re: [PHP] Multi-Dimensional Arrays

2002-10-09 Thread Jonathan Sharp

try doing this for each item:

$cartArray[] = array('itemnumber' => $itemnumber, 'brand' => $brand, 
'quantity' => $itemqty, 'name' => $itemname);

-js

Jonathan Duncan wrote:
> I am trying to create an array to hold shopping cart information.  The array
> I am using is called "cartArray".  What I want to do is to define a
> sub-array of cartArray with the information from one product.  Then the next
> time a product is added it appends then new information as a second
> sub-array to cartArray and so forth.  Following is some code I have been
> using to test with and so far PHP will let me use ".=" to append but when I
> try to call it back with "print_r" or echo array[][] only the first entry is
> returned.  Any ideas what I am doing wrong?
> 
> 
>  $brand="Brand1";
>  $itemnumber="456789";
>  $itemname="Some Item Name";
>  $itemqty=3;
>  $cartArray[] .= array(0=>array($itemnumber=>"$brand", "$itemqty",
> "$itemname"));
>  print_r($cartArray)."";
>  $brand="Brand2";
>  $itemnumber="123456";
>  $itemname="Another Item Name";
>  $itemqty=9;
>  array_push($cartArray, array($itemnumber=>"$brand", "$itemqty",
> "$itemname"));
>  print_r($cartArray)."";
>  echo $cartArray[0][0]."";
> 
> 
> Thank you,
> Jonathan Duncan
> 
> 
> 




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




Re: [PHP] Session problem

2002-10-15 Thread Jonathan Sharp

Sorry... session.cookie_domain in php.ini

Make sure you can also write to /tmp

-js


Ferhat Can wrote:
>  Dear All,
> I have a problem and need your help. I use PHP 4.2.3, Apache 1.3.27 and
> a local version of Red Hat. Here is the problem: I have a web site that
> depends on Session, but the Session ID seems to be regnerated evertime I
> refresh the page. I have tried different versions of PHP with different
> versions of Apache but the problem remained. I am giving some links on
> my server showing my system variables, and the session example given in
> the manual. Here is the link:
> http://linuxserver.pergelcrm.com/system.php
>  
> Thanks in advance for your help. 
>  
> Ferhat Can
> 




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




Re: [PHP] Session problem

2002-10-15 Thread Jonathan Sharp

Try setting the session.domain in your php.ini...

-js


Ferhat Can wrote:
>  Dear All,
> I have a problem and need your help. I use PHP 4.2.3, Apache 1.3.27 and
> a local version of Red Hat. Here is the problem: I have a web site that
> depends on Session, but the Session ID seems to be regnerated evertime I
> refresh the page. I have tried different versions of PHP with different
> versions of Apache but the problem remained. I am giving some links on
> my server showing my system variables, and the session example given in
> the manual. Here is the link:
> http://linuxserver.pergelcrm.com/system.php
>  
> Thanks in advance for your help. 
>  
> Ferhat Can
> 




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




Re: [PHP] Session problem

2002-10-15 Thread Jonathan Sharp

I believe it's a cookie issue, as when I hard code in an active session:
http://linuxserver.pergelcrm.com/count.php?PHPSESSID=7bf48f99e86e2d3d401c57c4f39dabbc
it counts correctly.

Oops! Try this...
session.cookie_domain=linuxserver.pergelcrm.com
NOT www.cardiologicforum.com

Cheers,
-js


Ferhat Can wrote:
>Thank you for replying Jonathan,
> I set the session.cookie_domain in php.ini but it didn't work. I have
> too many session files in my /tmp directory. Everytime I refresh the page a
> new session file is created unfortunately.
> Ferhat Can
> 
> - Original Message -
> From: "Jonathan Sharp" <[EMAIL PROTECTED]>
> To: "Ferhat Can" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 15, 2002 6:55 PM
> Subject: Re: [PHP] Session problem
> 
> 
> 
>>Sorry... session.cookie_domain in php.ini
>>
>>Make sure you can also write to /tmp
>>
>>-js
>>
>>
>>Ferhat Can wrote:
>>
>>> Dear All,
>>>I have a problem and need your help. I use PHP 4.2.3, Apache 1.3.27 and
>>>a local version of Red Hat. Here is the problem: I have a web site that
>>>depends on Session, but the Session ID seems to be regnerated evertime I
>>>refresh the page. I have tried different versions of PHP with different
>>>versions of Apache but the problem remained. I am giving some links on
>>>my server showing my system variables, and the session example given in
>>>the manual. Here is the link:
>>>http://linuxserver.pergelcrm.com/system.php
>>><http://linuxserver.pergelcrm.com/system.php>
>>>Thanks in advance for your help.
>>>
>>>Ferhat Can
>>>
>>
>>
> 




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




Re: [PHP] how to user

2002-10-15 Thread Jonathan Sharp

If I remember correctly, you must set the name field with [] to make it 
an array.
Example:


then $foo is an array of the selections.

-js


Khalid El-Kary wrote:
> hi,
> If i have a form that has a  with multiple="ture" how would i be 
> able to retireve it's multiple values in the PHP script, i tried the 
> $_REQUEST['fieldname'] it gave me only the last selected value
> 
> note: multiple selection is done by holding ctrl :)
> 
> khalid
> 
> 
> 
> _
> Unlimited Internet access -- and 2 months free!  Try MSN. 
> http://resourcecenter.msn.com/access/plans/2monthsfree.asp
> 
> 




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




[PHP] Sessions: Trigger a new one, Expire an old one

2002-10-15 Thread Jonathan Sharp

"Simple" question. If a users session expires or has timed out, how do I 
'force' php to generate a new sessionId?

I wrote a handler that stores sessions into a mysql table, and am able 
to test if it has expired or not. But how do I get php to start a new one?

-js


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




Re: [PHP] Sessions: Trigger a new one, Expire an old one

2002-10-15 Thread Jonathan Sharp

Ok, here is my solution:

I wanted this to be as self contained as possible:

function clean()
{
/* get name of session & find session id */
$name = ini_get('session.name');
$sessid = ( !$_COOKIE[$name] ?
 ( !$_GET[$name] ?
 ( !$_POST[$name] ? false :  $_POST[$name] ) :
 $_GET[$name] ) :
 $_COOKIE[$name] );

/* run query now to see if sesion is expired, if yes */
unset( $_COOKIE[$name] );
unset( $_GET[$name] );
unset( $_POST[$name] );
unset( $_REQUEST[$name] );
}


clean();
session_start();

Since _COOKIE/etc needs to be UNSET before session_start is called and 
re-calling session_start does sqat, the above code (not all of it but 
general idea) 'finds' the session id (session_id() has no effect until 
session_start is called) and tests to see if it's expired, if so, it 
'kills' all possible locations for session_start() to find an id.

*simple*... (or something like that)

-js


Chris Shiflett wrote:
> Yeah, John hinted at the answer there.
> 
> You just need to make the session ID go away prior to starting the 
> session . Just unset it or set it to the empty string or whatever you 
> want to do.
> 
> It is probably either $_COOKIE["PHPSESSID"] or $_GET["PHPSESSID"].
> 
> Chris
> 
> John W. Holmes wrote:
> 
>>> "Simple" question. If a users session expires or has timed out, how do
>>>   
>>> I 'force' php to generate a new sessionId?
>>>   
>>
>> Session_start() ??
>>
>> If there isn't a session id present, it'll create one.
>>
>> ---John Holmes...
>>
> 
> 




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




Re: [PHP] Sessions: Trigger a new one, Expire an old one

2002-10-16 Thread Jonathan Sharp

Your example for the cookie session works, but I wanted to keep sessions 
'transparent' and not have to manage sessions.

The code I wrote basically finds the session id wherever it might be, 
checks if it's expired, if so, it then removes all traces of the session 
id to make session_start() think that there is not already a session...

-js


Max Buvry wrote:
> Hi,
> 
> I use php 4.2.3 with session.auto_start = 1 in php.ini
> 
> 
> What I use with URL session :
> 
>   $_SESSION= array();
>   unset($_GET[session_name()]);
>   session_destroy();
>   Header("Location: next_script.php");
> 
> with cookie session :
> 
>$cook_param= session_get_cookie_params();
>$life_time= $cook_param['lifetime'];
>$path= $cook_param['path'];
>setcookie(session_name(),"",$life_time,$path);
>$_SESSION= array(); 
>session_destroy();
> 
> mb
> 
> 
> 
> Jonathan Sharp wrote:
> 
>>Ok, here is my solution:
>>
>>I wanted this to be as self contained as possible:
>>
>>function clean()
>>{
>>/* get name of session & find session id */
>>$name = ini_get('session.name');
>>$sessid = ( !$_COOKIE[$name] ?
>> ( !$_GET[$name] ?
>> ( !$_POST[$name] ? false :  $_POST[$name] ) :
>> $_GET[$name] ) :
>> $_COOKIE[$name] );
>>
>>/* run query now to see if sesion is expired, if yes */
>>unset( $_COOKIE[$name] );
>>unset( $_GET[$name] );
>>unset( $_POST[$name] );
>>unset( $_REQUEST[$name] );
>>}
>>
>>clean();
>>session_start();
>>
>>Since _COOKIE/etc needs to be UNSET before session_start is called and
>>re-calling session_start does sqat, the above code (not all of it but
>>general idea) 'finds' the session id (session_id() has no effect until
>>session_start is called) and tests to see if it's expired, if so, it
>>'kills' all possible locations for session_start() to find an id.
>>
>>*simple*... (or something like that)
>>
>>-js
>>
>>Chris Shiflett wrote:
>>
>>>Yeah, John hinted at the answer there.
>>>
>>>You just need to make the session ID go away prior to starting the
>>>session . Just unset it or set it to the empty string or whatever you
>>>want to do.
>>>
>>>It is probably either $_COOKIE["PHPSESSID"] or $_GET["PHPSESSID"].
>>>
>>>Chris
>>>
>>>John W. Holmes wrote:
>>>
>>>
>>>>>"Simple" question. If a users session expires or has timed out, how do
>>>>>
>>>>>I 'force' php to generate a new sessionId?
>>>>>
>>>>
>>>>Session_start() ??
>>>>
>>>>If there isn't a session id present, it'll create one.
>>>>
>>>>---John Holmes...
>>>>
>>>
>>>
> 




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




Re: [PHP] browser back-button problem

2002-10-16 Thread Jonathan Sharp

Take an md5 of the entire file contents and store that in your form that 
get's displayed. Then test if it matches the file when you go to make 
the changes. Every time you change the file the md5 will change. See 
below...

-js

Sample script:





 

marcel wrote:
> hi there
> I am kind of a newbie to php
> so probably I am doing it all the wrong way - if - please tell me
> 
> ok heres my problem:
> the script:
> I have  a user-group-administration script (php4), that loads data from
> a textfile and then eables the admin to delete or create new user-passwords.
> the script retreives the text data from the text-file and displays the
> entrys.
> to every entry there is a delete-button, that sends the number of the entry.
> and there are formfields and a new-button that sends the new data.
> the script that is called is the same script as the one that does the
> displaying,
> e.g. depending on the sent variables the script delets or creates an entry
> then displays the new data.
> 
> the problem:
> if someone uses the back-button of his browser, the data is transferred
> again ( at
> the moment I do it with POST out of the form), and the actions are executed
> again.
> e.g. when the user created a new entry, verytime he hits the back-button
> will create
> a new - similar - entry.
> 
> How can I prevent this?
> I saw several forms, that displayed this: "form is expired" thing, if you
> used the back-button (?).
> 
> 
> thanks a lot
> marcel
> 
> 
> 




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




Re: [PHP] Perl -> PHP question

2002-10-24 Thread Jonathan Sharp
You either need to:
1) Set multiple cookies for each index:
setCookie('session[foo]'...)
setCookie('session[bar]'...)

2) Serialize/unserialize your array.

setCookie('session', serialize($session_array) );

$session = unserialize($_COOKIE['session']);

-js


Tom Woody wrote:

Did a google and archive search but I couldn't find anything related...

I am migrating a bunch of perl CGI apps to PHP.
In one of the perl pages a cookie is set and the value of the cookie is
a perl hash.  I am trying to duplicate that cookie in PHP to make my
life 100 times easier.

In perl:
  use CGI::Cookie;
  $session{value1} = "something";
  $session{value2} = "else";
  CGI::Cookie(-name=>'session',-value=>%session);

In another perl script: 
  use CGI;
  $query = CGI->new();
  %session = $query->cookie(-name=>'session');
  print "value1: $session{value1}\n";
  print "value2: $session{value2}\n";

Output:
value1: something
value2: else

To try and duplicate this in PHP, I first examined the data in the
cookie that was set by perl:
value1&something&value2&else

So when I set the cookie in php I did:
setcookie('session','value1&something&value2&else');

Obviously this doesn't work...
%session just results in a single value of
"value1&something&value2&else" rather than a hash.

I also tried using Associative Arrays as they are the closest to the
Perl Hash that I could find.
$session[value1] = "something";
$session[value2] = "else";
setcookie('session',$session);
The cookie then has the value "Array"
  
Any suggestions...ideally I don't want to have to change anything in
the perl scripts, I just want to retire them as PHP replacements are
completed.  The page that sets the cookie is the first page (obviously)
and so would take the pressure off getting the other pages done in PHP.





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




Re: [PHP] Form element names starting with the "+" character????

2002-10-27 Thread Jonathan Sharp
Dan Tappin wrote:

I have a simple method of creating easy form processing I thought

I came up with the idea (I am not claiming to be the first) to have form
elements I want to update via MySQL starting with either "-" or "+".

Example:

+name=DAN
[EMAIL PROTECTED]
-notes=
id=1

The first 2 are required and will be updated, the 3rd is optional and will
be updated and the 4th (id) is simply passed as form data.

The idea here is that I parse the $_POST variable 

This would be a BIG secuirty issue...as the input is 'tainted' until 
otherwise proven safe. If you want to do this approach as you go through 
each POST var, make sure you have a list of valid fields for the table 
and make sure the field you're setting from POST actually IS a field in 
the table.

I see what you're trying to do, I've done something somewhat similar and 
it doesn't require a + or -.

I wrote a db class which builds my queries for me. Example snippit:

/* -- db.conf -- (table definitions) */
dbNewConn('conn', 'user:password@host');
dbNewDb('database', 'conn');
dbNewTable('my_table', 'database.table_name');

/* -- My script.php -- */
$d = array( 'name' => $_POST['name'],
'email' => $_POST['email']);

dbUpdate('my_table', $d, "id='{$_POST['id']}'");


As dbUpdate gets executed, if the connection isn't up, it connects to 
the db server, next if it doesn't have a list of fields for the table it 
lists the fields and 'caches' them during the script execution. And 
finally it builds the query string. The resulting query is:

UPDATE database.table_name SET `name`='The Name', 
`email`='[EMAIL PROTECTED]' WHERE id=1;

It handles all escaping, mysql functions etc. (so I could do: 'name' => 
'PASSWORD('.$_POST['name'].')' and it would be escaped propperly). This 
code is running in a production application and have no had any 
performance problems.

-js


to auto create a "UPDATE
table SET name = 'Dan', email = '[EMAIL PROTECTED]' WHERE = 1" string for
MySQL.

The issue is that if I use the "+" to indicate a required field for error
trapping my $_POST array ends up like this:

+namD=AN
[EMAIL PROTECTED]
-notes=
id=1

Either this is a PHP / HTTP bug or I am up against some strange post naming
restriction.  I searched the web, the PHP site (includeing the bugs) and
could not spot an obvious reference.

Any ideas out there?

Dan







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




Re: [PHP] Form element names starting with the "+" character????

2002-10-27 Thread Jonathan Sharp
John W. Holmes wrote:

I wrote a db class which builds my queries for me. Example snippit:

/* -- db.conf -- (table definitions) */
dbNewConn('conn', 'user:password@host');
dbNewDb('database', 'conn');
dbNewTable('my_table', 'database.table_name');

/* -- My script.php -- */
$d = array( 'name' => $_POST['name'],
'email' => $_POST['email']);

dbUpdate('my_table', $d, "id='{$_POST['id']}'");



How do you differentiate between string updates and integer/float
updates? Or do you just put quotes around the numbers, too?


On the 'input' side I use is_numeric() to test if the data is numeric. 
But I haven't considered testing the field type itself. It's easy enough 
to add. This hasn't come up yet in any of our development.


As dbUpdate gets executed, if the connection isn't up, it connects to
the db server, next if it doesn't have a list of fields for the table


it


lists the fields and 'caches' them during the script execution. And
finally it builds the query string. The resulting query is:

UPDATE database.table_name SET `name`='The Name',
`email`='[EMAIL PROTECTED]' WHERE id=1;



Wouldn't the 1 have quotes around it?


Yes it would, that was my typo... it should be id='1' but id I'm going 
to assume is an int auto_increment, so the correct where clause should 
be "id={$_POST['id']}"


It handles all escaping, mysql functions etc. (so I could do: 'name'


=>


'PASSWORD('.$_POST['name'].')' and it would be escaped propperly).


This


code is running in a production application and have no had any
performance problems.



How would you escape that? The contents of the PASSWORD function needs
to be surrounded by quotes (unless you're passing a column).


There's a "private" function which escapes all data and tests for the 
function etc.

In the example data below: "PASSOWRD('O'mallery')" it would do:

1) Determine if it is a function:
Substr up to first '(' and see if the strtoupper of it is in_array() 
which has all of the mysql functions.
2) Since it know's it's a function, it then takes the next char after 
the '(' and if it's either a ' or " it does the next step.
3) Takes first part "PASSWORD(" and then the data portion "O'mallery" 
and replaces quote with \quote in data. (This takes into account if you 
passed the string 'PASSWORD("O'Mallery")' it would not escape the '.) 
Next it rebuilds the string "PASSWORD($DATA)"

Here is the code:
function dbPrepValue($value)
{
global $_DB_;

if ( is_numeric($value) )
{
return $value;
}
else
{
$tmp = strtoupper($value);
if ( 0 < ($t = strpos($tmp, '(') ) )
{
$tmp = substr($tmp, 0, ($t - 1) );
}

if ( in_array( $tmp, $_DB_['mysqlFunc'] ) )
{
$q = substr($tmp, ($t + 1), 1);
if ( $q == "'" || $q == '"' )
{
$func   = substr($value, 0, $t);
$data   = substr($value, ($t + 1), -2);
$value  = "{$func}{$q}" . str_replace($q, "\{$q}", 
$data) . "{$q})";
}

return $value;
}
else
{
return "'{$value}'";
}
}
}

While this code does not take into account EVERY valid query statement, 
for those conditions you can just pass a raw query to dbQuery(). I'll 
post a link to the class sometime this week.

-js


So you'd need

'name' => "PASSWORD('" . $_POST['name'] . "')"

wouldn't you? So if the name is "O'mallery" you'd end up with

'name' => "PASSWORD('O'mallery')"

How do you escape that without also escaping the quotes that delimit the
string?

---John Holmes...








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




Re: [PHP] Need a better way...

2002-10-27 Thread Jonathan Sharp
function mysql_to_date($mysql)
{
return ( $mysql ? date('m/d/Y', strtotime($mysql) ) : '' );
}

-js


Todd Cary wrote:

My coding is not very concise and I would appreciate suggestions on how 
to clean this up even though it works:

 /* MySQL to date */
 function mysql_to_date($mysql) {
   $retval = "";
   if ($mysql) {
 $parts = explode("-", $mysql);
 $mo = $parts[1];
 $dy = $parts[2];
 $yr = $parts[0];
 $parts = explode(" ", $dy);
 $dy = $parts[0];
 $retval = $mo . "/" . $dy . "/" .  $yr;
   } else {
 $retval = "";
   }
   return $retval;
 }





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




Re: [PHP] Getting server load?

2002-10-27 Thread Jonathan Sharp
assuming linux and 'server load' to equal 'entire server[read computer] 
load' try 'uptime' and look at last three #'s try man uptime for more 
details

-js


Leif K-Brooks wrote:
I know there's a way to check the current server load... does anyone 
know how?  Thanks.





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




Re: [PHP] newbie: apache prob...

2002-10-28 Thread Jonathan Sharp
Check what user apache is running under (usually nobody) in which case 
you have to give it world read access (chmod 0755) or make apache run 
under that user. (second method is perferred). I'm assuming you're 
running linux.

-js


Mr. BuNgL3 wrote:
Hi...
I have a little problem... when i do //localhost/ on the browser i don't get
nothing it gives me "Forbidden - u don't have permission to access"... but i
was the one that installed the apache server!! do u know what's the problem?
Thanks








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




Re: [PHP] Secure Connection

2002-10-29 Thread Jonathan Sharp
This really has little to do with php. Use SSL for the connection
(search on your favorite search engine).

If you're asking about storage methods of the sensative information,
www.php.net/crypt will answer that question.

-js


Pushpinder Singh Garcha wrote:
> Hi,
> 
> I am making a secure page where users will be able to send credit card
> information.
> What kind of support does php offer?
> 
> Thanks
> Pushpinder Singh Garcha
> 
> 




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




Re: [PHP] Secure Connection

2002-10-29 Thread Jonathan Sharp
Jonathan Sharp wrote:
> This really has little to do with php. Use SSL for the connection
> (search on your favorite search engine).
> 
> If you're asking about storage methods of the sensative information,
> www.php.net/crypt will answer that question.

Correction: try www.php.net/mcrypt

-js


> 
> -js
> 
> 
> Pushpinder Singh Garcha wrote:
> 
>>Hi,
>>
>>I am making a secure page where users will be able to send credit card
>>information.
>>What kind of support does php offer?
>>
>>Thanks
>>Pushpinder Singh Garcha
>>
>>
> 
> 
> 
> 
> 




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




Re: [PHP] system() function

2002-10-29 Thread Jonathan Sharp
E... try COM maybe...

-js


Don Hicks wrote:
> Hello,
> 
> I'm running php on a Win2000 server.
> 
> I also have an MS Access 97 database on the server.
> 
> I want to tell the database to execute a macro on an "as needed" basis by
> running a php system() function, but I'm having difficulty making the action
> happen.
> 
> I suspect it's my coding.
> 
> I'm currently putting the following into my php:
> 
> system("C:\Program Files\Microsoft Office\Office\MSACCESS.EXE
> C:\Inetpub\wwwroot\DATABASENAME.mdb /x MACRONAME")
> 
> The server shows that MS Access is running a process, but it never finishes
> (seems to hang up).
> 
> Does anyone have advice for me?
> 
> Don Hicks
> 
> 
> 




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




Re: [PHP] ODBC connectivity

2002-10-29 Thread Jonathan Sharp
First test that you can connect to the db server outside of php through
 an odbc connection...then come back if that doesn't work.

-js


Bill Hudspeth wrote:
> I have developed a PHP application that accesses a Microsoft Access database
> through ODBC. The application works well using PHP version 4.1. I have
> recently installed the newest version of PHP (4.2.3) on another machine
> running NT4, and IIS 4.
> Again, I am using an ODBC connection, and have given this connection the
> same name, login, and password as is present in my PHP files. While the PHP
> module is running fine, I cannot retrieve records from the database,
> probably indicating a problem with my connectivity to the ODBC. Again, I
> have made the same settings in the new ODBC entry as is present on the
> development machine. Could there be a version problem with the PHP module?
> Any other suggestions would be greatly appreciated.
> 
> Thanks, Bill
> 
> 
> 




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




Re: [PHP] session vs. header

2002-10-30 Thread Jonathan Sharp
huge junk mail wrote:
> Can someone tell me why I can't have
> 
> $_SESSION['foo'] = 'content of foo';
> 
> following by
> 
> header('Location: http://www.mysite.com');
> 
> Someone from www.php.net told me that it can confuse
> browser (http://bugs.php.net/19991). But, still I
> can't the idea why it can happen. Does register
> session means sending a 'header: location' too?

no, sessions never send location headers, they may send cookies but not
location.

-js


> 
> Thanks.
> 
> =
> Regards,
> 
> mahara
> 
> __
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/
> 




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




Re: [PHP] [Fwd: Problem about pear]

2002-10-30 Thread Jonathan Sharp
try:
'locate PEAR' if it doesn't show up do 'updatedb' then 'locate PEAR'

mine is /usr/lib/php/PEAR (Gentoo)

-js


[EMAIL PROTECTED] wrote:
> 
> 
> 
> Subject:
> Problem about pear
> From:
> [EMAIL PROTECTED]
> Date:
> Thu, 31 Oct 2002 02:02:45 +0800
> To:
> [EMAIL PROTECTED]
> 
> 
> Hello,
> 
> My System is Redhat Linux 7.2...
> I can't to find where is the path of pear under the system...
> So, can you help me ?
> 
> Thank a lots.
> 
> Edward.
> 
> 
> 
> 
> 
> 
> 




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




Re: [PHP] parse error

2002-10-30 Thread Jonathan Sharp
try:
$fp = fopen('temp/'.$userfile_name[($i-1)], "w+");

-js


Andres, Cyrille wrote:
> 
> Hello everybody,
> 
> maybe I am dumb , I dunnow, I have a parse error here and I don't understand
> why :
> 
> $fp=fopen("temp/$userfile_name[$i-1]","w+");
> 
> the error I get is : Parse error: parse error, expecting `']'' in
> D:\Data\WebSSL\tm\RFP\upload2.php on line 61
> 
> 
> THANX !!! :(((
> ==
> 
> Cyrille ANDRES
> IT-Tools Technician
> 
> Siemens Shared Services, LLC
> Travel Management
> 1650 Technology Drive,m/s 243
> San Jose, CA 95110
> 
> phone: (408) 764-9250
> fax: (408) 764-9258
> 
> 
> 




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




Re: [PHP] help needed with phpmailer

2002-10-31 Thread Jonathan Sharp
SEE: http://phpmailer.sourceforge.net/extending.html

(click Home Page then examples)

-js


Pushpinder Singh Garcha wrote:
> Hi All
> 
> I am new in the php development world. I have made a simple mail
> application using the phph mail() function.
> I needed to use an attachment facility ith the mailing program...so I
> have tried to use this solution called phpmailer()
> from http://sourceforge.net/projects/phpmailer
> 
> I am not able to find any installation info on the site...Has anyoneused
> this before?
> 
> Please help ..
> 
> Thanks
> --Pushpinder
> 
> 
> Pushpinder Singh Garcha
> _
> Web Developer
> T. Falcon Napier and Associates, Inc.
> Off : 704 987 6500
> Cell  :  704 236 2939
> Fax   :  704 987 5002
> _
> 
> 




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




Re: [PHP] str_replace

2002-10-31 Thread Jonathan Sharp
$del = array(' ', "'", '\\', '/'...etc);
foreach ( $del AS $d )
{
   $file = str_replace($d, '', $file);
}

-js


rick wrote:
> How could this be written better? Is there a way to do it all in 1 line?
> 
> $file = str_replace(" ", "", "$file");
> $file = str_replace("'", "", "$file");
> $file = str_replace("\\", "", "$file");
> $file = str_replace("/", "", "$file");
> $file = str_replace(":", "", "$file");
> $file = str_replace("+", "", "$file");
> $file = str_replace("&", "", "$file");
> $file = str_replace("=", "", "$file");
> $file = str_replace("@", "", "$file");
> $file = str_replace("%", "", "$file");
> $file = str_replace("^", "", "$file");
> $file = str_replace("*", "", "$file");
> $file = str_replace("~", "", "$file");
> $file = str_replace("`", "", "$file");
> $file = str_replace(";", "", "$file");
> $file = str_replace("|", "", "$file");
> $file = str_replace("{", "", "$file");
> $file = str_replace("}", "", "$file");
> $file = str_replace("[", "", "$file");
> $file = str_replace("]", "", "$file");
> $file = str_replace("%", "", "$file");
> $file = str_replace("?", "", "$file");
> $file = str_replace("(", "", "$file");
> $file = str_replace(")", "", "$file");
> $file = str_replace("#", "", "$file");
> 
> Thanks!  :)
> 
> ...rick
> 
> 




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




Re: [PHP] Control Point of Access for certain pages.

2002-11-02 Thread Jonathan Sharp
in the url pass two (GET) variables: hash and token

generate a md5 hash from a secret string and the token (like time())...

oh your page with links to pop ups:



On your popup page:


-js


Monty wrote:
> On a site that uses a popup window to display images, I want to prevent
> people from hotlinking directly to the popup page because it just looks like
> crap if not sized properly with controls removed.
> 
> But I'm not sure how I can prevent someone from doing this. It appears the
> HTTP_REFERER isn't always a reliable way to see if they are entering the
> page from another page on your own site. And I'm not using sessions for this
> site (it's not necessary).
> 
> So, I'm a little stuck on how I can allow access to a page only from certain
> other pages. Has anyone done this with PHP?
> 
> Thanks!
>  
> 
> 




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




Re: [PHP] Session Management

2002-11-02 Thread Jonathan Sharp
first off: IP addresses are not the way to go about this AT ALL. Even if
they are behind a proxy, they would most likely be running on a private
subnet (say 10.0.0.x) and worse yet, if a company has multiple backbones
(like the one I consult at) traffic could go through one of 3 gateway
routes (different IP's) and thus i'd end up with 1 of three sessions!?
Also i could just go through and guess id's since they're a relatively
"small" set. (Easily scripted to probe for sessions)

Creating a 'jump' page is your best bet to cross domains and pass the
session id in the url, and then set the id for that domain. There should
not be any issues if they use the same session store, etc.

As for the internals of php's sessions, I'll leave someone else to
answer that.

-js


Robert Samuel White wrote:
> I'm looking for some well thought out advice on session management.
> 
> I've created a class for handling session management across an unlimited
> number of domains (without using cookies) however it has some inherent
> problems.  In order to differentiate between users, it is using the IP
> Address.  I realize this is completely inefficient, and I was hoping
> that someone could give me some pointers on how exactly PHP handles
> session management from the backend.  When not using cookies, PHP
> propagates the Session ID in the URL and a hidden variable in forms.
> However, is this even safe?  Or is this completely blind faith that the
> Session belongs to that person?
> 
> Basically, I want to know if PHP *knows for sure* the right user is
> using the right session.  In other words, can it detect hijacked
> sessions?  My guess is a resounding no.
> 
> I'm wondering if there is some way to determine the real IP Address of a
> user, even if that user is behind a proxy farm, etc., and if this is, in
> fact, what PHP does.
> 
> If not, I'm stuck with figuring out how best to accomplish my goals
> using cookies.  The problem:  a cookie can only bet set for a single
> domain; therefore, the session will not be carried with the person if
> they browse to another domain which also uses the same eNetwizard
> Content Management Server.  A possibility is to always propagate a State
> Id with the URL and forms, however even this would not prevent the exact
> same problem:  Is this blind faith?
> 
> If you can point me to any excellent resources on the state of session
> management on the web and how to do this securely, please let me know.
> 
> -Samuel | http://enetwizard.net
> 
> 
> 
> 




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




Re: [PHP] Fwd: Quarter question..

2002-11-02 Thread Jonathan Sharp
try this:

-js


";
printf('Delete',
$PHP_SELF, $myrow['id'] );
$q = ceil( 4/(int)date('n', strtotime($mydata['date']) ));
printf('%s%s%s',
'update-inv.php', $myrow['id'], $myrow['name'], $myrow['details'], $q);
}
?>




Jim Hatridge wrote:
> HI all,
> 
> In the code below I'm trying to get the last column to show 1, 2, 3, or 4
> according to which quarter of the year it is. But all it shows in that column
> is " Resource ID # X". The X starts with #3 and goes to 18. There are (at the
> moment) 15 items in the table.  Any ideas what's wrong?
> 
> Thanks
> 
> JIM
> 
> #
>  echo " \n";
> $i=1;
> while ($myrow = mysql_fetch_array($result)) {
> if($i % 2) { //this means if there is a remainder
> echo "\n";
> } else { //if there isn't a remainder we will do the else
> echo "\n";
> }
> $qdate=$myrow["date"];
> $sql = "select quarter($qdate)" or die("not work #3");
> $yyy = mysql_query ($sql) or die("not work #4");
> 
> printf("Delete", $PHP_SELF,
> $myrow["id"]);
> printf("Update%s
> %s  %s",
>   "update-inv.php", $myrow["id"], $myrow["name"], $myrow["details"], $yyy);
> $i=$i+1;
> }
> echo "\n";
> }
> ?>
> #
> 




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




Re: [PHP] Send $out embedded in a mail in HTML FORMAT

2002-11-03 Thread Jonathan Sharp
search google for 'phpmailer' (I think http://phpmailer.sourceforge.net)

-js


John W. Holmes wrote:
> Search the archives or google for HTML email with PHP and you'll get a
> ton of examples. You just have to send a Content-Type: header to tell
> the mail reader it's HTML.
> 
> ---John Holmes...
> 
> 
>>-Original Message-
>>From: Kevin Fradkin [mailto:kfradkin@;ciudad.com.ar]
>>Sent: Saturday, November 02, 2002 7:53 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] Send $out embedded in a mail in HTML FORMAT
>>
>>I read from a template, insert data and save it as a new file with
> 
> html
> 
>>code...
>>i want to send that file that is the same as $out via mail embedded in
>>it...
>>
>>i do
>>
>>$fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm',
> 
> "w");
> 
>>$fp = $fifi;
>>fputs ($fifi, $out . "");
>>fclose ($fifi);
>>mail("[EMAIL PROTECTED]", "subject",$out , "From: website");
>>
>>but when i receive that mail.. i get the source of the file with
> 
> 
> 
>> bla bla bla not in HTML FORMAT..
>>
>>thnx in advance!..
>>
>>Spooky
>>
>>
>>--
>>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] ASTemplate

2002-11-03 Thread Jonathan Sharp
Benchmarks?

-js


Adam Atlas wrote:
> First post!!! Um, yeah... anyway...
> 
> Hi people, I just got a beta of my ASTemplate code out. It's a PHP
> template system that uses an XML-based format to specify template format
> and text files (that can be HTML or any other text format) that make up
> the body of its output. If you're looking for a good template system for
> a PHP project, why don't you give ASTemplate a try? It's beta right now,
> so if you find any bugs, tell me and I'll try to fix it.
> 
> So, if you want to help me beta test it, or you think it might be useful
> (I wrote it for my own purposes, but now I'm releasing it in case others
> might find it useful) download it:
> http://www.atommic.com/software/php/ASTemplate.tgz (GZipped tarball, for
> *nix and Mac- 11k)
> http://www.atommic.com/software/php/ASTemplate.zip (ZIP archive, for
> Windows- 12k)
> 
> Currently it's distributed under the GNU GPL, but I might change it to
> the LGPL later so it can be more widely used. Anyway, I hope people
> enjoy ASTemplate!
> 
> --Adam Atlas
> 
> 
> -- 
> Adam Atlas
> 
> Your mouse has moved. Windows has to reboot for changes to take effect.
> [ OK ]
> 
> 




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




Re: [PHP] Been looking for a tutorial on how to create themes ingeneral

2002-11-04 Thread Jonathan Sharp
look at smarty (smarty.php.net) as it does templates, and i am
accomplishing 'themes' on a current project by just changing the
template directory.

-js


Marek Kilimajer wrote:
> My way: take a theme that most suits your needs and change it
> 
> Kevin Myrick wrote:
> 
>> Ok, like I stated in my last message, I am using
>> PHPWebsite as my portal system.
>>
>> However, I would like to learn how to do custom
>> themes, because like sooo many aspiring web
>> designers/programmers, I got an imagination a mile
>> long and deep.
>>
>> So, anyone want to point me in the right direction on
>> a theme creation tutorial, seeing as Sourceforge
>> doesn't want to help me out?
>>
>> Thanks,
>> Kevin Myrick
>> www.ultimatealchemy.com
>>
>> __
>> Do you Yahoo!?
>> HotJobs - Search new jobs daily now
>> http://hotjobs.yahoo.com/
>>
>>  
>>
> 
> 




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




Re: [PHP] attachement

2002-11-10 Thread Jonathan Sharp
see http://phpmailer.sourceforge.net

-js


Oliver Witt wrote:
> Hi,
> I wrote a php script that's supposed to enable me to attach files to an
> email. However, the attached files ends up being a mess of letters.
> "Hallo" becomes "SGFsbG8=". That must have to do with encoding. Is that
> a common problem or do you need the entire script?
> Thanks,
> Olli
> 
> 




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




Re: [PHP] Create associative array from comments by preg

2002-11-10 Thread Jonathan Sharp
Here's the code...

-js


$string = <<
value 1

Re: [PHP] preg_split() - pattern problem

2002-11-11 Thread Jonathan Sharp
I believe it's U so try /T.*0.*B/U

-js


Jason Wong wrote:
> On Tuesday 12 November 2002 02:26, Tobias Talltorp wrote:
> 
>>How would I write the pattern for this preg_split()?
>>"/T.*O.*B/", seems to only return the first and last portion of the string
>>(1: Once upon a time, 2: going for a walk).
>>
>>$string = "Once upon a time T:O.B there was a T.O,B duck who was T-O'B
>>going for a walk";
>>
>>$array = preg_split('/T.*O.*B/', $string, -1, PREG_SPLIT_OFFSET_CAPTURE);
> 
> 
> It's doing a greedy match, thus your pattern is actually matching 
> 
> {T:O.B there was a T.O,B duck who was T-O'B}
> 
> 1) Check whether there's a flag in PRCE to do ungreedy matches.
> 
> or 
> 
> 2) Maybe you really meant your pattern to be /T.O.B/ which matches 
> 
> T{any single char}O{any single char}B
> 
> 




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




Re: [PHP] Trivial newbie regex question

2002-11-13 Thread Jonathan Sharp
try basename('http://www.domain.com/stuff/index.html');

-js


Charles Wiltgen wrote:
> Hello,
> 
> I just want to get the "index" part of "http://www.domain.com/stuff/
> index.html".
> 
> I'm trying to figure out this regex stuff, but it hasn't yet clicked.
> Here's my best guess:
> 
> ereg('?/(*)\.html$', $source, $dest);
> 
> To me -- and please be gentle -- this means, "Starting with the forward
> slash closest to the end of $source, capture whatever comes after it and
> before '.html', and put it in $dest."  Obviously not correct, but I've spent
> an embarrassing amount of time feel stupid.  Help?
> 
> -- Charles Wiltgen
> 
> 




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




Re: [PHP] Qmail / PHP question

2002-11-13 Thread Jonathan Sharp
If I remember correctly (it's been a while) the contents gets passed
through STDIN to in this case wget, it'd be better to call the script as:
|/usr/bin/php -q /path/to/script.php

or put:
#!/usr/bin/php at the top of your script and call as:
|/path/to/script.php

and use: (i forget the exact path, but something along these lines)
$fp = fopen('php://stdin', 'r');
to read the email.

-js


Mike D wrote:
> Hello,
> 
> I am using qmail and am attempting to have an email trigger a php script
> and process the contents of the email upon receipt.
> 
> I have created the .qmail-address file which contains the following:
> |/usr/bin/wget -q http://www.domain.com/script.php
> 
> The part I a stuck on is how to pass the contents of the email to the
> php script...
> 
> Thanks in advance!
> mike D
> 




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




Re: [PHP] Trivial newbie regex question

2002-11-13 Thread Jonathan Sharp
but my way is so pretty! i mean, who cares if it doesn't work 'exactly'
as you want, we're going for the ballpark solution right???

fine...
substr(basename($url), 0, strrpos($url)-1);

(note the strRpos)

-js


John W. Holmes wrote:
> He wants just "index" though, instead of "index.html"
> 
> You can do it a variety of ways. You can use basename() like Jonathan
> said, and just strip off the last 5 characters using substr().
> 
> Or you can use either of the following two regular expressions.
> 
> preg_match('~/([^/]*)\.html$~', $source, $dest);
> ereg('/([^/]*)\.html$',$source,$dest);
> 
> ---John Holmes...
> 
> 
>>-Original Message-
>>From: Jonathan Sharp [mailto:js-lists@;sharpmedia.net]
>>Sent: Wednesday, November 13, 2002 10:34 PM
>>To: Charles Wiltgen
>>Cc: List ˆ PHP General
>>Subject: Re: [PHP] Trivial newbie regex question
>>
>>try basename('http://www.domain.com/stuff/index.html');
>>
>>-js
>>
>>
>>Charles Wiltgen wrote:
>>
>>>Hello,
>>>
>>>I just want to get the "index" part of "http://www.domain.com/stuff/
>>>index.html".
>>>
>>>I'm trying to figure out this regex stuff, but it hasn't yet
>>
> clicked.
> 
>>>Here's my best guess:
>>>
>>>ereg('?/(*)\.html$', $source, $dest);
>>>
>>>To me -- and please be gentle -- this means, "Starting with the
>>
> forward
> 
>>>slash closest to the end of $source, capture whatever comes after it
>>
> and
> 
>>>before '.html', and put it in $dest."  Obviously not correct, but
>>
> I've
> 
>>spent
>>
>>>an embarrassing amount of time feel stupid.  Help?
>>>
>>>-- Charles Wiltgen
>>>
>>>
>>
>>
>>
>>
>>--
>>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] Trivial newbie regex question

2002-11-13 Thread Jonathan Sharp
good catch, i guess i love php so much i just expect it to know what i
want it to do!

-js


John W. Holmes wrote:
> substr(basename($url), 0, strrpos($url,'.')-1);
> 
> note the '.' 
> 
> :)
> 
> ---John Holmes...
> 
> 
>>-Original Message-
>>From: Jonathan Sharp [mailto:js-lists@;sharpmedia.net]
>>Sent: Wednesday, November 13, 2002 10:50 PM
>>To: [EMAIL PROTECTED]
>>Cc: 'Charles Wiltgen'; 'List ? PHP General'
>>Subject: Re: [PHP] Trivial newbie regex question
>>
>>but my way is so pretty! i mean, who cares if it doesn't work
> 
> 'exactly'
> 
>>as you want, we're going for the ballpark solution right???
>>
>>fine...
>>substr(basename($url), 0, strrpos($url)-1);
>>
>>(note the strRpos)
>>
>>-js
>>
>>
>>John W. Holmes wrote:
>>
>>>He wants just "index" though, instead of "index.html"
>>>
>>>You can do it a variety of ways. You can use basename() like
>>
> Jonathan
> 
>>>said, and just strip off the last 5 characters using substr().
>>>
>>>Or you can use either of the following two regular expressions.
>>>
>>>preg_match('~/([^/]*)\.html$~', $source, $dest);
>>>ereg('/([^/]*)\.html$',$source,$dest);
>>>
>>>---John Holmes...
>>>
>>>
>>>
>>>>-Original Message-
>>>>From: Jonathan Sharp [mailto:js-lists@;sharpmedia.net]
>>>>Sent: Wednesday, November 13, 2002 10:34 PM
>>>>To: Charles Wiltgen
>>>>Cc: List ˆ PHP General
>>>>Subject: Re: [PHP] Trivial newbie regex question
>>>>
>>>>try basename('http://www.domain.com/stuff/index.html');
>>>>
>>>>-js
>>>>
>>>>
>>>>Charles Wiltgen wrote:
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>I just want to get the "index" part of
>>>>
> "http://www.domain.com/stuff/
> 
>>>>>index.html".
>>>>>
>>>>>I'm trying to figure out this regex stuff, but it hasn't yet
>>>>
>>>clicked.
>>>
>>>
>>>>>Here's my best guess:
>>>>>
>>>>>   ereg('?/(*)\.html$', $source, $dest);
>>>>>
>>>>>To me -- and please be gentle -- this means, "Starting with the
>>>>
>>>forward
>>>
>>>
>>>>>slash closest to the end of $source, capture whatever comes after
>>>>
> it
> 
>>>and
>>>
>>>
>>>>>before '.html', and put it in $dest."  Obviously not correct, but
>>>>
>>>I've
>>>
>>>
>>>>spent
>>>>
>>>>
>>>>>an embarrassing amount of time feel stupid.  Help?
>>>>>
>>>>>-- Charles Wiltgen
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>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] posible bug, require and symlinks

2002-11-14 Thread Jonathan Sharp
Can you post some sample code as well as paths to symlinks etc.

-js


Michael Sims wrote:
> On Wed, 13 Nov 2002 20:12:44 -0500, you wrote:
> 
> 
>>When I require a file from index.php, if there's no .. on the path (a relative 
>>path, but not going back), the relative path is from where the original file 
>>is, but if there's a .. on the path, the relative path is from where the 
>>symlink is (although php identifies the script as the original file in the 
>>error message).
> 
> 
> That certainly sounds like a bug to me, or at least inconsistent
> behavior.  I'd report it on bugs.php.net...
> 




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




Re: [PHP] Removing duplicates in multi-dimensional array

2002-11-14 Thread Jonathan Sharp
When you build your 2d array you could make a seperate 1d array that's
indexed by the fax number and if it's set, not set it in your array...

-js


René Fournier wrote:
> I'm finding this one hard to approach...
> 
> I have a two-dimensional array, containing customer contact information.
> Looks like:
> 
> $myarray[0][0] = "Microsoft";
> $myarray[0][1] = "Bill";
> $myarray[0][2] = "123-1234";
> 
> $myarray[1][0] = "Apple";
> $myarray[1][1] = "Steve";
> $myarray[1][2] = "456-1234"; <
> 
> $myarray[2][0] = "Oracle";
> $myarray[2][1] = "Larry";
> $myarray[2][2] = "987-4321";
> 
> $myarray[3][0] = "Pixar";
> $myarray[3][1] = "Steve";
> $myarray[3][2] = "456-1234"; <
> 
> What I want to do is remove records that have the same fax number, so
> that each fax number occurs only once. For example,  $myarray[1][2] and
> $myarray[3][2] are the same--I would like to remove/unset one of them.
> 
> I know that array_unique() will do this for one-dimensional arrays, but
> I'm kinda stuck here, since the repeating element is in the second
> dimension. Any ideas how I might do this?
> 
> Thanks.
> 
> Rene
> 
> ---
> René Fournier,
> [EMAIL PROTECTED]
> 
> Toll-free +1.888.886.2754
> Tel +1.403.291.3601
> Fax +1.403.250.5228
> www.smartslitters.com
> 
> SmartSlitters International
> #33, 1339 - 40th Ave NE
> Calgary AB  T2E 8N6
> Canada
> 
> 




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




Re: [PHP] Trivial newbie regex question

2002-11-14 Thread Jonathan Sharp
one more thought bout this just for the record... not sure which is
faster, but this may be the better solution:

$index = substr($url, strrpos($url, '/'), strrpos($url, '.')-1);

-js


Jonathan Sharp wrote:
> good catch, i guess i love php so much i just expect it to know what i
> want it to do!
> 
> -js
> 
> 
> John W. Holmes wrote:
> 
>>substr(basename($url), 0, strrpos($url,'.')-1);
>>
>>note the '.' 
>>
>>:)
>>
>>---John Holmes...
>>
>>
>>
>>>-Original Message-
>>>From: Jonathan Sharp [mailto:js-lists@;sharpmedia.net]
>>>Sent: Wednesday, November 13, 2002 10:50 PM
>>>To: [EMAIL PROTECTED]
>>>Cc: 'Charles Wiltgen'; 'List ? PHP General'
>>>Subject: Re: [PHP] Trivial newbie regex question
>>>
>>>but my way is so pretty! i mean, who cares if it doesn't work
>>
>>'exactly'
>>
>>
>>>as you want, we're going for the ballpark solution right???
>>>
>>>fine...
>>>substr(basename($url), 0, strrpos($url)-1);
>>>
>>>(note the strRpos)
>>>
>>>-js
>>>
>>>
>>>John W. Holmes wrote:
>>>
>>>
>>>>He wants just "index" though, instead of "index.html"
>>>>
>>>>You can do it a variety of ways. You can use basename() like
>>>
>>Jonathan
>>
>>
>>>>said, and just strip off the last 5 characters using substr().
>>>>
>>>>Or you can use either of the following two regular expressions.
>>>>
>>>>preg_match('~/([^/]*)\.html$~', $source, $dest);
>>>>ereg('/([^/]*)\.html$',$source,$dest);
>>>>
>>>>---John Holmes...
>>>>
>>>>
>>>>
>>>>
>>>>>-Original Message-
>>>>>From: Jonathan Sharp [mailto:js-lists@;sharpmedia.net]
>>>>>Sent: Wednesday, November 13, 2002 10:34 PM
>>>>>To: Charles Wiltgen
>>>>>Cc: List ˆ PHP General
>>>>>Subject: Re: [PHP] Trivial newbie regex question
>>>>>
>>>>>try basename('http://www.domain.com/stuff/index.html');
>>>>>
>>>>>-js
>>>>>
>>>>>
>>>>>Charles Wiltgen wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I just want to get the "index" part of
>>>>>
>>"http://www.domain.com/stuff/
>>
>>
>>>>>>index.html".
>>>>>>
>>>>>>I'm trying to figure out this regex stuff, but it hasn't yet
>>>>>
>>>>clicked.
>>>>
>>>>
>>>>
>>>>>>Here's my best guess:
>>>>>>
>>>>>>  ereg('?/(*)\.html$', $source, $dest);
>>>>>>
>>>>>>To me -- and please be gentle -- this means, "Starting with the
>>>>>
>>>>forward
>>>>
>>>>
>>>>
>>>>>>slash closest to the end of $source, capture whatever comes after
>>>>>
>>it
>>
>>
>>>>and
>>>>
>>>>
>>>>
>>>>>>before '.html', and put it in $dest."  Obviously not correct, but
>>>>>
>>>>I've
>>>>
>>>>
>>>>
>>>>>spent
>>>>>
>>>>>
>>>>>
>>>>>>an embarrassing amount of time feel stupid.  Help?
>>>>>>
>>>>>>-- Charles Wiltgen
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>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 implode multi-dimensional arrays?

2002-11-14 Thread Jonathan Sharp
foreach( $array AS $d2 )
{
   $string .= implode('', $d2) . "\n";
}

-js


René Fournier wrote:
> The docs don't seem to discuss this... Or maybe I'm looking in the wrong
> place. Anyway, I want to convert a multidimensional array back to the
> tab-delimited format it began as ("\t" separating fields, "\n"
> seperating records/rows)...  Any ideas???
> 
> Rene
> 
> ---
> René Fournier,
> [EMAIL PROTECTED]
> 
> Toll-free +1.888.886.2754
> Tel +1.403.291.3601
> Fax +1.403.250.5228
> www.smartslitters.com
> 
> SmartSlitters International
> #33, 1339 - 40th Ave NE
> Calgary AB  T2E 8N6
> Canada
> 
> 




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




Re: [PHP] How to implode multi-dimensional arrays?

2002-11-14 Thread Jonathan Sharp
Dope...try this instead...

foreach ( $array AS $a )
{
$string .= implode("\t", $a) . "\n";
}

-js


Jonathan Sharp wrote:
> foreach( $array AS $d2 )
> {
>$string .= implode('', $d2) . "\n";
> }
> 
> -js
> 
> 
> René Fournier wrote:
> 
>>The docs don't seem to discuss this... Or maybe I'm looking in the wrong
>>place. Anyway, I want to convert a multidimensional array back to the
>>tab-delimited format it began as ("\t" separating fields, "\n"
>>seperating records/rows)...  Any ideas???
>>
>>Rene
>>
>>---
>>René Fournier,
>>[EMAIL PROTECTED]
>>
>>Toll-free +1.888.886.2754
>>Tel +1.403.291.3601
>>Fax +1.403.250.5228
>>www.smartslitters.com
>>
>>SmartSlitters International
>>#33, 1339 - 40th Ave NE
>>Calgary AB  T2E 8N6
>>Canada
>>
>>
> 
> 
> 
> 




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




Re: [PHP] Relaying variables to distant site

2002-11-14 Thread Jonathan Sharp
Pulling this idea from down south, but could you do serialize($_GLOBALS)
and then POST that to the distant site and unserialize it?

what are you trying to accomplish exactly? A Proxy?

-js


Mike MacDonald wrote:
> Hi People!
> Can anyone help with this:
> 
> 
>Want to pick up variables passed from form in
>PHP page and pass to distant site. Can use
>long get, but would like to access ALL variables
>in the PHP page and pass them forward, without
>coding each individual one if possible
> 
> 
>   Port 80   Port 3000
> 
>+-WebForm-+ +-PHP Page++-DistantSite-+
>| | | || |
>| | | || |
>|Form Variables--->   || |
>| | | || |
>| | |  readfile() -> |
>| | | |  ^ | |
>| | | |  | | |
>| | | |  | | |
>| | | |  | | |
>|  +--- |  +---  | |  +---
>|  | /  |  | /   | |  | /
>|  |/   |  |/| |  |/
>+---+--- | +---
> |
> |
>   
> 
>Need to on forward all
>variables passed from
>form
> 




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




[PHP] Serialization of references to objects

2002-11-16 Thread Jonathan Sharp
How is serialization of references handled? Example:

class foo
{
   var $abc;
   function bar()
   {
  echo $this->abc;
   }
}

$obj = array( &new foo(), &new foo() );
$baz = serialize($obj);

/* ... dancing monkey for entertainment while time passes ... */

$obj = unserialize($baz);


Will references be restored upon unserialization?

-js


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




Re: [PHP] Protecting Queries

2002-11-17 Thread Jonathan Sharp
the issue isn't with query, it's with variables used within queries...

example:
$id = $_GET['id'];
$query = "SELECT * FROM mytable WHERE id=$id";

and if you call this page as (or something like this):
?id='' OR 1=1

You can alter the query

-js


Stephen wrote:
> Since day one of me doing MySQL stuff in PHP, I've always set up my
> query as a variable then put it into the query function such as this:
>  
> $query = "SELECT * FROM bobstuff WHERE id='1'";
> $result = mysql_query($query, $connection);
>  
> I've just come aware of the security risks of this. How could I make it
> so the $query variable isn't editable from the URL? Should I turn
> register_globals off?
> 
> Thanks,
> Stephen Craton
> http://www.melchior.us
>  
> "Life is a gift from God. Wasting it is like destroying a gift you got
> from the person you love most." -- http://www.melchior.us
> 




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




Re: [PHP] templates

2002-11-19 Thread Jonathan Sharp
I'm assuming you're trying to have a select list.

Try this:


File XML1
File foo


Just make sure you test the value you get for file, so that someone
doesn't pass you /etc/passwd (just an example).

-js


Adam wrote:
> I am developing a site, using XML and PHP for formatting. I want to have one HTML 
>template and call up the different XML files from a Javascript menu. 
> Ideally i want to be able to call files from a link, such as:
> 'index.php?action=load&file="file.xml"'
> 
> Not sure if this is the right format, but hopefully you get the idea.
> 
> Cheers,
> Adam.
> 




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




Re: [PHP] mailing by SMTP

2002-11-19 Thread Jonathan Sharp
phpmailer.sourceforget.net

-js


Siamak wrote:
> hi
> how can i send a mail by a smtp server from a php page?
> thanks
> 
> 
> 




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




Re: [PHP] this oop-script still doesn't work

2002-11-19 Thread Jonathan Sharp
$overall->foo->bar() works for me.
also there's no need for the eval('global...') line

Apache 1.3.27, PHP 4.2.2

-js


Tularis wrote:
> ok, I have gotten great help here  already, but it still doesn't work,
> it returns a object not found error (on the $foo->bar() line). I want to
> change $overall->foo->bar() to $foo->bar... any tips? or help??
> 
> thanx!
> - Tularis
> 
>  
> class overall {
> var $loaded;
> 
> function load($class){
> eval("global \$$class;"); // This didn't work either
> //$this->loaded[] = $class; // see the comments with the foreach()
> eval("\$this->$class = new $class;");
> return true;
> }
> }
> 
> class foo {
> var $bar;
> 
> // Constructor
> function bar(){
> if(!isset($this->bar)){
> $this->bar = 1;
> }else{
> $this->bar++;
> }
> echo $this->bar."";
> }
> }
> 
> // Start actual loading
> $overall = new overall;
> $overall->load('foo');
> 
> /*
> foreach($overall->loaded as $key=>$val){// didn't work.. I commented
> this out, because I thought it MIGHT interfere with the other way
> $val =& $overall->$val;// both don't work though :(
> }
> */
> 
> $overall->foo->bar();
> $overall->foo->bar();
> $overall->foo->bar();
> $overall->foo->bar();
> 
> // it doesn't understand this
> $foo->bar();
> ?>
> 
> 




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




Re: [PHP] Seconds to minutes

2002-11-19 Thread Jonathan Sharp
i'll just throw my code in here while we're at it...

$seconds = 3600*5 + (60 * 10) + 45;

$hours = floor( $seconds / 3600 );
$mins = floor( ($seconds % 3600) / 60 );
$seconds = floor( ($seconds % 60) );

echo "Hours: $hours\nMins: $mins\nSeconds: $seconds\n";

-js


John W. Holmes wrote:
>>You can do something like this:
>>> $seconds = 265;
>> $time = date('i s',$seconds);
>> $minSecs = explode(' ',$time);
>> echo "{$minSecs[0]} minutes and {$minSecs[1]} seconds\n";
>>?>
> 
> 
> That doesn't work for anything over 3599 seconds, though... 
> 
> ---John Holmes...
> 
> 
> 




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




Re: [PHP] Re: REPLY NEEDED

2002-11-19 Thread Jonathan Sharp
MY GOODNESS! Thing of what 126M would do for the open source movement!
We could run php.net on gold plated servers! Not to mention a 64 way sun
box with all the bells and whistles, and spruced up with urb3r cool
lighting kits!

or thing of all the cd's you could send to AOL for 126M!

any other ideas?

-js


OrangeHairedBoy wrote:
> I think I'd rather go with the 126M USD being offered by Desmond West (see
> email entitled "STRICTLY CONFIDENCIAL") instead of this measly 31.5M USD.
> 
> If anyone wants to contact the people who own ecplaza.net (for fun), here's
> the info from whois:
> 
> Registrant:
> EC Plaza Network Inc.
>1F, Shinho Villart, 452-3 Sungnae2dong, Kangdong ku
>Seoul, Korea
> 
>Domain Name: ECPLAZA.NET
>Registrar: HANGANG Systems,Inc. dba doregi.com
> 
>Administrative, Technical, Billing Contact:
>   Kim jieum  [EMAIL PROTECTED]
>   82-2-476-1144
>   82-2-482-0339
> 
> 
> "Michael Oshodi" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> 
>  ASSISTANCE
> 
> WE ARE MEMBERS OF A SPECIAL COMMITTEE FOR BUDGET AND
> PLANNING OF THE NIGERIA NATIONAL PETROLEUM CORPORATION
>  (NNPC)IN WEST AFRICA. THIS COMMITTEE IS PRINCIPALLY CONCERNED
> WITH CONTRACT AWARDS AND APPROVAL. WITH OUR POSITIONS,
> WE HAVE SUCCESSFULLY SECURED FOR OURSELVES THE SUM OF
> THIRTHY ONE MILLION, FIVE HUNDRED THOUSAND UNITED
> STATES DOLLARS (US$31.5M). THIS AMOUNT WAS CAREFULLY
> MANIPULATED BY OVER-INVOICING OF AN OLD CONTRACT.
> 
> BASED ON INFORMATION GATHERED ABOUT YOU, WE BELIEVE
> YOU WOULD BE IN A POSITION TO HELP US IN TRANSFERING
> THIS FUND (US$31.5M) INTO A SAFE ACCOUNT. IT HAS BEEN
> AGREED THAT THE OWNER OF THE ACCOUNT WILL BE
> COMPENSATED WITH 30% OF THE REMITTED FUNDS, WHILE WE
> KEEP 60% AS THE INITIATORS AND 10% WILL BE SET ASIDE
> TO OFFSET EXPENSES AND PAY THE NECESSARY TAXES.WE
> INTEND TO USE PART OF OUR OWN SHARE TO IMPORT FROM
> YOUR COUNTRY AGRICULTURAL AND CONSTRUCTION MACHINERY.
> THIS IS BECAUSE THE PRESENT GOVERNMENT OF MY COUNTRY
> IS EMPHASISING ON PROVIDING FOOD AND HOUSING FOR ALL
> ITS CITIZENS BEFORE THE NEXT ELECTION. HENCE,
> AGRICULTURAL AND CONSTRUCTION EQUIPMENT ARE IN HIGH
> DEMAND OVER HERE. WE SHALL ALSO NEED YOUR ASSISTANCE
> IN THIS REGARD ON A COMMISSION TO BE AGREED UPON WHEN
> WE FINALLY MEET.
> 
> ALL MODALITIES OF THIS TRANSACTION HAVE BEEN CAREFULLY
> WORKED OUT AND ONCE STARTED WILL NOT TAKE MORE THAN
> SEVEN (7) WORKING DAYS, WITH YOUR FULL SUPPORT. THIS
> TRANSACTION IS 100% RISK FREE.
> 
> MOREOVER, WE SHALL NEED THE FOLLOWING FROM YOU TO
> ENABLE US BEGIN THE TRANSACTION FORMALLY. THEY ARE;
> YOUR FULL NAME AND ADDRESS OR YOUR COMPANY NAME,
> ADDRESS AND TELEPHONE/FAX NUMBERS, YOUR BANKERS
> NAME AND ADDRESS, YOUR ACCOUNT NUMBER AND NAME.
> THIS INFORMATION WILL BE USED ALONGSIDE OTHER VITAL
>  DOCUMENTS OVER HERE IN PREPARING THE NECESSARY
> APPLICATION FOR PAYMENT TO THE CONCERNED QUARTERS
> WHERE PAYMENT APPROVALS WOULD BE SECURED IN FAVOUR
>  OF YOUR COMPANY FOR THE PAYMENT OF OUR FUND(US$31.5M)
>  INTO YOUR NOMINATED ACCOUNT FOR US ALL. BY OUR APPLICATION,
> IT WILL BE ASSUMED THAT THIS SUM IS BEING REQUESTED AS
> PAYMENT, WHICH IS LONG-OUTSTANDING, FOR A CONTRACT,
> WE SHALL CLAIM WITH OUR POSITION, YOU OR YOUR COMPANY
>  EXECUTED FOR (NNPC) SOMETIME IN 1997. HENCE, WE SHALL
> FOLLOW ALL THE LEGAL OFFICIAL PROTOCOLS USUALLY
> OBSERVED BY FOREIGN CONTRACTORS WHENEVER THEY
> ARE DEMANDING PAYMENT FOR CONTRACTS EXECUTED
> FOR THE GOVERNMENT OF MY COUNTRY.
> 
> FURTHERMORE, IMMEDIATELY THE FINAL APPROVAL IS GRANTED,
> THE FUND WILL BE TRANSFERRED INTO YOUR ACCOUNT WITHIN 72
> HOURS, BY WHICH TIME MY PARTNERS AND I WILL BE IN YOUR COUNTRY
> FOR THE FINAL DISBURSEMENT IN THE RATIO ALREADY SPELT OUT TO YOU.
> 
>  PLEASE, YOU SHOULD ENDEAVOUR TO GIVE US AN ACCOUNT
> WHICH YOU HAVE ABSOLUTE CONTROL OVER. THIS IS VERY
> IMPORTANT BECAUSE WE WOULD NOT WANT A SITUATION
> WHEN THE MONEY IS IN THE ACCOUNT, YOU NOW TELL US
> YOU WOULD NEED TO BE AUTHORISED BY ANOTHER PERSON
> BEFORE WE CAN HAVE OUR OWN SHARE.
> 
> YOU WILL NOT BE REQUIRED TO TRAVEL OUT OF YOUR COUNTRY,
> ME AND MY PARTNERS, WE TRAVEL DOWN TO YOUR COUNTRY
> FOR THE DISBURSEMENT OF THE FUND, AFTER THE FINAL TRANSACTION.
> WE WILL ALSO DISCUSS ABOUT OIL BUSINEES IN MY COUNTRY
> WHEN WE COME DOWN OVER THERE. BECAUSE WE WOULD
> LIKE TO ESTABLISH A JOINT BUSINESS WITH YOU. THAT IS
> WE WILL USE YOUR NAME TO REGISTER AND
> INCORPORATE AN OIL COMPANY IN MY COUNTRY.
> 
> BESIDES, ON THE COMPLETION OF THIS TRANSFER,
> ALL DOCUMENTS USED FOR THE PURPOSE WILL BE
> WITHDRAWN FROM THE QUARTERS THEY ARE SUBMITTED
> BY OUR CONTACTS IN THESE OFFICES AND DESTROYED,
> THEREAFTER. SO, THERE WILL NOT BE ANY PROBLEM
> ARISING FROM THIS TRANSACTION NOW OR IN THE FUTURE.
> IF THIS PROPOSAL SATISFIES YOU, PLEASE REACH US ONLY
> BY EMAIL FOR MORE INFORMATION.
> 
> PLEASE, TREAT AS URGENT AND VERY IMPORTANT.
> 
> YOURS FAITHFULLY,
> 
> CHIEF MICHAEL OSHODI
> 
> 
> 
> 
> 
> 

Re: [PHP] Graph Question..

2002-11-20 Thread Jonathan Sharp
Please post code.

-js


James Hatridge wrote:
> Hi all,,
> 
> I d/l'ed a class for graphs last night. When I got the class working instead 
> of a line graph I got the netscape symbol for no picture, ie a broken box. I 
> must have missed something. Could someone give me a clue what I'm doing 
> wrong?
> 
> Thanks
> 
> JIM




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




Re: [PHP] Newbie: nested include and object in session

2002-11-20 Thread Jonathan Sharp
1. see php.net/include_once
2. Yes
$_SESSION['foo'] = new foo();

$myFoo = &$_SESSION['foo'];

$myFoo->var = 123;

/* page2.php */

$myFoo = &$_SESSION['foo'];

echo $myFoo->var;

-js


Michael Wai wrote:
> Hi everyone, I'm a newbie on PHP and MySQL. I've two questions that want to
> get some help.
> 
> 1. How to solve the problem of nested include? That's mean A include B and B
> include C.
> 2. Can I save the object in session?
> 
> Thanks for your great help!!
> 
> Regards,
> Michael
> 
> 
> 




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




RE: [PHP] Session File not being deleted

2001-01-11 Thread Jonathan Sharp

not sure, but if all else fails, just cron job it...

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398

-Original Message-
From: Samantha Savvakis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session File not being deleted


Hi,

I'm using:
SCO Openserver 5.0.5
PHP 4.0.4

I had this problem a little while ago, and didn't find a resolution to it.
I'm using sessions for a current application. The sessions are being created
and used as I want them to be. I have no problems with the way they are
working.

The files in my /tmp directory are never being removed. I've got files in
there from over 4 weeks ago and the list is growing.

I reviewed all the options in the php.ini file. I changed the following two
parameters to be small to see what happens:

session.gc_maxlifetime = 300 ; 300 seconds = 5 minutes
session.cache_expire = 2; 2 minutes

No change after changing the parameters. I even stopped and started my web
server to be sure that they would take effect and also printed out
php_info() to make sure the correct php.ini file is being used.

Any ideas as to what it might be?

Thanks,
Sam



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




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




[PHP] Installing PHP on Windows Command Line?

2001-01-26 Thread Jonathan Sharp

I want to setup php so that when I click a PHP script local to my hard
drive: C:\test.php it will run it through the PHP.exe parser but display the
results in my web browser...Anyone done this?

Thanks,
-Jonathan


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




[PHP] Best Way To Control Forms

2001-02-22 Thread Jonathan Sharp

I have a few sites which contain forms that span multiple screens (all
contained in two scripts though...)

theforms.php

The html for the form.


The html for the form.



forms.php
showScreen1();
break;
case 'saveScreen1':
if($theForms->saveScreen1() != true)
{
$error = "it died!";
$theForms->showScreen1();
break;
}
case 'showScreen2':
$theForms->showScreen2();
break;
}//Switch

?>

so basically I put all the html into functions in a class, and control the
flow of the form with the switch statement, that way if my function that
saves the data comes across an error, it get's trapped and shows that screen
again...

Has anybody else found a more elegant way to accomplish this? It works quite
nice, but I was wondering how other people go about creating their forms.

Thanks,
-Jonathan


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




RE: [PHP]

2001-02-22 Thread Jonathan Sharp

well...i just finished some code for dealing with an option box that has all
the states listed...


Select State
'.$ST[$i]."\n";
}//For
?>


First it creates an array $ST that contains a list of all the states
(includes PR and DC)
Next it loops through that array and if $state has the same value as the
state, it selects it...

You could probably turn this into a function or something...

=codeboy

> -Original Message-
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 22, 2001 8:17 PM
> To: PHP MAIL GROUP
> Subject: [PHP] 
>
> if i have a form with a select box in it how an i get the values
> to echo a php value ...
>
> ie
>
> 
> ACT
> VIC
> 
>
> can i change it to say
> 
> ACT
> VIC
> 
>
> so that when the page loads it shows which ever option is in the
> Data base?
>
> Peter Houchin
> Sun Rentals
> [EMAIL PROTECTED]
>
>


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




[PHP] PHP Conference In San Diego?

2001-03-05 Thread Jonathan Sharp

I've submitted a proposal for a tutorial for the PHP conference and it says
that you'll be notified on the 1st of March...but I haven't heard
anything...has anyone else that submitted something heard anything?

Thanks,
-Jonathan


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




[PHP] JavaDoc?

2001-03-14 Thread Jonathan Sharp

So i've heard bits and pieces that JavaDoc can parse out comments about
php...

does anyone have an example of a command line call to javadoc passing a PHP
file?

Thanks,
-Jonathan
[EMAIL PROTECTED]
(Remove spam. if you want to contact me directly)


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




[PHP] PSpell?

2001-03-16 Thread Jonathan Sharp

I have checked my phpinfo() and it shows that PSPell is enabled.

But when i run the following script (per php.net/manual/ example) i get the
following (following) error...

$pspell_link = pspell_new ("en");

if (pspell_check ($pspell_link, "testt")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
}

"Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't
find any sutable word lists for the language-tag "en". in
/parte/htdocs/public_html/pspell/test1.php on line 10

Warning: 0 is not an PSPELL result index in
/parte/htdocs/public_html/pspell/test1.php on line 12
Sorry, wrong spelling "

I have pspell-.11.2

Thanks,
-Jonathan


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




RE: [PHP] executables (.exe)

2001-03-21 Thread Jonathan Sharp

If you're on windows, (which i'm assuming you are) you can call the PHP
binary with the path to your php script...

so (assuming you have C:\php\bin\ as part of your PATH enviromental
variables for windows) you could do PHP C:\path\to\php-script.php and it
will run on the command line...or just give the full path to the php.exe
file...

C:\php\bin\php.exe C:\path\to\php-script.php

cheers,
-Jonathan

> -Original Message-
> From: Christian Dechery [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 5:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] executables (.exe)
>
>
> Correct me if I'm completely out of my mind here (often I am).
>
> But I think, I read somewhere that u can compile .php files and make
> executables of them to run in the command line like programs... is this
> true? How can I get it to work? WHat do I need?
> 
> .. Christian Dechery (lemming)
> .. http://www.tanamesa.com.br
> .. Gaita-L Owner / Web Developer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




RE: [PHP] connection id

2001-03-24 Thread Jonathan Sharp

TIA,
What you described is not possible. When you create that connection to the
mysql server, that connection dies when the script ends...

As far as persistent connections go, you will always call the code to create
the connection, but that connection lives on in that apache child process
until that child process dies.

So for example, apache spawns a child process to handle a request and it
executes your PHP script with the persistent connection code
(mysql_pconnect) and then after you script exits, that child process keeps
the conection to mysql open. Any PHP script afterwards that uses the same
connection information (host, username, password) with the mysql_pconnect()
call; apache checks for an existing persistent connection (that was created
with the first PHP script execution) so it returns that connection id. If
you use the standard mysql_connect call the apache child will drop the
connection when the script ends.

Cheers,
-Jonathan Sharp
js_AT_imprev.com

> -Original Message-
> From: andrie [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 23, 2001 3:38 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] connection id
>
>
> Hello php mania,
>   i was connecting into mysql using mysql_connect, and i just saved
>   the return value from this funtion. now i want to use this connection
>   id in the other page so i dont have to connect into mysql again.
>   is it possible for me to do that ?
>   anybody could tell me the different between persistence connection
>   or not ? and how the implementation ?
>
>   TIA
>
>
> --
> Best regards,
>  andrie  mailto:[EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




RE: [PHP] Which is better??

2001-04-06 Thread Jonathan Sharp

> My forms page is named "submit.phtml"
> 

and if you use the  then you don't even need to wory
about the file name, as it will always submit to itself...



-js

> -Original Message-
> From: Curtis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 9:27 AM
> To: php
> Subject: [PHP] Which is better??
>
>
> Hello,
>
> I am wondering witch way is that best to go with my forms..
>
> Self Referenceing or have the data sent to another page for the
> processing.
>
> i.e.
> (option one)
> My forms page is named "submit.phtml"
> 
>
> OR
> (option two)
> My forms page name is "enterdata.phtml"
> 
>
> and it uses another page to submit the data.
> that displays  "DATA SUBMITTED"
>
> Make sense?
>
> The reason I ask is that I am having problems making a field REQUIRED
> with option one.
> But all of my forms are set up that way.
>
> Thanks for any input.
>
> Curtis
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>


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




RE: [PHP] Variables

2001-04-06 Thread Jonathan Sharp

Have you looked at php.net/manual/ ? Just read through the variables portion
and it goes over it.

-js

> -Original Message-
> From: Cheng, Kynan (London) [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 9:54 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [PHP] Variables
>
>
> Thanks for the tips guys,
> but I'm also new to the coding...
> can anyone tell me what the script to accept the variable might be?
>
>
> Geocities does do lots of Cgi scripts - is that better/easier?
>
> > -Original Message-
> > From:   Jon Haworth [SMTP:[EMAIL PROTECTED]]
> > Sent:   06 April 2001 17:20
> > To: '[EMAIL PROTECTED]'
> > Subject:RE: [PHP] Variables
> >
> > But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
> > other goodies.
> >
> > HTH
> > Jon
> >
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: 06 April 2001 17:03
> >
> > I'm not sure about Freeserve, but I don't think that Geocities supports
> > PHP
> > on their webpages (at least not for users ...).
> >
> > --Joe
> >
> > On Fri, Apr 06, 2001 at 10:05:14AM +0100, Cheng, Kynan (London) wrote:
> > > Hello,
> > >
> > > Can anyone help me to achieve this using PHP:
> > >
> > > I would like to have a personal photographic portfolio site with
> > thumbnails.
> > > Clicking on the thumbnail would bring up another page which has an
> > enlarged
> > > version of the photo on a standard 'template page'.  In other
> words the
> > > photo src is a variable.
> > >
> > > Thing is I know not much about PHP/CGI/JS and I am using free
> ISPs like
> > > Freeserve (UK) and Yahoo Geocities, so I don't know what is
> the best way
> > to
> > > approach this.
> > >
> > > Thanks for any pointers.
> > >
> > > Kynan
> >
> >
> > **
> > 'The information included in this Email is of a confidential
> nature and is
> >
> > intended only for the addressee. If you are not the intended addressee,
> > any disclosure, copying or distribution by you is prohibited and may be
> > unlawful. Disclosure to any party other than the addressee, whether
> > inadvertent or otherwise is not intended to waive privilege or
> > confidentiality'
> >
> > **
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>


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




RE: [PHP] Array of words in textfile?

2001-04-06 Thread Jonathan Sharp

If you're splitting by a defined pattern (such as a space " ") explode is
quite a bit faster...and i believe that if you need reg exps. you can use
split() (which will take a regex as the pattern)...

-js

> -Original Message-
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 11:11 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Array of words in textfile?
>
>
> If they are all in a format like that, first just read the text file with
> fopen/fread into one big string.
>
> Then use:
>
> $refined_string = explode(" ", $bigstring);
>
> That's the main way to do it, but the preferable way is using a regular
> expression with either the ereg or preg functions.
>
>
> --
> Plutarck
> Should be working on something...
> but forgot what it was.
>
>
> "Jan Grafström" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi!
> > I want to read a textfile (cat, dog, rat,) and get it like this:
> > $namesArray = array("cat,", "dog,", "rat,");
> > If I can do this than I can go on and make changes in my array.
> > Like the examples in php manual.
> >
> >
> > Thanks in advance for any tips.
> >
> > Regards
> > Jan
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>


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




RE: [PHP] Building an array from a URL

2001-04-06 Thread Jonathan Sharp

can you just use a POST instead of a get? seems it might be cleaner in this
case...

-js

> -Original Message-
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 11:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Building an array from a URL
>
>
> You'll probably want to play with the following function:
>
> http://www.php.net/manual/en/function.parse-url.php
>
>
> --
> Plutarck
> Should be working on something...
> but forgot what it was.
>
>
> "Mike Gifford" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello,
> >
> > I'm trying to build an array out of data submitted from a URL.
> >
> > Essentially, I want to pull certain records out of a database which have
> been
> > selected on another form.
> >
> > The URL presently looks like this:
> >
> superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRS
> S175=1188
> >
> > I'd like to take these independent variables and merge them
> into a single
> array:
> > $array_superRSS = implode (":", $superRSS[]);
> >
> > So I can then pipe these values directly into another function:
> >
> > while ($array_superRSS) {
> > display_superRSS($array_superRSS[]);
> > }
> >
> > Obviously I'm missing a step or two here, but would really appreciate
> someone
> > filling in some of the gaps.
> >
> > Thanks!
> >
> > Mike
> > --
> > Mike Gifford, OpenConcept Consulting, http://openconcept.ca
> > Offering everything your organization needs for an effective web site.
> > Featured Client: http://www.aboriginalrightscoalition.ca/
> > If a book doesn't make us better, then what on earth is it for? - Alice
> Walker
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




Re: [PHP] inserting a variable into a variable

2001-06-20 Thread Jonathan Sharp

Or, you could do...

$cat = 'butch';
${"rm_{$cat}_adt"} = 'is cool'; // This would set the variable $rm_butch_adt
equal to 'is cool'

-js
- Original Message -
From: "scott [gts]" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 8:37 AM
Subject: RE: [PHP] inserting a variable into a variable


> you so totally could use an assoc. array right now:
>
> $cat_adt = "x";
> $rm = "y";
>
> $a[ $cat_adt ] = "whatever";
> $a[ "$rm"."$cat_adt" ] = "Yeah";
>
> print $a['yx'];
>
>
> save yourself a lot of trouble and dont bother with
> variables-of-variables and trying to get
> $rm_$cat_adt == $rm_x
>
> just use a hash... that's what it's there for ;)
>
>
> > -Original Message-
> > From: Tom Carter [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 20, 2001 5:24 AM
> > To: Hasan Niyaz; [EMAIL PROTECTED]
> > Subject: Re: [PHP] inserting a variable into a variable
> >
> >
> > > I have come to a situation where  i am having a variable inside
another
> > variable.
> > > for example.
> > >
> > > $rm_$cat_adt
> >
> > PHP would read this as trying to prepend the variable $cat_adt to the
> > variable $rm_
> >
> > You seem to be trying to insert the variable $cat into the middle of a
> > variable.. possible, but probably better to slightly rethink your naming
> > strategy
> >
> > HTH,
> > Tom
> >
> > >
> > > The above is a variable and $cat is again another variable
> > > This does not work..
> > >
> > > Need some help!
> > >
> > >
> > > Thanks,
> > > Hasan
> > >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] Problem starting session

2001-06-20 Thread Jonathan Sharp

Check your php.ini file, you should set the temp dir setting to semething
like C:\tmp and make sure that C:\tmp exists and that whatever user your
site is running as in IIS is set to have read/write access...

/tmp\sess is for unix...it's not a valid path (/tmp is what is
defined as the temp dir in php.ini)

-js

- Original Message -
From: "Chris Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 11:58 AM
Subject: Re: [PHP] Problem starting session


> does the dir exist ? I dont use win2k for php so im guessing. win2k also
has
> some sort of permissions doesnt it ? does the dir have to have the same
> perms that the server does ? linux needs this to be true.
>
> --
>
>   Chris Lee
>   [EMAIL PROTECTED]
>
>
> "Ben Edwards" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I am getting the following on a Windows 2000 Professional installation
> when
> > I try to start a session:
> >
> > Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR)
failed:
> m
> > (2) in
> > e:\inetpub\wwwroot\cd\common.inc on line 27
> >
> > Any help would be much appreciated.
> >
> > Regards,
> > Ben
> > *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
> > * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 *
> > * Campaign Against proper English, Dyslexia division *
> > * Homepagehttp://www.gifford.co.uk/~bedwards *
> > * i-Contact Progressive Videohttp://www.videonetwork.org *
> > * Smashing the Corporate image http://www.subvertise.org *
> > * Bristol's radical newshttp://www.bristle.co.uk *
> > * Open Directory Project http://www.dmoz.org *
> > *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




RE: [PHP] NT5 Sub Domains

2001-01-27 Thread Jonathan Sharp

Ah...yes you can. You're probably scared of apache because it doesn't have a
GUI! But don't fret I was in the same boat not too long ago!

1) Download the lastest version of apache (www.apache.org you were close...)
2) Install apache (it does have an installation program)
3) Configuring apache
To configure apache you need to edit the httpd.conf file (I suggest you
create a backfirst!) it's pretty self explanatory, there's lots of
documentation for it. You can run both IIS and Apache as long as they're not
running on the same ports (eg :80, so either disable the web server for IIS
on port 80 (or change it to something like 64892) or make apache run on some
other port (you set this in httpd.conf under the Port option)) So after
you've setup your httpd.conf file, you'll start apache from the command line
(you may scream now if you'd like...this is where MS is...MS...) you run the
apache deamon with a command like C:\path\to\apache.exe start
C:\path\to\httpd.conf It's something similar to that, the command prompt
window will stay open and you won't be able to do anything in that window,
so to shut down apache, open a new window and do the C:\path\to\apache.exe
stop (I haven't done this on NT in a while so those commands are probably
wrong but it should be the right direction)
4) To setup subdomains (this is the good part)
If you want to actually setup domain.com to develop on locally and the site
isn't "online" you can add an entry to your hosts file (somewhere in
C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
bogus TLD like domain.dev) and that will redirect all requests for
domain.xxx to your local apache server (assuming you've set Bind to * in the
httpd.conf file to listen to all IPs) For the actual subdomains you'd set
these in the httpd.conf file under VirtualDirectories (you can either do
Name based subdomains (one IP bound to NIC & multiple domains) or IP based
subdomains (multiple IPs bound to NIC & multiple domain names) Check the
apache.org documentation on how to set them up. It's not too terribly
complex...

NameVirtualHost 127.0.0.1

ServerAdmin [EMAIL PROTECTED]
ServerName subdomain.domain.com
DocumentRoot C:\path\to\your\website


Just be careful though...once you start using apache and such you'll be on
linux in no time...I have three dev servers now & two live servers...NT is
my desktop only because I use homesite to dev with and a few other winx
progs. Also if anyof you out there know a good colorcoding *nix developer
app (for PHP of couse) please let me know!

If you get stuck on anything, just holler... (i'm usually on EFNet in PHP as
codeboy)

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 1:42 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] NT5 Sub Domains


I've never tried that before.  I'd be scared of doing something wrong.  Can
I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I
wouldn't know where to begin...  =)

I can hear the answer already...  apache.com



>From: Rasmus Lerdorf <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
>
>Why don't you just install the Windows version of Apache?  That way your
>development environment will be much closer to your production
>environment.
>
>-Rasmus
>
>On Sat, 27 Jan 2001, [ rswfire ] wrote:
>
> > This is a little off topic, so I apologize, but I was hoping one of the
> > computer gurus here could help me.
> >
> > When I go live with my network, I will be using sub-domains.  Such as:
> > http://subdomain.domain.com/
> >
> > In order to test this on my NT5/IIS5 system, I need to be able to use
>these
> > subdomains.  I am programming locally, so there is no .com after my
>name.
> > It is my computer name:  http://si-exec-cio/
> >
> > Does anyone know how I can configure IIS5 to include
> > http://subdomain.si-exec-cio/ ?
> >
> > I am using Win 2000 Professional.
> >
> > Again, I apologize for sending an off-topic message.  My network is
> > primarily controlled by PHP so I hope you can understand.  =)
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> &

RE: [PHP] [Newbie] - @

2001-01-27 Thread Jonathan Sharp

It doesn't print out any errors or warnings generated by the function.

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED] 

-Original Message-
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [Newbie] - @ 


What doe the @ mean in front of a functions?


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




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




RE: [PHP] NT5 Sub Domains

2001-01-27 Thread Jonathan Sharp

> I set the Apache Port option to 8080.  Is that good?  I stopped the IIS
> service.  And now I can't get it to restart, not sure why...
Hm, well 8080 is fine, I'm not sure why IIS won't start...but MS probably is
freaking out that opensource is actually taking over it's domain (no pun
intended) =)

> I set Bind to *
That's good, whatever IPs that are config'd on your box apache will bind to
on 8080

> Should I set the ServerName directive to domain.dev?  Or does this have to
> be done in the HOSTS file you mentioned?
Yes you can set ServerName to domain.dev or whatever.foo the reason that
you'll add the entry to your HOSTS file is because most likely you're not
running a DNS server to authentically map that domain to your IP. Windows
looks at HOSTS before it goes to a DNS so that way you can map that domain
to your local host without having to mess with dns or anything and simulate
a production environment (that HOSTS file is quite intersting, try the entry
"216.136.171.205 microsoft.com" and then visit microsoft.com, you'll be
surprised... =) (NOTE TO VIRUS CREATORS: That would be an interesting
hack...to add an entry to the hosts file that does that mapping...oh...that
would get the big BG mad...)

After you've been doing this for a little while, you'll have to get an old
box (like P200 or something) to stick linux on and have that be your dev
server...your EYES will be opened...trust me, the MS empire won't always be
as vast as it is, TUX is alive and moving!)

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] NT5 Sub Domains



Jonathon,

Thanks so much for your help!!  Okay, I have downloaded and installed
Apache.  And to my utter surprise...it's working!!  You're right, the fact
that it does not have a GUI is the reason I was scared of it.  =)

I set the Apache Port option to 8080.  Is that good?  I stopped the IIS
service.  And now I can't get it to restart, not sure why...

I set Bind to *

Should I set the ServerName directive to domain.dev?  Or does this have to
be done in the HOSTS file you mentioned?


This is really sweet.  =)




>From: "Jonathan Sharp" <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: RE: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 14:14:59 -0800
>
>Ah...yes you can. You're probably scared of apache because it doesn't have
>a
>GUI! But don't fret I was in the same boat not too long ago!
>
>1) Download the lastest version of apache (www.apache.org you were
>close...)
>2) Install apache (it does have an installation program)
>3) Configuring apache
>To configure apache you need to edit the httpd.conf file (I suggest you
>create a backfirst!) it's pretty self explanatory, there's lots of
>documentation for it. You can run both IIS and Apache as long as they're
>not
>running on the same ports (eg :80, so either disable the web server for IIS
>on port 80 (or change it to something like 64892) or make apache run on
>some
>other port (you set this in httpd.conf under the Port option)) So after
>you've setup your httpd.conf file, you'll start apache from the command
>line
>(you may scream now if you'd like...this is where MS is...MS...) you run
>the
>apache deamon with a command like C:\path\to\apache.exe start
>C:\path\to\httpd.conf It's something similar to that, the command prompt
>window will stay open and you won't be able to do anything in that window,
>so to shut down apache, open a new window and do the C:\path\to\apache.exe
>stop (I haven't done this on NT in a while so those commands are probably
>wrong but it should be the right direction)

>4) To setup subdomains (this is the good part)
>If you want to actually setup domain.com to develop on locally and the site
>isn't "online" you can add an entry to your hosts file (somewhere in
>C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
>bogus TLD like domain.dev) and that will redirect all requests for
>domain.xxx to your local apache server (assuming you've set Bind to * in
>the
>httpd.conf file to listen to all IPs) For the actual subdomains you'd set
>these in the httpd.conf file under VirtualDirectories (you can either do
>Name based subdomains (one IP bound to NIC & multiple domains) or IP based
>subdomains (multiple IPs bound to NIC & multiple dom

RE: [PHP] NT5 Sub Domains

2001-01-27 Thread Jonathan Sharp

Brian! You're not helping here, i'm in the middle of a conversion! I'm
trying to help this guy find his destiny! Com'on!

rswfire: You want to get used to the command line, trust me!

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:52 PM
To: PHP is not a drug .
Subject: Re: [PHP] NT5 Sub Domains



Hello rswfire,

(r == "[ rswfire ]") [EMAIL PROTECTED] stated:

r> You're right, the fact that it does not have a GUI is the reason I
r> was scared of it. =)



>>(you may scream now if you'd like...this is where MS is...MS...) you
>>run the apache deamon with a command like C:\path\to\apache.exe
>>start

Good lord! That was a lot of trimming for quoted material. :)

Anyway, you can also use Apache Manager from the Windows Tray to stop
and start Apache (without any annoying MS-DOS windows).

http://brian.threadnet.com

It's written by Brian Moon. The same guy who authored Phorum.

-Brian



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




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




RE: [PHP] NT5 Sub Domains

2001-01-27 Thread Jonathan Sharp

Yeah, well all have our preferences...and the NT command line is NOTHING
like a good *nix one, so I guess I'll agree that the GUI is approvable by
me. =)

I would install it, I think that would take one less step out of getting to
developing when you boot your box!

-Jonathan

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 3:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] NT5 Sub Domains


Thank you Brian and Jonathon.  You are both very helpful!!  I think I like
the idea of a tray icon -- rather than an annoying DOS window I cannot get
rid of from my task bar!  =)

No offense, Jonathon...  I agree, I need to work on my command line
skills...

Should I install Apache as a service on NT??  Then it starts automatically,
right?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




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




RE: [PHP] Apache -> PHP 4 (CGI)

2001-01-27 Thread Jonathan Sharp

Da...this one has stumped me...in *nix I'd just say compile it into Apache,
but we can't do that now can we...bummer, looks like a design flaw of NT...
8-)

-Jonathan

P.S. Now I must say, I am running 2K on this box here, and am using outlook
(go ahead and bash me) but that's all I use it for (except for photoshop,
fireworks, and such...) but I'll give linux another year or so to catch
up...it's definatly gaining...

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Apache -> PHP 4 (CGI)


I currently have PHP4 installed as a CGI on my NT5 computer.  It works with
IIS5.  I just installed Apache and it's working.  =)  But how can I make it
see my CGI version of PHP
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




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




RE: [PHP] Invoke PHP script from onLoad handler?

2001-01-27 Thread Jonathan Sharp

I wrote a browser based application (yes it is an application!) (but I can't
let you see it cause it's propriatary technology) but the client side was
javascript and I had PHP save the data and read data...

I won't go into detail, but basically I had PHP print JavaScript, and then
have a variable in the main window that the child window would save the new
data to...

for example, have the javascript (which PHP generates) be something like

var DATAARY = new Array();
DATAARY[0] = 'Some data';
DATAARY[1] = 'Some data';
DATAARY[2] = 'Some data';
DATAARY[3] = 'Some data';
window.parent.document.MAINDATAARY = DATAARY;

It was something to that extent, it works quite nicely, and it definetly
pushes the limits of the technology used.

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-Original Message-
From: Chuck Mayo [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 4:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Invoke PHP script from onLoad handler?


OK, I've gone back through the archives and now understand the situation
with client- and server-side. I just wasn't thinking it through.

Spawning a window to let PHP query the db and somehow passing returned
values back to the parent window is something I could do, I suppose, but
it seems that what I and the other zillion people who keep asking the
same question need is a way to get to our databases using a client-side
technology like Javascript.

I recognize the shortcomings of client-side stuff like compatility
issues and on/off preferences and in this case am willing to let the
user take some reponsibility for his browsing experience.

Now I'm completely off-topic, but does anyone have any ideas regarding
database access with Javascript, perhaps by having JS run a shell or
perl script? How would JS get the values back? Something like

function getdb () {
   var mylist = execute.some.remote.program(./getmysqldata.pl);
   }

With all the traffic on this type of request, I'm surprised the FAQ
doesn't take
up the subject.

Thanks,
Chuck

- Original Message -
You *can* have a JavaScript handler invoke PHP -- but it requires
accessing
a URL and waiting for the web-server to respond, so your response time
will
not be so hot.

I'm afraid I don't recall how, but it has been posted here before...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Chuck Mayo <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, January 26, 2001 10:10 AM
Subject: [PHP] Invoke PHP script from onLoad handler?


> Sorry if this has come up before.
>
> I want to update a select list from a mySql database whenever the
> browser window gets the focus. This is because I anticipate that the
> user will frequently use a second window to make additions to the
> database that holds the list values while filling in the form, and I
> want those additions to be in the select list when the user returns.
>
> At present I have PHP querying the db before I output the body tag,
and
> an onLoad() handler passes the returned records to a Javascript which
> populates the list box with the query results, but I have only figured

> out how to query the db when the page initially loads. I really need
to
> query the db and invoke the Javascript every time the window gets
focus.
>
> So, I guess my question is twofold: can I invoke a php function with
an
> onLoad handler, and if so, how can I have onLoad do both things - run
> the php function to query the database, then run the Javascript to
> populate the list box? Or is there another way?
>
> TIA,
> Chuck Mayo




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




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




RE: [PHP] Problem with a regex!

2001-01-27 Thread Jonathan Sharp

what's the value of var? It appears that it doesn't have a value set.

-Jonathan

-Original Message-
From: Zack Ham [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with a regex!


I'm trying to create a small template parser so I can fill my html pages up
with data.  An example:  {title} http://sect0r.com

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




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




RE: [PHP] JavaScript/PHP Function -> Apache/IIS5 -> Client Properties

2001-01-27 Thread Jonathan Sharp

Hm...I'm not sure I completely understand...but I believe that you're trying
to gather as many stats from the client as possible?

What about having a page that is somewhat transparent to the user (if they
support JS) that you have something like this...


function GetProperties()
{
document.theform.cVersion.value = navigator.appVersion;
etc...
document.theform.submit();
}







Welcome to my beautiful site! One moment please...


Then you'd have mainpage.php checkthrough all those values, and possibly
dump them into a DB and create a SESSIONID which each page thereafter uses
the sessionid to lookup the client settings from the db and build the page
based upon that? Depending on how long it takes to set all the hidden fields
and submit the form, it might even be transparent to the user...or...you
might just have a generic front page if no session id is set and popup
window that has all that java script and say something line "Customizing for
YOU!" and then have that page POST to itself and then have the window close
it self (and you've set a cookie with the session id of course) so then each
page that he visits thereafter has the session id set. And you can customize
for him/her...

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] JavaScript/PHP Function -> Apache/IIS5 -> Client
Properties


I need to get a whole bunch of client properties from a visitor on my site
before a page is displayed.  I do this using JavaScript.  I first determine
if the visitor's browser supports JavaScript, and if it does I run a
function that basically builds a temporary page and returns a bunch of
client properties for me.

Here's the code:

if ($Browser_JavaScriptOK == TRUE)
{

echo "";
echo "";
echo "[ Swift eNetwork ] eNetWizard : 
Determining Client
Properties";
echo "";
echo "function GetProperties()";
echo "{";
echo
"window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_N
AME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCod
eName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVe
rsion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(nav
igator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvai
lHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availW
idth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(scree
n.height)+\"&cWidth=\"+escape(screen.width)+\"&cPixelDepth=\"+escape(screen.
pixelDepth));";
echo "}";
echo "";
echo "";
echo " ";
echo "";
echo "";
exit;

}


This code is run and then goes back to the calling page with all of the
variables.  I then process the variables and put them into a class and build
the page.

This works on IIS5, but when I try to do this on Apache, it freezes up and
after a time comes back with an error message saying PHP.EXE did something
wrong and will be closed.

Can anyone tell me what is happening?  Do you know of any other way to
reliably return client properties?

Thankz...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




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




RE: [PHP] Leads>?

2001-01-27 Thread Jonathan Sharp

All I have to say about his one is: "Your mother was a hamster and your
father smelled of elderberries. I fart in your general direction and I wave
my private parts at your ante you silly English kA nigh It!"

No spam please.

Thank you.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 6:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Leads>?



BUY LEADS WHOLESALE FROM US FOR YOUR BUSINESS

http://www.geocities.com/leadoffers1900/leads.htm

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



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




RE: [PHP] E Bay is going up again..

2001-01-27 Thread Jonathan Sharp

Do I have to repeat myself about this topic? Sheesh!

-Codeboy

-Original Message-
From: tabathia [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 11:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] E Bay is going up again..


Selling on eBay is getting a little more expensive...the more 

you sell the more profit they make!

Are you tired of eBay and their price hikes?

Looking for an alternative?

Then we have just what you are looking for at a fraction of the cost!

Our Motto, The More YOU sell the more Profit YOU make...

For more complete details about this incredible offer, please respond to:

   [EMAIL PROTECTED]
 
With the words "more info" in the subject line.


Thank You

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





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




RE: [PHP] Apache Server

2001-01-27 Thread Jonathan Sharp

how long does it run for?

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 8:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Apache Server


How come my Apache Server goes down after a short time and forces me to 
restart it?  Shouldn't it just stay active?!
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




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




RE: [PHP] Apache/PHP Configuration Problem on NT5

2001-01-29 Thread Jonathan Sharp

Hey, have you tried just a static .html file, no php anywhere?

-Jonathan

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 28, 2001 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Apache/PHP Configuration Problem on NT5


I have set up an ErrorDocument 404 in httpd.conf to point to a PHP file in
the root of my documents.  It was working, now suddenly it has stopped
working.  Here's the scenario:

When I attempt to view a page that is not there, I receive a 500 Internal
Error Message, as follows:



Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them
of the time the error occurred, and anything you might have done that may
have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.14 Server at swifte.dev Port 8080



If I look at the error log, I find the following line:

[Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of
script headers: c:/program files/php/php.exe



Any ideas on how to fix this problem?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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





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




[PHP] PEAR?

2001-01-29 Thread Jonathan Sharp

I came across http://pear.php.net/ So what is this? I found this in the PHP
Developers Cookbook by SAMS...Right now it only has a few documentation and
coding standards...are there more plans for this?

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


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




RE: [PHP] $DOCUMENT_ROOT

2001-01-29 Thread Jonathan Sharp

define('DOCUMENT_ROOT', 'C:\path\to\document\root');
NOTE! This would define a global variable to all your scripts without the $
dollar sign.

include(DOCUMENT_ROOT."/folder/file.php");

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-Original Message-
From: CC Zona [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 5:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $DOCUMENT_ROOT


In article <039901c08a48$3d4b5740$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Toby Miller") wrote:

> Whenever I include files in Apache I always do it like this:
>
> include($DOCUMENT ROOT."/folder/file.php");
>
> However, now I am doing a site in IIS and I do not have $DOCUMENT ROOT at
> my disposal. What do most of you usually do to workaround this? Aside from
> installing Apache and Linux and bypassing the whole Windows thing :)

Why not either include the doc root in the include_path of php.ini? Or
define you own DOCUMENT_ROOT constant?

--
CC

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




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




[PHP] ' VS "

2001-01-29 Thread Jonathan Sharp

I read somewhere that when PHP encounters a single quote ' it doesn't parse
the contents for any variables or such...but if it encounters the double
quote " it does. How much of a performance increase (very very very very
small I'd imagine) would this provide? Any thoughts on coding style?

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


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




RE: [PHP] Dynamic Variable Creation from Forms

2001-01-31 Thread Jonathan Sharp

have you thought about creating an array of the variables? "chk[$row]" and
then you'd read 'em back like chk["aaa"] or chk["bbb"] or you could loop
through the array with a each statement...

but for variable variables...try ${"chk_".$row}["field"] which should
work...

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 4:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Dynamic Variable Creation from Forms


Thanks for your response, but that's not my problem.  I'll explain
further...

I have a table with the following fields in a row:

aaa
bbb
ccc
ddd
eee

I have a page with a form:


mysql_db_query($db, "SELECT * FROM table");
while ($row = mysql_fetch_array($result))
{

   echo "";

}

This will create several checkboxes with the following names:

chk_aaa
chk_bbb
chk_ccc
chk_ddd
chk_eee

ON THE NEXT PAGE, AFTER THE SUBMIT BUTTON IS CLICKED, THESE VARIABLES WILL
EXIST, but I cannot refer to them like this:

$chk_$row["field"]

How can I refer to them???  They can change based on the field data, so they
cannot be considered static variables.






Not *sure* i understand the problem, but this may be the solution:

$foo = "hello";
$bar = "foo";
$foobar = $$bar;

$foobar now contains "hello".

Gfunk -  http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


- Original Message -
From: "[ rswfire ]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 11:28 AM
Subject: [PHP] Dynamic Variable Creation from Forms


>I have a problem I'm not sure how to fix.
>
>PART I
>
>I have a form on a page that creates its variables dynamically.  Here's an
>example:
>
>mysql_db_query($db, "SELECT * FROM table");
>while ($row = mysql_fetch_array($result))
>{
>
>   echo "";
>
>}
>
>PART II
>
>I need to make reference to these dynamically created variables.  How do I
>do this?  This does not work, obviously:
>
>$chk_.$row["checkboxtype"]
>
>Thanks in advance...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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



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




RE: [PHP] Pricing for PHP programming???

2001-01-31 Thread Jonathan Sharp

I hear ya' on those multi tallented skills you got...same here, but I on my
resume I've only put my programming skills...I just let them find out about
all that *other* stuff later...it makes for a good reason for a raise =)

-Jonathan

> -Original Message-
> From: Josh G [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 5:52 PM
> To: PHP User Group
> Subject: Re: [PHP] Pricing for PHP programming???
>
>
> I hear you. Another thing that's hard to find, is somebody who is a
> good programmer, and a good graphic designer. I don't really know
> any, apart from myself, and I've been just shy of being called a lying
> scumbag by a few HR companies over the years when they look at
> my resume ;-)
>
> This thread has really fired up my desire to go the states US$80
> an hour for php dmn, that's a shitload more than I
> make here, which is more like US$20/hr
>
> Gfunk -  http://www.gfunk007.com/
>
> I sense much beer in you. Beer leads to intoxication, intoxication to
> hangovers, and hangovers to... suffering.
>
>
> - Original Message -
> From: "Jonathan Sharp" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 01, 2001 12:49 PM
> Subject: RE: [PHP] Pricing for PHP programming???
>
>
> > I find this an interesting topic...
> >
> > One thing that we've found when looking for additional PHP
> programmers to
> > add is that since PHP has exploded there are a lot of people out there
> > coding in PHP that don't have a background in programming or some of the
> > design considerations. We've looked at various places from
> techies.com to
> > guru.com and haven't found that many PHP gurus out there. So in terms of
> > skill level, what do you all see the going rate? I know I'm currently
> > underpaid at $25/hour and I do ALL the PHP programming, project
> management,
> > engineering, database theory etc...oh...and did I mention I do all the
> > network support too? (I'm taking my CCNA in June...) so yeah...we're a
> > starup what did you expect?! =)
> >
> > Comments?
> >
> > Disclaimer: I don't mean to offend anyone out there who codes
> in PHP. But
> > from the experience that I've had trying to find someone who can really
> code
> > clean, effecient stuff that plugs into the whole picture has been
> virtually
> > non-existent...(if you do, please call! We have a few openings!)
> >
> > Thanks,
> > -Jonathan Sharp
> >
> > Director of Technology - Imprev Inc.
> > Renwick Development Group - Flyerware
> > http://www.flyerware.com/
> > Phone: (425)688-9200
> > Cell: (425)766-1398
> >
> > -Original Message-
> > From: Philip Olson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 31, 2001 5:40 PM
> > To: Shane McBride
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Pricing for PHP programming???
> >
> >
> >
> > Hey Shane,
> >
> > This is a tricky issue, here's me (USD):
> >
> >   $60/hr
> >   $30/hr if end result becomes open sourced (no strings)
> >
> > General discounts for features such as : fun,true non-profit,intelligent
> > employer,learning curve and it all lives on a sliding scale depending on
> > their ability to pay and my desire for work/money (time).  Also, barter
> > is usually an option.  Usually hovers between 30-50 and one day
> this will
> > go up :-)  This is the most difficult part of the job, time estimates
> > and pricing.  Bah.  "Just give me money and I'll do stuff."
> >
> > Regards,
> >
> > Philip Olson
> > http://www.cornado.com/
> >
> >
> > > On Wed, Jan 31, 2001 at 03:25:27PM -0500, Shane McBride wrote:
> > > I know this is not really a PHP question, but it should make
> for a good
> > > thread. :)
> > >
> > > I was wondering what other PHP people charge to write PHP? I have just
> > > been given a project for a fairly large customer, much larger than I
> > > normally do work for. So I am VERY confused.concerned about
> how to price
> > > it. Most of my other PHP projects have been done for small
> single owners
> > > businesses, and the PHP has been pretty basic.
> > >
> > > Now that I can actually do what I am being asked without have to learn
> > > it, I am stuck. I did a shopping cart for someone, but I didn't charge
> > > them a REAL price because I didn't know how to do it with
> PHP. S

RE: [PHP] Pricing for PHP programming???

2001-02-01 Thread Jonathan Sharp

I find this an interesting topic...

One thing that we've found when looking for additional PHP programmers to
add is that since PHP has exploded there are a lot of people out there
coding in PHP that don't have a background in programming or some of the
design considerations. We've looked at various places from techies.com to
guru.com and haven't found that many PHP gurus out there. So in terms of
skill level, what do you all see the going rate? I know I'm currently
underpaid at $25/hour and I do ALL the PHP programming, project management,
engineering, database theory etc...oh...and did I mention I do all the
network support too? (I'm taking my CCNA in June...) so yeah...we're a
starup what did you expect?! =)

Comments?

Disclaimer: I don't mean to offend anyone out there who codes in PHP. But
from the experience that I've had trying to find someone who can really code
clean, effecient stuff that plugs into the whole picture has been virtually
non-existent...(if you do, please call! We have a few openings!)

Thanks,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398

-Original Message-
From: Philip Olson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 5:40 PM
To: Shane McBride
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pricing for PHP programming???



Hey Shane,

This is a tricky issue, here's me (USD):

  $60/hr
  $30/hr if end result becomes open sourced (no strings)

General discounts for features such as : fun,true non-profit,intelligent
employer,learning curve and it all lives on a sliding scale depending on
their ability to pay and my desire for work/money (time).  Also, barter
is usually an option.  Usually hovers between 30-50 and one day this will
go up :-)  This is the most difficult part of the job, time estimates
and pricing.  Bah.  "Just give me money and I'll do stuff."

Regards,

Philip Olson
http://www.cornado.com/


> On Wed, Jan 31, 2001 at 03:25:27PM -0500, Shane McBride wrote:
> I know this is not really a PHP question, but it should make for a good
> thread. :)
>
> I was wondering what other PHP people charge to write PHP? I have just
> been given a project for a fairly large customer, much larger than I
> normally do work for. So I am VERY confused.concerned about how to price
> it. Most of my other PHP projects have been done for small single owners
> businesses, and the PHP has been pretty basic.
>
> Now that I can actually do what I am being asked without have to learn
> it, I am stuck. I did a shopping cart for someone, but I didn't charge
> them a REAL price because I didn't know how to do it with PHP. So, I of
> course didn't charge the client for my learning curve.
>
> I know the price is very dependant upon the task. What I am doing is
> creating a web-based front-end for a MySQL database. I'll need to create
> the database tables, etc. The front-end is going to be rather dynamic
> since the data content depends largely on the previous choices of the
> end-user. One or two tables with 20-30 fields. 5-6 pages of html and
> PHP.
>
> I'm just scouting this out, and am VERY confident with the contributors
> to this list and their opinions.
>
> TIA,
> Shane


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




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




RE: [PHP] Pricing for PHP programming???

2001-02-01 Thread Jonathan Sharp

Yeah, I'm consulting though...but yes there are some other options...where
does it say $80/hour in the US?!

-Jonathan

> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 6:05 PM
> To: Josh G
> Cc: PHP User Group
> Subject: Re: [PHP] Pricing for PHP programming???
>
>
>
> One thing to keep in mind is we're mixing up contract jobs and "real" jobs
> with contract jobs usually being much higher rates.  Not sure on any
> specifics though but real jobs are pretty secure, eight hours a day ... so
> it's a tradeoff.  Most (if not all) quotes thus far are in regard to
> contract jobs.
>
> Philip
>
> On Thu, 1 Feb 2001, Josh G wrote:
>
> > I hear you. Another thing that's hard to find, is somebody who is a
> > good programmer, and a good graphic designer. I don't really know
> > any, apart from myself, and I've been just shy of being called a lying
> > scumbag by a few HR companies over the years when they look at
> > my resume ;-)
> >
> > This thread has really fired up my desire to go the states US$80
> > an hour for php dmn, that's a shitload more than I
> > make here, which is more like US$20/hr
> >
> > Gfunk -  http://www.gfunk007.com/
> >
> > I sense much beer in you. Beer leads to intoxication, intoxication to
> > hangovers, and hangovers to... suffering.
> >
> >
> > - Original Message -
> > From: "Jonathan Sharp" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 01, 2001 12:49 PM
> > Subject: RE: [PHP] Pricing for PHP programming???
> >
> >
> > > I find this an interesting topic...
> > >
> > > One thing that we've found when looking for additional PHP
> programmers to
> > > add is that since PHP has exploded there are a lot of people out there
> > > coding in PHP that don't have a background in programming or
> some of the
> > > design considerations. We've looked at various places from
> techies.com to
> > > guru.com and haven't found that many PHP gurus out there. So
> in terms of
> > > skill level, what do you all see the going rate? I know I'm currently
> > > underpaid at $25/hour and I do ALL the PHP programming, project
> > management,
> > > engineering, database theory etc...oh...and did I mention I do all the
> > > network support too? (I'm taking my CCNA in June...) so yeah...we're a
> > > starup what did you expect?! =)
> > >
> > > Comments?
> > >
> > > Disclaimer: I don't mean to offend anyone out there who codes
> in PHP. But
> > > from the experience that I've had trying to find someone who
> can really
> > code
> > > clean, effecient stuff that plugs into the whole picture has been
> > virtually
> > > non-existent...(if you do, please call! We have a few openings!)
> > >
> > > Thanks,
> > > -Jonathan Sharp
> > >
> > > Director of Technology - Imprev Inc.
> > > Renwick Development Group - Flyerware
> > > http://www.flyerware.com/
> > > Phone: (425)688-9200
> > > Cell: (425)766-1398
> > >
> > > -Original Message-
> > > From: Philip Olson [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 31, 2001 5:40 PM
> > > To: Shane McBride
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Pricing for PHP programming???
> > >
> > >
> > >
> > > Hey Shane,
> > >
> > > This is a tricky issue, here's me (USD):
> > >
> > >   $60/hr
> > >   $30/hr if end result becomes open sourced (no strings)
> > >
> > > General discounts for features such as : fun,true
> non-profit,intelligent
> > > employer,learning curve and it all lives on a sliding scale
> depending on
> > > their ability to pay and my desire for work/money (time).
> Also, barter
> > > is usually an option.  Usually hovers between 30-50 and one
> day this will
> > > go up :-)  This is the most difficult part of the job, time estimates
> > > and pricing.  Bah.  "Just give me money and I'll do stuff."
> > >
> > > Regards,
> > >
> > > Philip Olson
> > > http://www.cornado.com/
> > >
> > >
> > > > On Wed, Jan 31, 2001 at 03:25:27PM -0500, Shane McBride wrote:
> > > > I know this is not really a PHP question,

RE: [PHP] contracting & consulting (was "[PHP] Pricing for PHP pr ogramming???")

2001-02-01 Thread Jonathan Sharp

because that's too easy! Why would we want to use a system that's already in
place? hehehe...looks good! I think it'd be best to have PHP jobs listed at
THE PHP.NET site...got my vote!

-Jonathan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 2:47 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] contracting & consulting (was "[PHP] Pricing for PHP
> pr ogramming???")
>
>
> On Thu, Feb 01, 2001 at 04:47:31PM -0600, [EMAIL PROTECTED] wrote:
> > I have implemented a PHP Developer's directory at
> > http://www.phpusergroups.org where you can sign up to the directory
> > and wehen people are looking for spot jobs you will receive a RFG
> > (request for quotes).
>
> Why do you not contact Brian Schaffner? On http://php.net/links.php there
> is a link to his "PHP Employment List".
>
> Another suggestion, why not jobs.php.net?  I think Rasmus doesn't have
> other opinions.
>
> -Egon
>
> --
> http://www.linuxtag.de/
> http://php.net/books.php
> http://www.concert-band.de/
> http://www.php-buch.de/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>


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




[PHP] SQL Statments?

2001-02-05 Thread Jonathan Sharp

If I have a text file with all my sql statements (from like say mysqldump)
what's the easiest way of passing them to mysql? I'm on RedHat6.2 with mysql
3.22.32

Thanks,
-Jonathan


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




RE: [PHP] Getting ASPELL to work?

2001-02-07 Thread Jonathan Sharp

I believe that aspell is somewhat outdated now...try pspell...(which uese
aspell..check php.net docs)

-codeboy

> -Original Message-
> From: Sam Masiello [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 11:23 AM
> To: Nicholas Pappas
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Getting ASPELL to work?
>
>
>
> When you compile PHP, you also need to include the --with-aspell flag
> (similar to how you did to include MySQL support).
>
> HTH
>
> --
> Sam Masiello
> Systems Analyst
> Chek.Com
> (716) 853-1362 x289
> [EMAIL PROTECTED]
>
> On 2001.02.07 14:19:38 -0500 Nicholas Pappas wrote:
> > Is there a secret to get the 'aspell_*' functions to work?  I
> > tried
> > running one and got a 'unsupported function' error. :(
> >
> > I am running a RH7.0 system with PHP3.  Aspell is installed on
> > the
> > system, but I did not do anything special at compile time (except MySQL
> > support).  Is there a compile time tag I need to set in order
> to get the
> > aspell functions to work (couldn't find on in the docs).
> >
> > Many thanks for any help!!
> >
> > Nick
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>


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




RE: [PHP] To The Hacker: CodeBoy

2001-02-08 Thread Jonathan Sharp

Ok, I just checked my mail and found this thread... to clear this up...

In one of your posts you posed a url to a script you were working on...and I
backed up a directory and it gave me a directory listing...one folder was
/admin/ it gave another listing...then showed phpMyAdmin and then it gave
your full db schema...no passwords or anything...i was able to insert a
record...and a user to your mysql server... password is (abc123) that's all
i did...nothing else...and i'd hardly consider that a hack...more of a
"browse"

Cheers,
-Jonathan
aka: "Codeboy the *dangerous* hacker"

> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 4:24 PM
> To: James, Yz
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] To The Hacker: CodeBoy
>
>
> > True, but none of which are applicable to me, as I've not
> slandered, defamed
> > or spoofed anything or anyone.  As far as hacking is concerned,
> I wouldn't
> > know my arse from my elbow :)
>
> just a fyi, my post had nothing to do with you.  or the other james (which
> that line you're referring too had to do with) but rather, that of the
> person in question ("hacker").  but anyway, let's let this thread die.
> it's time.
>
> Philip
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




RE: [PHP] To The Hacker: CodeBoy

2001-02-08 Thread Jonathan Sharp

P.S. in your phpMyAdmin config.inc.php file line 13 set:
$cfgServers[1]['adv_auth'] = true;
then you won't have any problems...

-codeboy

> -Original Message-
> From: rswfire [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 3:20 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] To The Hacker: CodeBoy
> 
> 
> Whatever, James.
> 
> The hackers name is Jonathan Sharp.  He is a
> regular member of this mailing list.  I do
> believe that people here would like to know they
> have a hacker on their hands, don't you think? 
> It would appear the friendly Jonathan has another
> side to himself...
> 
> Codeboy:
> Jonathan Sharp
> Director of Technology - Imprev Inc.
> Renwick Development Group - Flyerware
> [EMAIL PROTECTED]
> 
> 
> 
> --- James Moore <[EMAIL PROTECTED]> wrote:
> > 
> > >
> > > Today I noticed an entry in my database with
> > the
> > > username "codeboy" and the password "hacked"
> > in
> > > one of the authorization tables I have
> > created.
> > > I am shocked that someone could be so
> > malicious
> > > and insensitive!  I am programming locally; I
> > > realize there may be some security
> > > vulnerabilities during this time, but when I
> > go
> > > live with my network this will not be the
> > case.
> > > If any further attempts are made to hack into
> > my
> > > system I will clearly take the time to
> > retaliate
> > > against you.  Let this be your only warning.
> > >
> > 
> > This is not the place to take these issues up.
> > Please email privatly and
> > complain to the appropriate authrities, the
> > PHP-General list is not the
> > place for this.
> > 
> > James
> > --
> > James Moore
> > PHP QA Team
> > [EMAIL PROTECTED]
> > 
> 
> 
> =
> =
>  [ rswfire ]
> 
>   http://rswfire.swifte.net/
>   http://profiles.yahoo.com/rswfire
> 
> =
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 
> 

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




  1   2   >