Re: [PHP] testing

2001-07-05 Thread Chris \"TunkeyMicket\" Watford

Was 100% done, now 70% done as a hard-drive crash set me back a bit...

Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

- Original Message -
From: "ReDucTor" <[EMAIL PROTECTED]>
To: "Chris "TunkeyMicket" Watford" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 3:10 AM
Subject: Re: [PHP] testing


> Hey, how is micket pro going?
> - Original Message -
> From: Chris "TunkeyMicket" Watford <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 06, 2001 4:41 PM
> Subject: Re: [PHP] testing
>
>
> > Hi2u ReDucTor
> >
> > Chris "TunkeyMicket" Watford
> > 
> > TunkeyMicket Productions
> > www.tunkeymicket.com
> >
> > - Original Message -
> > From: "ReDucTor" <[EMAIL PROTECTED]>
> > To: "McShen" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 05, 2001 11:13 PM
> > Subject: Re: [PHP] testing
> >
> >
> > > I'm on my way to Mars atm...
> > > - Original Message -
> > > From: McShen <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, July 06, 2001 1:09 PM
> > > Subject: [PHP] testing
> > >
> > >
> > > > where are u guys?
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >


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

2001-07-05 Thread Chris \&quot;TunkeyMicket\" Watford

Hi2u ReDucTor

Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

- Original Message -
From: "ReDucTor" <[EMAIL PROTECTED]>
To: "McShen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:13 PM
Subject: Re: [PHP] testing


> I'm on my way to Mars atm...
> - Original Message -
> From: McShen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 06, 2001 1:09 PM
> Subject: [PHP] testing
>
>
> > where are u guys?
> >
> >
> >
> > --
> > 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] passing values to a javascript variable

2001-06-22 Thread TunkeyMicket

echo ""
."\n\tvar ndata = '".addslashes($data_data)."';"
."\n\tPutCode(ndata);"
."\n";

Try that.

Chris "TunkeyMicket" Watford

TunkeyMicket Productions
www.tunkeymicket.com

- Original Message - 
From: "Romulo Roberto Pereira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 3:38 PM
Subject: [PHP] passing values to a javascript variable


> Hello!
> 
> The following give me: unterminated string constant (this is a javascript
> error)
> 
> when I execute the following:
> 
>while ($row = mysql_fetch_array ($data_query_action)) {
> $data_data = $row["data_data"];
>}
> echo "\n var
> ndata=\"".addslashes($data_data)."\";\nPutCode (ndata);\n";
> 
> Ideas? Please I need help.
> 
> Thank you,
> 
> Rom
> 
> 
> -- 
> 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] Forum script

2001-06-22 Thread Chris \&quot;TunkeyMicket\" Watford



His date is wrong, not your client's fault.  I 
just thought the time was off, didn't see the date too.

  - Original Message - 
  From: 
  Morgan 
  Curley 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, June 21, 2001 8:49 
  AM
  Subject: Re: [PHP] Forum script
  In what timezone is it September?At 02:49 
  AM 6/21/2001, Chris \"TunkeyMicket\" Watford wrote:
  Timezones 
:) 

  - Original Message - 
  From: Morgan Curley 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, June 20, 2001 10:16 PM 
  Subject: RE: [PHP] Forum script
  Is it just me or does anyone else get a lot of messages on this list 
  with dates in the future ( note the date below ) that then end up pinned 
  to the bottom ( or top ) of the email listing. Is there some way to set 
  the listserv to normalize the dates or is the just a Eudora4+ 
  problem?
  At 03:41 PM 9/20/2001, Andrew Hill wrote:
  
www.phorum.org
Best regards, 
Andrew


Re: [PHP] Forum script

2001-06-21 Thread Chris \&quot;TunkeyMicket\" Watford



Timezones :)

  - Original Message - 
  From: 
  Morgan 
  Curley 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, June 20, 2001 10:16 
  PM
  Subject: RE: [PHP] Forum script
  Is it just me or does anyone else get a lot of 
  messages on this list with dates in the future ( note the date below ) that 
  then end up pinned to the bottom ( or top ) of the email listing. Is there 
  some way to set the listserv to normalize the dates or is the just a Eudora4+ 
  problem?At 03:41 PM 9/20/2001, Andrew Hill wrote:
  www.phorum.orgBest 
  regards,Andrew


Re: [PHP] Problem starting session

