Re: [PHP] lasso (a bit 0T)

2004-06-06 Thread Roddie Grant
on 30/5/04 6:59 pm, Ryan A at [EMAIL PROTECTED] wrote:

 Hey,
 A prospective client has asked me to try to convert his Swedish site so that
 visitors have a choice between Swedish and English, which is not a problem
 as I am fluent in both languages. After going through the site to convert I
 was just checking out the current pages and I saw that all the links have a
 .lasso extension instead of the normal .htm,.html,.php etc
 
 Did a quick search on google and found this
 http://store.blueworld.com/lp7.lasso
 
 sure looks like the same stuff but am not sure...
 
 Anybody here worked with Lasso? any suggestions or comments?
 
 Thanks,
 -Ryan


Hi Ryan

Lasso is a flourishing middleware program that does much the same job as
PHP. Its downside is that it is proprietry (owned by Blue World) so you have
to pay for it, and ISP charges are higher. The upside is that it is
generally (everyone - please don't start a war over this!) quicker to
develop in Lasso than PHP. It is more tag based than PHP, so probably less
intimidating to HTML programmers than PHP is. For example if constructions
look like this:
 if:(condition);
   code here;
 /if;
You must close with the /if; but you don't get tied up in lots of {} pairs.

It is also generally (no war please!) much more secure than PHP. Or rather
the security is built in, and access can be set even on a tag by tag basis.
(I'm a PHP novice, so can't fully compare the two).

Its roots are in FileMaker, and it is still likely to be the best way to get
a Filemaker database on-line, but don't let that fool you. Since Mac OSX
came along, Lasso comes with an integrated version of MySQL and can connect
to stand-alone installations of MySQL directly (and other databases
indirectly I believe). It's very powerful and has  OO capabilities.

That's enough about Lasso on a PHP list. If you want to know more, by all
means email me off list, or join LassoTalk (email to
[EMAIL PROTECTED]).

Roddie Grant
[EMAIL PROTECTED]

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



Re: [PHP] UK Postcodes Format

2004-02-17 Thread Roddie Grant
on 17/2/04 10:25 am, Shaun at [EMAIL PROTECTED] wrote:

 Hi,
 
 does anyone know the format of the postcodes in the UK so I can keep my
 database accurate?
 
 Thanks


Try http://javascript.internet.com/forms/uk-postcode-validation.html

Roddie Grant
[EMAIL PROTECTED]

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



Re: [PHP] UK Postcodes Format

2004-02-17 Thread Roddie Grant
on 17/2/04 12:14 pm, Ford, Mike   [LSS] at [EMAIL PROTECTED]
wrote:

 On 17 February 2004 10:43, Roddie Grant wrote:
 
 on 17/2/04 10:25 am, Shaun at [EMAIL PROTECTED] wrote:
 
 Hi,
 
 does anyone know the format of the postcodes in the UK so I can
 keep my database accurate?
 
 Thanks
 
 
 Try http://javascript.internet.com/forms/uk-postcode-validation.html
 
 Wow, at a glance I'd say that looks like pretty crappy JavaScript, and also
 not a totally accurate UK postcode checker.
 
 The only guaranteed way to fully validate a UK postcode is to purchase the
 Royal Mail's Postcode Address File (PAF) (and subscribe to its updates!), but
 you can validate the format fairly closely with some simple rules.
 
 For example, here's a regexp that matches valid UK postcode patterns:
 
  /[A-Z]{1,2}[0-9][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{1,2}/

snip

Hmm, I hadn't actually looked at the JavaScript - just at the description of
how postcodes are structured. But the link to the Royal Mail site is much
better for that. sigh / If only Royal Mail had remembered programmers when
they thought up the postcode system.

Mike, I'm very impressed with your knowledge of postcodes! Even better than
the Royal Mail site.

Roddie Grant
[EMAIL PROTECTED]

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



Re: [PHP] UK Postcode Reg Exp

2004-02-17 Thread Roddie Grant
on 17/2/04 4:47 pm, Shaun at [EMAIL PROTECTED] wrote:

 Hi,
 
 Has anyone written a regular expression for validating a UK Postcode?
 
 Many thanks


Did you not see the reply from Mike Ford earlier today to your original
post?

Roddie Grant
[EMAIL PROTECTED]

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



Re: [PHP] OT, Maybe: Question Re: Apache/Macintosh Platform

2004-01-30 Thread Roddie Grant
What you have is fine, but I think (I don't do it that way) this means each
user will have completely separate code. That might be A Good Thing, or you
might be the only user anyway.

An alternative is to use /Library/WebServer/Documents/
Any pages placed there can be called with either 127.0.0.1/yourpage.php or
localhost/yourpage.php  (127.0.0.1 and localhost do not appear to be
completely interchangeable; I've found places where one works and the other
doesn't).

An advantage of using /Library/WebServer/Documents/ is that you can set up
virtual hosts in httpd.conf (/private/etc/httpd/httpd.conf). I have several
development sites set up - www.xxx.dev, www.yyy.dev etc - paralleling the
live sites. I can switch between development sites as quickly as between
live sites.  You can find instructions for this at
http://www.listsearch.com/lassotalk.lasso?id=119795-session=listsearch_lass
otalk:D4202A04032cc100BEIikJ25BACD

HTH

Roddie Grant
[EMAIL PROTECTED]





on 29/1/04 3:18 am, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote:

 PHP/MySQL textbook I'm using says to copy its sample apps to the root
 directory. What it says is: [o]n Apache this folder is usually named
 htdocs by default. Not only can't I find a folder named htdocs, but I've
 been using--and I'm certain I remember reading in another book to use
 this--the Sites folder within my username folder, which is within the Users
 folder of my hard drive.
 
 Now the code samples run fine from there; but I still need to know whether
 this is somehow not the correct place, and whether I need to create a
 folder named htdocs.
 
 Any thoughts?
 
 Thank you.
 
 Steve Tiano 
 
 
 mail2web - Check your email from the web at
 http://mail2web.com/ .
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP] Add Reply-To to this list(s)

2003-11-26 Thread Roddie Grant
on 26/11/03 7:18 am, Rasmus Lerdorf at [EMAIL PROTECTED] wrote:

 Just to add an authoritative answer here.

I am now thoroughly confused!

I clicked Reply-All to Rasmus Lerdorf's message. Result:
To: Rasmus Lerdorf and Nigel Jones
Cc: PHP General Mailing List.

I clicked Reply-All on a Jason Wong message. Result:
To: [EMAIL PROTECTED]

I clicked Reply-All on a David T-G message. Result:
To: David T-G and PHP General Mailing List
Cc: to Thomas Svenson.

[Moc OSX 10.2.3, Entourage 10.1.0]

What is supposed to happen? (This is a plea for education, not a gripe.)

Roddie Grant
[EMAIL PROTECTED]

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



[PHP] No data being found

2003-01-21 Thread Roddie Grant
I have a small site in development which takes details of coming church
services from a MySQL database. This bit is at the bottom of
http://www.rugbyurc.org.uk/spirit/spirit_intro.php (hosted by an ISP) and
works fine.

I've just got OSX working on my Mac and want to get the site running on that
so that I can develop it further. I am using the code below (this is a much
reduced version of what's on the live site), but getting no data. Nor am I
getting any error message.

I can access and use the database from Terminal. I can also get the data
from the same query using Lasso (a middleware program similar to php), so I
know the data is there to be found.

Any suggestions about why the data is not showing up in the browser with php
will be much appreciated.

table border=0

?php
  $userName='xxx';
  $pswd='yyy';
  error_reporting(E_ALL);
   
  require_once('DB.php');
  $db =  DB::connect(Mysql://$userName:$[EMAIL PROTECTED]/rurcdb);

  if (DB::iserror($db)) {
  die($db-getMessage());
  }

  $sql =  SELECT speaker
  FROM rurcdb.diary;

  $q = $db-query($sql);
  if (DB::iserror($q)){
  die($q-getMessage());
  }
  while ($q-fetchInto($row)){
  echo trtd.($row[0])./td/tr;
  }
?
/table

Roddie Grant
[EMAIL PROTECTED]


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




[PHP] How do I include specific files?

2002-12-02 Thread Roddie Grant
I'm new to PHP, but from Lasso I'm used to the following sort of arrangement
(in pseudo-code)

Search for matching records
If number found=1
  include /folder/subfolder/file1
If number found1
 include /folder/subfolder/file2
If number found=0
 include /anotherfolder/subfolder/file99

where the included file contains the appropriate code for displaying a list,
a detailed record etc. In fact the whole page is made up almost entirely
from a succession of included files.

The paths all hang from the root as with HTML (for example img
src=/images-folder-at-root-level/image.gif).

In PHP the include_path stops this process in its tracks. I'm with an ISP so
I don't suppose I can control include_path (.:/usr/local/lib/php). Are there
any other options?

TIA

Roddie Grant
[EMAIL PROTECTED]


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