2001-06-21 Thread Chris \&quot;TunkeyMicket\" Watford

Make sure it is: \tmp in the ini file.  That way you don't have to mess with
a drive letter.

- Original Message -
From: "Jonathan Sharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 7:57 PM
Subject: Re: [PHP] Problem starting session


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


-- 
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] Another Template Engine (code)

2001-06-21 Thread TunkeyMicket



    That is awesome, I never got 
into hash tables, seeing as how the extent of my perl is validating and emailing 
forms.  I am currently porting the template engine to a class, so I can 
overload alot of the options, like check if it is an array being sent to 
__registerWatch and act accordingly.  You have given me a few ideas, and I 
think I might extend my engine a bit [no hash tables :P]
 
Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com
 
BTW: with the $uid system they never collide, just 
like file handles never collide :) I thought about using a unique id system 
based off of random numbers, but after a very long IRC argument i just used the 
empty brackets to add a new member.

  - Original Message - 
  From: 
  scott 
  [gts] 
  To: php 
  Sent: Wednesday, June 20, 2001 5:29 
  PM
  Subject: [PHP] Another Template Engine 
  (code)
  
  i 
  wrote a simple classified and hash-enabled 
  template engine
  as a 
  sort-of proof of concept placeholders in the template
  are 
  denoted by %{name}% and they're filled with data by
  the 
  "regvar()" func.  $temp->regvar('name', 'value');
   
  1) 
  class the engine so that you cay have multiple 
  instances of different templates and not worry 
about
  them 
  colliding or corrupting each other.
  example:
  $temp1 = new template("filename")
  $temp1->regvar('THIS', 'Some text');
  $temp1->tprint();
   
  2) 
  put support for hashes of values so you dont
  have 
  to call regvar() for each and every var, you
  can 
  simply submit a hash to the template and it'll
  traverse through it
  example:
  $assoc_array('name'=>'scott', 
  'age'=>'99');
  
  $temp1->hash($assoc_array);
  will properly replace %{name}% and 
  %{age}%
  with "scott" and "99"
   
   
  Attached 
  files to this email are:
  
  template.php - the template 
  class
  test.template.php - the calling php 
  script
  test.template.html - a test 
  template
   
  put them all in the same dir and call 
  'test.template.php'
  to see the test script.
   
  
-Original Message-From: TunkeyMicket 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 
2001 11:47 AMTo: [EMAIL PROTECTED]Subject: 
[PHP] Template Engine
Since so many of you are asking for help w/ a 
template engine of some sort I have included the one I use for my mail 
program.  I have not tested it with large amounts of text, but it is 
    able to handle some very large strings.  It has its own documentation, 
and if anyone needs any help setting it up I'd be willing to 
help.
 
Chris "TunkeyMicket" Watford

TunkeyMicket Productions
www.tunkeymicket.com
 
Attached: 
  mp_template_engine.php
  
  

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


Re: [PHP] a DOT or a BLANK SPACE

2001-06-20 Thread TunkeyMicket

IMO that is a bad way to name them, why Num. and Home Address, if you
explained the reason for needing these names maybe we could better help you.

Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

- Original Message -
From: "Jaime Torres" <[EMAIL PROTECTED]>
To: "[PHP] General List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 4:17 PM
Subject: [PHP] a DOT or a BLANK SPACE


> Hi. We HAVE TO use names like Num. or Home Address in for our input tags
in
> the forms. That is:
>
> 
> 
>
> When I receive the info in my PHP file, after the form has been posted,
the
> variable name I get is: 'Num '. So, the dots are being replaced for a
blank
> space. I can't take for granted that any blank space is a dot since my
> inputs names are using them.
>
> How can I identify between this two variable names?
>
> Thanks for your help!
>
> Regards,
> Jaime
>
>
> --
> 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] Template Engine

2001-06-20 Thread TunkeyMicket



Since so many of you are asking for help w/ a 
template engine of some sort I have included the one I use for my mail 
program.  I have not tested it with large amounts of text, but it is able 
to handle some very large strings.  It has its own documentation, and if 
anyone needs any help setting it up I'd be willing to help.
 
Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com
 
Attached: 
mp_template_engine.php
 mp_template_engine.php

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


Re: [PHP] Search engine php/mysql

2001-06-20 Thread Chris \&quot;TunkeyMicket\" Watford



That poses a problem, it is easy to do for your own site 
[opendir], but other sites you'd have to open the html file [fopen], search for 
links, and add them to a list to spyder, grab the meta tags from the current 
page, then goto the next site in the spyder list. array_push to add to the end 
of the spyder list.  This is not an easy task.
 
Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

  - Original Message - 
  From: 
  Mohamedou 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, June 20, 2001 8:22 
  AM
  Subject: [PHP] Search engine php/mysql 
  
  
  Hello list,
   
  I am coding a search engine that allow indexing 
  and searching internet sites based on php/mysql.
   
  My problm is:
   
  How can i index a given site, I 
mean:
   
  input: URL, like http://www.blabla.com/
  Output: meta, body content, description that will 
  be stored in a tables.
   
  thnx in advance
   
  Moh


Re: [PHP] bad form...

2001-06-20 Thread Chris \&quot;TunkeyMicket\" Watford

I personally use it all the time in my news script that powers my page, it
is easier to use and it helps with security.

Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "motorpsychkill" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 6:39 AM
Subject: Re: [PHP] bad form...


> generally. no its not.. IMHO its a good thing it can help make data
> validation easier, as in people can't "fake" variables by passing them in
> the URL to the processing script.
> It also helps keeps thing tidy... so providing that the processing isn't
> fantastically complex (in which case the complexity of the processing may
> make the physical file cumbersome)
>
> HTH,
> Tom
>
>
> > hello everyone, is it 'bad form' (no pun intended) to have a form point
to
> > itself for processing, rather than forward the form variables to another
> > page?  Anybody have any input on this?  I try to have 1 page that is the
> > form and handles all the processing as well in order to keep the page
> count
> > on my site low and for easier editing, blah blah blah
> >
> > thank you for you help!
> >




Re: [PHP] mailform loop

2001-06-20 Thread Chris \&quot;TunkeyMicket\" Watford

Well, if you named all the fields in the HTML as follows you could use an
array_walk function to do that.



Then you could array_walk through $mailForm and addslashes/htmlspecialchars
to it.

Chris "TunkeyMicket" Watford
----
TunkeyMicket Productions
www.tunkeymicket.com

- Original Message -
From: "Wilbert Enserink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 4:51 AM
Subject: [PHP] mailform loop


> Hi all,
>
>
> does anybody know if it is possible to loop through all  the fields in a
> mailform. I want to perform the addslashes function  and htmlspecialchars
> function to each entered value so i can put it in my db.
>
> Or should I make use of a standard good mailform script? and if so, does
> anyone know such a good script?
>
>
> wilbert
>
> -
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> [EMAIL PROTECTED]
> -




Re: [PHP] email templates and str_replace

2001-06-20 Thread Chris \&quot;TunkeyMicket\" Watford



Mr. Kurth,
 
    Try this.  Save the mail 
template to another file [like mailtemplate.txt] then open it for 
reading.
 
//read in template
$template = 
file("mailtemplate.txt");
 
//setup variables
$fullname="Richard 
Kurth";$email="[EMAIL PROTECTED]";$hostdomain="northwesthost.com";    
$hostname="www";    $domain="twohot";    
    
$tld=".com";$baseip="234.444.45.444";$username="rkurth";$password="boat";$userdatabase="twohot";$newuser="twohot";$newuserpass="twohot";$sales="sales";$domainname=$hostname 
. "." . $domain . $tld;
 
//iterate through the template replacing 
the items
for($i = 0; $i < sizeof($template); 
$i++) {
    $template[i] = 
str_replace('##fullname##',$fullname,$template[i]);    
$template[i] = str_replace('##email##',$email,$template[i]);
    $template[i] = 
str_replace('##domain##',$domainname,$template[i]);    
$template[i] = str_replace('##ip##',$baseip,$template[i]);    
$template[i] = 
str_replace('##username##',$username,$template[i]);    
$template[i] = 
str_replace('##password##',$password,$template[i]);    
$template[i] = 
str_replace('##userdatabase##',$userdatabase,$template[i]);    
$template[i] = 
str_replace('##newuser##',$newuser,$template[i]);    
$template[i] = 
str_replace('##newuserpass##',$newuserpass,$template[i]);    
$template[i] = 
str_replace('##hostdomain##',$hostdomain,$template[i]);    
$template[i] = str_replace('##sales##',$sales,$template[i]);   

}
 
//Now the array $template contains our 
message, parsed and all
//from here we can implode it into one 
string, or we can leave
//it be to do further things to 
it. The example from above is
//similar to the method I use in my 
TemplateEngine I wrote a
//little while back, I might just include 
the source some time.
 
Hope this helps,
 
Chris "TunkeyMicket" Watford

TunkeyMicket Productions
www.tunkeymicket.com
 
- Original Message - 
From: "Richard Kurth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 4:32 AM
Subject: [PHP] email templates and 
str_replace
>   I am trying to set up a template for an email program below 
you will>   see the test program the $mail_template is pulled from a 
database>   that is pre saved when it is saved the Placeholders are 
filled in>   using str_replace. that is what I want it to do. But it 
does not work. What am>   I missing hear.> > 
$mail_template= "> > 
    Web Hosting At 
##hostdomain## > > > > Dear ##fullname##  
> > Your webhosting account has been created. 
Please use the following data to log in to ##domain## 
> > > > 
    
Domain:##domain##   > 
    IP-Address: ##ip## 
>     
Username: ##username##> 
    Password: 
##password##>     
Mysql Database: ##userdatabase##  > 
    Mysql Username: ##newuser## 
>     Mysql 
Password: ##newuserpass## >   
>  >     > 
Thanks for choosing 
##hostdomain##  Any Questions e-mail ##sales##@##hostdomain##> > > > 
> ";> > /* message*/> //$mail_template 
= $message;> > $fullname="Richard Kurth";> 
 $email="[EMAIL PROTECTED]";> 
 $hostdomain="northwesthost.com";>  $hostname="www";> 
 $domain="twohot";>   $tld=".com";> 
 $baseip="234.444.45.444";>  $username="rkurth";> 
 $password="boat";>  $userdatabase="twohot";> 
 $newuser="twohot";>  $newuserpass="twohot";> 
 $sales="sales";> $domainname=$hostname . "." . $domain . 
$tld;> > > $mail_content = 
str_replace('##fullname##',$fullname,$mail_template);> $mail_content = 
str_replace('##email##',$email,$mail_template);> $mail_content = 
str_replace('##domain##',$domainname,$mail_template);> $mail_content = 
str_replace('##ip##',$baseip,$mail_template);> $mail_content = 
str_replace('##username##',$username,$mail_template);> $mail_content = 
str_replace('##password##',$password,$mail_template);> $mail_content = 
str_replace('##userdatabase##',$userdatabase,$mail_template);> 
$mail_content = str_replace('##newuser##',$newuser,$mail_template);> 
$mail_content = 
str_replace('##newuserpass##',$newuserpass,$mail_template);> 
$mail_content = 
str_replace('##hostdomain##',$hostdomain,$mail_template);> $mail_content 
= str_replace('##sales##',$sales,$mail_template);> /* and now mail it 
*/> /* recipients */> $recipient = "$fullname <$email>" ; 
> //header> $headers .="From: Sales Department < [EMAIL PROTECTED] 
\n>";> $headers .= "reply-To:$from\nX-Mailer: PHP/" .phpversion()." 
\n";> $headers .= "Content-Type: text/html; 
charset=iso-8859-1\n";> //subject> $subject1 = $subject;> 
//mail($recipient, $subject1, $mail_content, $headers);> //print 
"$recipient, $subject1, $mail_content, $headers";> echo 
$mail_content;> > > > > > > 
> > > > > Best regards,> 
 Richard  > mailto:[EMAIL PROTECTED]


[PHP] An idea

2001-06-19 Thread TunkeyMicket



Humor me, how useful would a Regex switch statement 
be?
 
Like:
 
ereg_switch($filename) {
    case "/\.jpg$/":
        echo "JPEG 
Image"; break;
    case "/\.gif$/";
        echo "GIF 
Image"; break;
    case "/\.zip$/":
        echo 
"Compressed File"; break;
    default:
        echo "Unkown 
File Type"; break;
}
 
That is just an example of an application of such, 
I have other applications that I would like to use it for, but that serves the 
best example.  I would love to get started on a module project for 
something like this, as using IF blocks with PREG_MATCH become tedious and 
inefficient.  If you know of such a module or would know how to get 
started, please repsond with your ideas/input.
 
Chris "TunkeyMicket" Watford

TunkeyMicket Productions
www.tunkeymicket.com