|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: php3 Digest 25 Mar 2000 05:59:48 -0000 Issue 1560
From: php3-digest-help
lists.php.netDate: Fri Mar 24 2000 - 23:59:48 CST
- Next message: php3-digest-help
lists.php.net: "php3 Digest 25 Mar 2000 17:59:45 -0000 Issue 1561"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 24 Mar 2000 20:46:31 -0000 Issue 1559"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php3 Digest 25 Mar 2000 05:59:48 -0000 Issue 1560
Topics (messages 82751 through 82804):
Take the ColdFusion-PHP tag conversion challenge!
82751 by: Ben Gollmer <ben
jatosoft.com>
82776 by: <ron
hksi.net>
any web-hosting support PHP?
82752 by: "Paul Burney" <burney
gseis.ucla.edu>
82761 by: Scott Gray <scotty
cm.math.uiuc.edu>
82784 by: "Stephen Cope" <kimihia
maxnet.co.nz>
calling rows by id
82753 by: "Martin Edelius" <martin.edelius
spirex.se>
82771 by: "Jay Hirsch" <jhirsch
scilearn.com>
problem related to bug #3680, apache terminates with php
82754 by: Mattias Inkinen <Mattias
Inkinen.se>
[PHP Template] Template Discussion
82755 by: Ron Chmara <ron
opus1.com>
COM, CORBA and so forth..
82756 by: "Michael L Smith" <Michael.L.Smith
alltel.com>
82792 by: Gary Bickford <garyb
fxt.com>
82801 by: "Timothy Ritchey" <tim.ritchey
vacuumgenesis.com>
PHP Proccess ID
82757 by: "Chris Kovalcik" <php_list
ibcnetwork.net>
82764 by: "Chris Kovalcik" <php_list
ibcnetwork.net>
82768 by: Lawrence Sica <larry
interactivate.com>
Let's try this again
82758 by: Andrian Pervazov <andrian
truefire.com>
82763 by: "Lukasz Felsztukier" <L.Felsztukier
digitalone.pl>
upload feature and Microsoft IE5
82759 by: Ryan Gaul <rgaul
travel-italy.com>
template engine example document
82760 by: Ron Chmara <ron
opus1.com>
82766 by: Monte Ohrt <monte
ispi.net>
82782 by: Ron Chmara <ron
opus1.com>
82788 by: php3
developersdesk.com
82790 by: "Jason Brooke" <jason
qgl.org>
LDAP AT HOME!
82762 by: Nathan Benson <phuzz
phactor.org>
"counter" solution
82765 by: php3
developersdesk.com
Database form generation & PHP
82767 by: <mark
hoist.nlc.net>
INSERT & primary key
82769 by: "Noel Nolst Trenite" <Maillist
internet-praesent.de>
82780 by: "Lukasz Felsztukier" <L.Felsztukier
digitalone.pl>
82786 by: "Noel Nolst Trenite" <Maillist
internet-praesent.de>
Problem with mkdir function
82770 by: Antoine Maisonneuve <antoi
inter-resa.com>
Any php editor
82772 by: "Tom Kevich" <php
artcenter.ac>
Header
82773 by: zap
powersurfr.com
[Q]Boolean search to SQL function
82774 by: "Robert V. Zwink" <rzwink
microcenter.com>
82778 by: "Robert V. Zwink" <rzwink
microcenter.com>
Two newbie questions
82775 by: Max Gilead <gilead
linart.pl>
82781 by: "Michael L Smith" <Michael.L.Smith
alltel.com>
82783 by: "Jay Hirsch" <jhirsch
scilearn.com>
82787 by: Lars Torben Wilson <torben
pinc.com>
Asking for the impossible?
82777 by: "Peter Kocks" <peter.kocks
baygate.com>
require("file") problems
82779 by: bross <bross
soldusa.com>
Building XML parsers with regular expressions
82785 by: "Dr. Brendan Gowing" <bg
coastec.com>
index.php3?sometext - what is the varuable?
82789 by: "Art Center" <ac
artcenter.ac>
82791 by: Andrian Pervazov <andrian
truefire.com>
82793 by: Ron Chmara <ron
opus1.com>
82794 by: "Art Center" <ac
artcenter.ac>
82795 by: "Paul Burney" <burney
gseis.ucla.edu>
82797 by: "Antonio S. Martins Jr." <shadow
wnet.com.br>
82803 by: "Rossi Designs" <webmaster
rossidesigns.net>
A XML tree and some transformations
82796 by: Gary Bickford <garyb
fxt.com>
Grabbing between tags
82798 by: Sandeep Hundal <sandeep_wde
yahoo.com>
82799 by: Matt McClanahan <cardinal
dodds.net>
82804 by: Ryan Gaul <rgaul
travel-italy.com>
A lot of HOSTS with one hosting solution is the $PHP_SELF a solution?
82800 by: "Art Center" <ac
artcenter.ac>
SMNP
82802 by: nvminh
hcmc.netnam.vn (nvminh)
Administrivia:
To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php3-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php3
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I think I've accomplished what you are looking for. Take a look at
http://www.jatosoft.com/cftest/hello.html.
There are 3 files used to produce that output: hello.html, hello.php3, and
themessage.php3.
hello.html uses the same source as your hello.html did.
The file "hello.php3" looks like this:
<?php
$theDate = gmdate("D, d M Y H:i:s");
header("type='application/x-javascript' reset='no'");
header("name='expires' value='$theDate'");
header("name='pragma' value='no-cache'");
include("themessage.php3"); //This is the file where input is specified,
using variable $theInput
if (!$theInput)
{
$theInput = "No Message specified."; //If input is not found, we
should let the user know.
}
$theInput = eregi_replace("10", "\n", $theInput);
$theInput = eregi_replace("13", "\n", $theInput); //Makes sure that all
carriage returns are \n
$theInput = addslashes($theInput); //This function puts slashes in front of
quotes and the like
print ("document.write(\"$theInput\")");
?>
The file themessage.php3 looks like this:
<?php $theInput="Hello World"; ?>
I've seperated the script and the message into two files for ease of use -
when modifying the message, you don't have to worry about screwing with the
rest of your code. However, you could easily just change the include() line
in hello.php3 to read
$theInput = "Hello World";
and dispose of themessage.php3 altoghether. You can also use a HTTP GET to
specify the message - for example, the code of hello.html would look like this:
<-- snip
<script src="http://www.jatosoft.com/cftest/hello.php3?theInput=Hello
World"></script>
<--end snip
Again, you would dispose of the include() line in hello.php3 if you used
this method.
Let me know if this solution works for you.
Ben Gollmer
Jatosoft, LLC
http://www.jatosoft.com/
At 05:57 PM 3/23/2000 -0600, you wrote:
>Okay, PHP gurus, here's a challenge for you. The first person with
>working code will win... you might want to sit down for this...
>permanent recognition on our http://fuselets.com site as the PHP-Fuselet
>God (or title of your choosing, not valid in Virginia or New Hampshire
>or where prohibited by law, and not open to any friends, family,
>employees, enemies, acquaintances, or hairdressers of any parent or
>subsidiary company or employee of Humankind Systems, Inc.).
>
>Whew. Here goes:
>
>We've written a simple ColdFusion custom tag called "MakeFuselet" (see
>the CF code below), and we need a PHP version. The requirements for the
>PHP function are:
>
>1. Alter the entire output (what is normally sent to the browser as
>HTML) of the PHP template to be a valid Javascript
>document.write('...'); function, as follows:
>
> A. Convert carriage returns to "\n"
> B. Escape single quotes like "\'"
> C. Prepend the document.write() function with a MIME-type
> header specifying Javascript and no-cache headers
>
>2. If "1" is done successfully, you'll be able to call your "PHuselet"
>from a simple <script> tag on any webpage, running on any platform, and
>any JS-aware browser will display the PHuselet's output.
>
>Here's the code for our CF_MakeFuselet custom tag:
>------------------------------------------------------------
><CFCONTENT TYPE='application/x-javascript' RESET='No'><CFHEADER
>NAME='Expires' VALUE='#Now()#'><CFHEADER NAME='pragma'
>VALUE='no-cache'><CFSETTING ENABLECFOUTPUTONLY="YES">
> <CFIF NOT ThisTag.HasEndTag>
> <CFABORT SHOWERROR="You need to supply a closing
> <CF_MakeFuselet> tag.">
> </CFIF>
> <CFIF ThisTag.ExecutionMode is "End">
> <CFSET ThisTag.GeneratedContent =
> Replace(ThisTag.GeneratedContent,
> "#CHR(13)##CHR(10)#",
> "\n", "ALL")>
> <CFSET ThisTag.GeneratedContent =
> Replace(ThisTag.GeneratedContent, "'", "\'", "ALL")>
> <CFSET ThisTag.GeneratedContent = "document.write('" &
>ThisTag.GeneratedContent & "');">
> </CFIF>
><CFSETTING SHOWDEBUGOUTPUT="NO"><CFSETTING ENABLECFOUTPUTONLY="NO">
>------------------------------------------------------------
>
>
>
>Here's the tag in action in the simplest possible way:
>
>ColdFusion Template (hello.htm)
>------------------------------------------------------------
><cf_MakeFuselet>
> <cfset message="Hello World">
> <cfoutput>#message#</cfoutput>
></cf_MakeFuselet>
>------------------------------------------------------------
>
>
>Calling Webpage (http://fuselets.com/test/helloworld.html)
>------------------------------------------------------------
>------------------------------------------------------------
>
>Now, certainly, it gets a lot more complicated when you start adding
>session control, form submissions, hyperlinks, cookies, url variables,
>referer checking, etc., but all we need is the basic functionality
>outlined above, in the form of a PHP function, to get started.
>
>Any takers?
>
>
>ron allen hornbaker õ¿õ¬
>mailto:ron
hksi.net ~
>humankind systems, inc.
>http://humankindsystems.com/LoftCam
>
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> Sorry Ron im not sure of the point of your request.. you want
> a PHP script
> that run like Cold Fusion from Javascript? So you can be
> "running on any
> platform, and
> any JS-aware browser will display the PHuselet's output" why
> not just use
> PHP? Which can run on any platform, and any JS or Non JS
> aware browser? I
> think if you try to mudge PHP into looking like Cold Fusion
> you will loose
> out on the power of PHP and the simplicity (for simple tasks) of CF.
>
> Sounds interesting whatever it is you are trying to do but
> you may like to
> explain why?
Mark,
Think of the millions of Geocities-type personal websites out there,
built on static HTML with no provisions for processing even CGI scripts,
and you can offer those sites a fully-functional dynamic web application
in one line of code: <script
src="http://mydomain.com/myapp.php3"></script>.
We're basically being a low-end ASP (Application Service Provider).
Right now, we've got our little non-Java Fuselet Chat application, and
our Subliminal Flasher application (both can be seen at
http://fuselets.com), which are free, paid for by banner ads, and can be
put on any website in the world with one line of code. But think of
full-blown discussion forums, or intranets, or e-commerce solutions,
that you would host and rent to others for 10 or 20 bucks a month.
Our back-end is currently running on ColdFusion, but we want to build
some Fuselets (and have some of you build some Fuselets) that run on
PHP. We're not trying to mudge PHP into looking like ColdFusion; we're
trying to replace ColdFusion with PHP, so that we can scale up to higher
volumes on cheaper hardware and software.
Does that help?
Ron
http://humankindsystems.com
attached mail follows:
> anyone know any free web hosting that supports php other than
> www.f2s.com or www.freedom2surf.net ?
Check the searchable index on the PHP Site. It lists almost
700 providers:
<http://hosts.php.net/search.php3>
Paul
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Paul Burney
Webmaster and Internet Developer
Educational Technology Unit
Graduate School of Education and Information Studies
University of California, Los Angeles
(310) 825-8365
<webmaster
gseis.ucla.edu>
<http://www.gseis.ucla.edu/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
attached mail follows:
Scott Mills Gray
scotty
cm.math.uiuc.edu
*********************************************************
Want Web hosting with Web based training, online programming editor for
writing HTML, JavaScript, CGI w/ PERL, CGI w/ C++, ASP, PHP, MySQL and
Java?
There is only one place....http://www.useractive.com
New Online at UserActive.com: Web Programming Certificate sponsored by the University of Illinois!
**********************************************************
On Fri, 24 Mar 2000, Paul Burney wrote:
> > anyone know any free web hosting that supports php other than
> > www.f2s.com or www.freedom2surf.net ?
>
> Check the searchable index on the PHP Site. It lists almost
> 700 providers:
>
> <http://hosts.php.net/search.php3>
>
> Paul
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Paul Burney
> Webmaster and Internet Developer
> Educational Technology Unit
> Graduate School of Education and Information Studies
> University of California, Los Angeles
> (310) 825-8365
> <webmaster
gseis.ucla.edu>
> <http://www.gseis.ucla.edu/>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Free? Are you kidding?
PHP is quite - what's the term - all-over-the-place at the moment, so just
check your ISPs server to see if they have it.
---- Stephen D C -- Auckland, New Zealand ----
kimihia*writeme.com // http://surf.to/stephenc
===-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-===
Because of lamb tariffs the Unabomber will be
sending nuclear warheads from Oklahoma to Iraq
: anyone know any free web hosting that supports php other than
: www.f2s.com or www.freedom2surf.net ?
attached mail follows:
>Are there any security issues with calling rows by their id?
With the risk of sounding like a complete moron, define "security issues".
In the end it's all up to what your code allows the user to do. If you have
code that allows the user to delete an entry only by doing
"delete_entry.php3?entry_id=123" then yes, there are security risks. But not
because you're using an auto_incrementing id field, it's because you're not
checking if the user doing the delete is allowed to.
As long as you yourself write all the code that accesses the databases it's
up to you to make sure that there's no security issues. If others are to
mess with your databases it's a different story and I'm not good enough at
MySQL security to tell you what to do about it.
Best regards,
Martin Edelius
Spirex Digital Design
--------------------------------
www: http://www.spirex.se
Mail: martin.edelius
spirex.se
Phone: +46-31-514651, 0708-113711
Fax: +46-31-514331
Aröds Industriväg 3c
S-422 43 Hisings Backa
--------------------------------
If I haven't got back to you or done what I'm supposed to, let me know again
as I have too much to do for my own good...
attached mail follows:
Does using sessions to anything other than make the ID obscure?
-----Original Message-----
From: Gregor Welters [mailto:gregor
welters.de]
Sent: Friday, March 24, 2000 8:44 AM
To: Matt Williams
Cc: martin.edelius
spirex.se; php3
lists.php.net
Subject: RE: [PHP3] calling rows by id
At 15:14 24.03.2000, Matt Williams wrote:
>Sorry I'll try again.
>
>Say I have created a contacts table with an id column which is the primary
>key, auto increment etc.. so whenever a row is inserted it gets a unique
id.
>So I could pull each contacts' name from the db, when getting these details
>their displayed name is also a link to allow me to view the rest of their
>details. so the link url could be
>view.php3?id=123 where 123 is the row id in the table.
>Are there any security issues with calling rows by their id?
>If so is there a more secure alternative of calling a row by a unique
>identifier?
if the id is the only property which selects a row, anyone can look whats
in the table only by changing the parameter.
you might wan't to use sessions to hide the data.
mit freundlichen Grüßen,
Gregor Welters
-----------------------------
Welters PC-Service Grafenberger Allee 81 40237 Düsseldorf Germany
Tel: 0211/9660096 Mobil: 0173/2776469 Fax: 0211/9660093
mailto: gwelters
welters.de look
at: http://www.welters.de
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi
I try to configure and run php, apache and MySql together.
Compilation and installation goes without any problem. But when enabling php in httpd.conf file (LoadModule), apache terminates without any messages.
I have tried to run gdb on apache, but I'm not familiar with the apache source code. Anyhow I end up with this stack frames, where apache is about to call dlclose on the php3 module. #0 ap_os_dso_unload (handle=0x80b8c60) at os.c:133 #1 0x804f2e0 in unload_module (modi=0x80ad85c) at mod_so.c:181 #2 0x805108e in run_cleanups (c=0x80af284) at alloc.c:1706 #3 0x804f8bd in ap_clear_pool (a=0x80ad5fc) at alloc.c:531 #4 0x805f983 in standalone_main (argc=1, argv=0xbffffa44) at http_main.c:4611 #5 0x8060223 in main (argc=1, argv=0xbffffa44) at http_main.c:4978 #6 0x4007dcb3 in __libc_start_main (main=0x805fedc <main>, argc=1,
and then it ends up complaining about: Cannot access memory at address 0x402ea0d0.
Versions: RedHat 6.0 on intel php 3.0.15 apache 1.3.12 MySql 3.22.32
Compile flags: MySql via rpm pre-compiled php ./configure --prefix=/usr/php --with-mysql \ --with-apxs=/usr/apache/bin/apxs --with-xml apache ./configure --prefix=/usr/apache --enable-shared=max
Any ideas?
cheers Mattias
attached mail follows:
Eric McKeown wrote: > Gary Bickford wrote: > > Warren Grant wrote: > > > If your designers need to learn to program a bit > > > to design then they should. > > You're expecting designers to have the same brain as you, which is often not the > > case. As a rather silly example, many, if not most, of the greatest race car > > drivers in the world couldn't tell you which end of the engine is front. They > > had mechanics for that. And our piano tuner can't play a lick. > Those analogies are flawed. A race car driver is the end user of the vehicle, > whereas a mechanic is responsible for making sure the car runs. The race car > driver would be analagous to the end user of the Web site, and the programmer and > the designer could be seen as two mechanics responsible for different areas of the > car. There may need to be some coordination between those mechanics, and they may > need to know something about one another's jobs. > Similarly, a piano player is analagous to and end user of a website, whereas the > tuner is analagous to a programmer or designer. When building the piano, there may > need to be some coordination between those who design the wooden frame for the > piano and those who handle all the music-producing stuff inside.
Having worked with quite a few print, and web, designers, there are the good ones in visual design, who suck at implemention, the good implemementors who suck at concept.... But in order to stay gainfully employed, they _cannot_ just wave a sharpie at a board and make things happen, there has to be some implementation, somewhere. The programs that tend to *appeal* most to designers are the ones that make that easiest... and it doesn't have _anything_ to do with syntax, (absurd debates about code "cleanliness" notwithstanding), or variable passing. As soon as you say "variable passing" to a designer, the game is over. They don't want to control logic, they want to control form, and function. They don't do logic, they do presentation.
So: They will, for the most part, look at a "template library" with disdain for the _exact_ same reasons they look at raw PHP with disdain. It has nothing to do with syntax, or tags, or simplicity. Most designers don't even like working in raw postscript, or raw PHP, or _even raw HTML_. They don't give a hoot what the code "looks" like, they'd rather not know, or care. HTML code is _too_ complex for what they want to do, let alone HTML coded with PHP (or even a template library to simplify the coding). How many print designers ask for a postscript library to simplify coding their print design? Few to none. Some used to sweat over their Compugraphic, every character... they're gone now. Designer-programmers are a transitional phase, not an end direction.
Take a look at how they use Javascript. Javascript is used by designers in downloadable "components", which they then use to build their web pages. Most couldn't even figure out *how* to write a rollover, which is why Fireworks sells like hotcakes. They don't give a hoot if the code looks pretty, or ugly, they care what the _product_ looks like. The same arguments plagued Javascript: "can't we re-write it so they'll use it?" No. You cannot write a PHP language, or any language, that all designers will be happy with. There are vary few who even know how to code postscript for their print work, let alone control postscript _logic_. They want to easily position elements, indicate what it does, and go from there. The don't care what the code looks like. So no matter how simple you make the code, you're going in the wrong direction. They don't want simple code, they want _no_ code.
It helps, I think, to work in Database UI design.... the main package pushing the edge on what visual design meshed with coding should "be like" is filemaker, where structures like loops have a clear "Loop... end Loop" syntax. The visual appearance, like most current HTML design packages, is not even _part_ of the logic. As soon as you expect a designer to follow a prescribed syntax, you're lost in the woods again, so the FM philosophy was to make the syntax as simple as possible... and you know what? In the filemaker UI world, the dumbed down "template interface" proposed is _too advanced_. It's "programming", and FM programmers make out like bandits, because the concept of a *variable* is just too advanced for most non-programmers. Really.
So we're not even really talking about most designers, we're talking about
the learning curve for designer-implementors, whether or not the syntax itself
leads to easy understanding. Amusingly enough, I found most of the posted
examples of the Template design to be just as obtuse, and cryptic, as PHP
is.
is a looping array? Okay, go ask a web designer what a looped array is.
:-)
At one site I'm working at, a designer-implementer (can code raw HTML if forced) once said to me: "I don't do coding. I design. If I have to write HTML codes, I'll call a programmer. I control how the page looks, not the code to make it look that way." That stuck with me as a reminder that anything I did to try to make their coding easier was for naught, they don't want to do any of the code in the first place.
Okay, that all being said, I've been looking at the examples of how this is supposed to be easier coding, and, quite frankly, it looks like the templates are supposed to fix a problem with obtuse PHP _coding_, with bad programming. Not because the designers "can't work around the code", but because of poor choices in the PHP programming *itself*. There was a complex "for" loop initialization that could have easily been a "while", happily cutting down on what somebody has to learn to read the code... if you want a designer to read your code, for god's sake, don't use contructs that *they can't parse*.
That's not a PHP issue, that's a general UI issue, and you can't fix it by the syntax, as the syntax isn't the problem in the _first place_. Never has been. I've seen human parsable assembly-destined programs, because it used good _coding_, which had nothing to do with the syntax of the language, it had everything to do with the usage.
Is programmer ego just too big to get over using "i++;", or can they bother to write "$loopcounter = $loopcounter +1;"? Do they need to add *yet another* tool, because they can't write web-designer-readable code, so they have to hide their code? Is the template idea to maintain poorly human-readable code?
That's what it looks like to me. If you want to hide the code, hide it, but you don't have to justify it as some sort of "advancement in designer templates", it's not. It's sending variables to hidden code, so the code can stay ugly and unreadable, cutting down on code commenting and formatting time.
Here's how we do it: We use includes for the code (oh my gosh, a file read? get over it. It's web pages. Do you limit the amount of gifs on the page to keep you file reads down?), we have them state their variables. That's all they need, no PHP template library, no ongoing custom coding, just enough knowledge for them to know how to update:
<? $headline = "This is where the Headline Goes" ; $pagetitle = "This is where the Title Goes" ; ?>
And so on. The hand coders already know how to use an = sign, so they have to learn "<?","?>" "$" and ";". Four tags/tokens, much, much, less that the various template ideas (retagging a language does not make it easier to use). When they need to revise or update their code, it's simple, because the _coding_ is done with them in mind.
So when designer-implementors have their code blocks built for things like the standard roll-over-contents bar, we make that an include, as well. So, they have to take a "massive leap of faith":
<? $headline = "This is where the Headline Goes" ; $pagetitle = "This is where the Title Goes" ; include "sales_html_header.inc" ; ?>
That's it. Our designers prefer working this way, as it's much the same as Quark templates or master pages, where they take stock elements for each page, and customize if needed. They make the template, it gets put into PHP form, they add as needed...
Design pages _first_, then coding comes in. I think one of the bigger problems is that far too many companies have coders building logic first (bottom up design), not appearance first (top down). Perhaps the coders don't realize that the product of the web is not the code, but the *appearance*. So now there are people trying to fix, in essence, workflow problems, without realizing that the problem isn't that HTML coders are "breaking" their PHP, but that their HTML coders are even exposed to it in the *first* place. It's not that a better code syntax will keep web designers from making errors, they will make errors if exposed to *any* code. So keep it away from them!. They design the page appearances, then coder implement for it.
This works for small scale (<50) page sites, but what about larger sites? The designers do _even less_. Their job is look and feel, not content. Content folks don't do look and feel, they do data. So designers build the look and feel, and pass that to programming. Programming then builds the dynamic pages, which access the content databases. Content folks never see the HTML or PHP, they *shouldn't have to*. Design folks never see PHP or the content, they *shouldn't have to*. The programmers never see the content, they have to work around the HTML. Content plugs their data into the content databases, free of concerns about the coding, or the look and feel.
So the knowledgable folks work in their tasks, and only their tasks. Problem solved. Nobody needs to try to teach a new syntax (XML? XSL? Maybe when it's in Dreamweaver, Pagemill, Frontpage, etc.), learn a new syntax, etc.
So where does this leave the debate? Well, I think the template idea works on one level: Using *code* templates like PHPlib has made life a lot easier for new PHP coders. Building code templates for beginning PHP coders goes a long way to helping design-implementors out. (HTMLlib?) Maybe taking the best of the html functions and putting them into PHP is a good idea (I'm surprised that there is such a small section of the manual for ht(ml/tp) functions, considering that it's the main use of PHP). Simpler construct usage is always good (while, rather than for::), and if there are more concise ways of formulating a contstuct (control, functions) it's good to see them rolled into PHP (in_array rocks.).
But no function, no syntax, can fix poor coding. It's easy to write obsfusicated code in every language, no? That means that it's *easy to use template language variants to be unusable for designers*. The syntax is not the problem.
-Bop
-- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.
attached mail follows:
As the key developer of an Intranet Application in our Company, I was asked to attend a meeting in which we discussed how get data that I am collecting with my PHP3 driven app to another Application Suite that was Developed within out Company. During this meeting, I was told that they're Application was NT Based and used COM Object's. I was then asked if my application can talk COM, to which I had no answer.
Can somebody here explain what these are and if PHP supports it? What about CORBA?
Michael L Smith
ALLTEL Information Services
Emerging Technology Solutions
(501) 220-8551
Michael.L.Smith
alltel.com
-- Echelon bait: COSCO SCUD missile Pecan-Pie Honduras Clinton Rule Psix security quiche Soviet cracking Linux Vince Foster FBI Khaddafi supercomputer JFK mp3 jihad freedom
attached mail follows:
There are some other folks who have some Java integration with PHP, who will no doubt answer regarding that. Another thought - The GNOME project uses Orbit, which is a very small footprint (37K according to them) CORBA interface library. This seems to me (completely ignorant in this matter and many others) as a good place to start to build PHP support.
GB
Michael L Smith wrote:
> As the key developer of an Intranet Application in our Company, I was asked to
> attend a meeting in which we discussed how get data that I am collecting with my
> PHP3 driven app to another Application Suite that was Developed within out
> Company. During this meeting, I was told that they're Application was NT Based
> and used COM Object's. I was then asked if my application can talk COM, to which
> I had no answer.
>
> Can somebody here explain what these are and if PHP supports it? What about
> CORBA?
>
> Michael L Smith
>
> ALLTEL Information Services
> Emerging Technology Solutions
> (501) 220-8551
> Michael.L.Smith
alltel.com
> --
> Echelon bait:
> COSCO SCUD missile Pecan-Pie Honduras Clinton Rule Psix security quiche
> Soviet cracking Linux Vince Foster FBI Khaddafi supercomputer JFK mp3 jihad
> freedom
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--
"Cyber is cyber, life is life."
Gary E Bickford mailto:garyb
fxt.com
FXT Corporation http://www.fxt.com/ tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759 ship:66265 JERICHO ROAD, BEND OR 97701
attached mail follows:
> I was then asked if my application can talk COM, to which > I had no answer.
PHP4 has support for COM. It is about to go into its first RC, and hopefully be out soon.
> What about > CORBA?
I am currently hacking on an OBRit-based CORBA interface for PHP4. I have done all my work in CORBA in C++ before, so am having some time getting the C language mapping for DII down, but am getting close.
tim
attached mail follows:
Hi, What user id is php executed under? If apache is started as root(Which is what happens when starting the computer), and runs all its childs as a different user, would the scripts be executed under each child id or the first parent proccess?
Thanks, Chris
Windows Law 1: What boots up must come down...
attached mail follows:
So, back to my original problem, why are the scripts being executed as root user and not under the child proccess? Would this be a PHP problem and I should re-install (Used to work properly, don't know what happened to change it) PHP or is it an apache problem and I should re-install apache? Anyone know?
Thanks,
>The child id would execute the scripts.
>
>-Dave M.
>Unix S.A
>techies.com
>
>-----Original Message-----
>From: Chris Kovalcik [mailto:php_list
ibcnetwork.net]
>Sent: Friday, March 24, 2000 11:02 AM
>To: php3
lists.php.net
>Subject: [PHP3] PHP Proccess ID
>
>
>Hi,
>What user id is php executed under?
>If apache is started as root(Which is what happens when starting the
>computer), and runs all its childs as a different user, would the scripts
be
>executed under each child id or the first parent proccess?
>
>Thanks,
>Chris
>
>
>Windows Law 1: What boots up must come down...
>
>
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to:
>http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Chris Kovalcik wrote: > > So, back to my original problem, why are the scripts being executed as root > user and not under the child proccess? > Would this be a PHP problem and I should re-install (Used to work properly, > don't know what happened to change it) PHP or is it an apache problem and I > should re-install apache? > Anyone know? > Well it should run as whatever user the web server is running under. What user does it say in the httpd.conf file for apache? Are you using suexec?
--Larry
> Thanks,
>
> >The child id would execute the scripts.
> >
> >-Dave M.
> >Unix S.A
> >techies.com
> >
> >-----Original Message-----
> >From: Chris Kovalcik [mailto:php_list
ibcnetwork.net]
> >Sent: Friday, March 24, 2000 11:02 AM
> >To: php3
lists.php.net
> >Subject: [PHP3] PHP Proccess ID
> >
> >
> >Hi,
> >What user id is php executed under?
> >If apache is started as root(Which is what happens when starting the
> >computer), and runs all its childs as a different user, would the scripts
> be
> >executed under each child id or the first parent proccess?
> >
> >Thanks,
> >Chris
> >
> >
> >Windows Law 1: What boots up must come down...
> >
> >
> >
> >
> >--
> >PHP 3 Mailing List <http://www.php.net/>
> >To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> >To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> >To search the mailing list archive, go to:
> >http://www.php.net/mailsearch.php3
> >To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Jason Murray wrote:
>
> Hi all,
> Sorry about the last post. I don't know what happened.
>
> I have a question on the usage of echo. I am trying to use php to read a
> logfile and display it to a web browser. The problem that I was having with
> readfile() is that the carriage returns were displaying as spaces on the
> browser. So, I tried reading the file character by character, comparing the
> char to a CR, and using the echo statement to print a CR:
>
> if(strcmp($char,$cr) == 0)
> {
> echo "\n";
> }
> else
> {
> echo $char;
> }
>
> This also resulted in the CR displaying as a space.
>
> So, I ran a simple test: echo "HI\n" repeated 5 times. The display in the
> browser was HI HI HI HI HI; however, if I viewed the HTML source, the output
> was
> HI
> HI
> HI
> HI
> HI
>
> Can I use echo ( or a similar function ) to print CR s in a HTML document,
> or must I break out of php and do a <BR>? <BR> seems a little clumsy to me.
>
> Regards,
> Jason C. Murray
>
> Email Address: jmurray
dicatech.com
> Phone +1 401 682 1492
> Fax + 401 683 6105
> DICA Technologies, Inc.
> 207 High Point Avenue
> Portsmouth RI 02871
> Web Address: www.dicatech.com
>
\n will result in a new line in the HTML source, not in the displayed HTML. To display a new line on the web page, use the nl2br function in PHP.
Andrian
attached mail follows:
----- Original Message -----
From: Andrian Pervazov <andrian
truefire.com>
To: <jmurray
dicatech.com>
Cc: <php3
lists.php.net>
Sent: Friday, March 24, 2000 10:04 PM
Subject: Re: [PHP3] Let's try this again
> Jason Murray wrote: > > > > Hi all, > > Sorry about the last post. I don't know what happened. > > > > I have a question on the usage of echo. I am trying to use php to read a > > logfile and display it to a web browser. The problem that I was having with > > readfile() is that the carriage returns were displaying as spaces on the > > browser. So, I tried reading the file character by character, comparing the > > char to a CR, and using the echo statement to print a CR: [cut] > \n will result in a new line in the HTML source, not in the displayed > HTML. To display a new line on the web page, use the nl2br function in > PHP. Or use a <PRE> tag - preserves newlines. Cheers, [ : : ] Lukasz Felsztukier : : I T D i r e c t o r : : d i g i t a l O n e : : interactive media agency : : h t t p : / / w w w . d i g i t a l o n e . p l : : Al. Kosciuszki 1, Lodz : : tel./fax [0 42] 632.89.74
attached mail follows:
Please post your script. I have done this with IE5 and it works well. Perhaps it's a coding error.
Ryan Gaul
Thomas Heidemann wrote:
> Hi all,
>
> I have a problem with uploading files and IE5.
>
> The tmp file in TMPDIR will not be created.
> The $userfile variable points to the local hard disk of the client.
>
> With Netscape Communicator, the skript works.
>
> Can anybody help me ?
>
> Server: Linux with Apache 1.3.6
>
> Thanks
> Thomas
>
> Camelot IDPro AG
> Thomas Heidemann
> Janderstr. 9
>
> D-68199 Mannheim
>
> Tel: +49 / 621 / 86298-0
> Fax: +40 / 621 / 86298-25
> email: thomas.heidemann
camelot-idpro.de
> http://www.camelot-idpro.de
>
> Your partner for Integrated Supply Chain Management
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--Network Administrator Lead Programmer - Web Application Development rgaul
travel-italy.com
Travel-Italy.com 2400 Bluff Creek Drive Columbia, Missouri 65201 USA
Toll Free (USA only): 888-28-ITALY Phone: 573-446-6922 Fax: 573-446-6920 Email: rgaul
travel-italy.com World Wide Web: http://www.travel-italy.com
attached mail follows:
Monte Ohrt wrote: > > Hello, > > The template engine examples document is ready. It is available in .pdf > and .doc formats. > > Hopefully this will provide a better understanding about the design, and > spark some more discussion about how we can make this work for everyone. > > http://www.phpinsider.com/php/PHP_Template_Engine.pdf > http://www.phpinsider.com/php/PHP_Template_Engine.doc >
Er.... is not having this in HTML, or even a text document, a form of dreadful irony?
That what can be done in simple forms, must then be overlaid with excessive, and complex, structures, only to accomplish what can be done with much less effort? :-)
To paraphrase your own text: ' But where do you draw the line with template functionality? From a technical viewpoint, variable substitution can be done in the html, and all other logic should be kept in other files. On the other hand, designers need flexibility to control the layout of the html. Each time they must tap the shoulder of the programmer and request some changes in the html, this requires another loop in the development cycle. In an application where more web pages are continuously created and manipulated, the programmer should not be needed once the code is in place. '
So, the programmer sticks the logic in an include (or require), the HTML folks assign values to the variables....the coders mess with the logic, not the html, the html folks mess with the HTML (as needed).
What's missing from this?
-Bop
-- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.
attached mail follows:
Hi Ron,
Ron Chmara wrote: > > So, the programmer sticks the logic in an include (or require), the HTML folks > assign values to the variables....the coders mess with the logic, not the html, > the html folks mess with the HTML (as needed). > > What's missing from this? > > -Bop
With your method, the programmer must change the PHP logic (what is included) for each template. How is this scalable to manage many templates? You are no longer separating form (presentation) from content.
The way we proposed to make this work: the programmer passes content to the template, the designer controls the presentation of this content, and they control ONLY the presentation. The small set of functionality in the template spec accomplishes just that. The designer can make templates to their hearts desire without the need to change the PHP code underneath. Then later if you want to update the PHP code, there is only one set of code to update, not a whole slew of differing PHP code for each template.
Monte
attached mail follows:
Monte Ohrt wrote: > Ron Chmara wrote: > > So, the programmer sticks the logic in an include (or require), the HTML folks > > assign values to the variables....the coders mess with the logic, not the html, > > the html folks mess with the HTML (as needed). > > What's missing from this? > > -Bop > With your method, the programmer must change the PHP logic (what is > included) for each template.
Not at all. There is no limit to how many HTML pages can call the same logic block. If the logic _features_ change, then in both of our methods, the programmers have to rework the pages. I'll give you an example: The server- wide credit card validation logic is one, and only one, file. It never has to be duplicated, never seen by the website designers. The most a designer has to do is add an hidden form variable, or build an HREF on a page, (both are things they're fairly knowledgeable about) and on the next page, know the syntax for an include, and decide where to put the result. So adding dynamic content means they need to know all of *two* statements.
> The way we proposed to make this work: the programmer passes content to > the template, the designer controls the presentation of this content, > and they control ONLY the presentation. The small set of functionality > in the template spec accomplishes just that.
This would mean that my designers do, indeed, have to know the following (and they do):
Logic: <? include "generic_logic.inc" ?>
Presentation: <? echo $var ?>
Hey, Rasmus/Zeev et al: Can we get a variable function equivalent to echo? As in: <? #$var ?> being the same as: <? echo $var ?>
> The designer can make > templates to their hearts desire without the need to change the PHP code > underneath.
Exactly. They don't even need to learn a whole new language, beyond an include, and, maybe, an echo.
> Then later if you want to update the PHP code, there is only > one set of code to update, not a whole slew of differing PHP code for > each template.
So don't build different code for each web page! That doesn't require a new syntax, that requires building generalized logic. We are rapidly spiralling from the newish template debate into the old monolithic vs. OO debate... and your code is basically _an_ OO set of generalized logic, which, for some reason, you are passing using an new syntax.
-Bop
-- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.
attached mail follows:
Addressed to: Ron Chmara <ron
opus1.com>
"php3
lists.php.net" <php3
lists.php.net>
** Reply to note from Ron Chmara <ron
opus1.com> Fri, 24 Mar 2000 16:13:37 -0700
>
> Hey, Rasmus/Zeev et al: Can we get a variable function equivalent to
> echo? As in: <? #$var ?> being the same as: <? echo $var ?>
>
Take a look at php4.
<? echo $var ?> = <?=$var?>
Once upon a time, I thought foreach() would be the main reason I wanted to switch to php4. So far I haven't used foreach once, but I have tons of things printed with <?="whatever"?>.
Yes, I know it is still in beta, but as someone once said on the list, it is open source and in beta, so it is probably better debugged than most M$ products when they are first released.
All my new development is done with php4. I haven't actually released a site to the public running on php4, but I have three in development, and have no problem with the idea of releasing them before the final release of php4.
Rick Widmer Internet Marketing Specialists www.developersdesk.com
attached mail follows:
You can always enable asp tags in php3.ini and do <%=$var%> without having to switch to php4 yet
jason
>> Hey, Rasmus/Zeev et al: Can we get a variable function equivalent to >> echo? As in: <? #$var ?> being the same as: <? echo $var ?> >>
> Take a look at php4. > > <? echo $var ?> = <?=$var?> > > > Once upon a time, I thought foreach() would be the main reason I wanted > to switch to php4. So far I haven't used foreach once, but I have tons > of things printed with <?="whatever"?>.
attached mail follows:
Ould,
what do you mean "can be used at home"?
a server you can access from home? a server you can run at home in Windows and Linux?
if you want a server you can run at home in Linux check out OpenLDAP:
hope this helps.
on Fri, 24 Mar 2000, Ould is accused of writing:
> Hello,
>
> I'm searching for an LDAP which can be used at home for
> 1)Window98
> 2) Linux/RH6.1
>
> Is someone can help for corresponding URLs?
>
> Thanks,
>
> Ould
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- Nathan Benson ------------- http://www.phactor.org/Me spell chucker work grate. Need grandma chicken.
attached mail follows:
Addressed to: "Steve" <smartin
mho.net>
<php3
lists.php.net>
** Reply to note from "Steve" <smartin
mho.net> Thu, 23 Mar 2000 22:19:34 -0700
>
> Hi, I was reading code (see below) and I have a problem <or> a =
> question). First, I configured my Apache Web Server to run PHP3 =
> extentions, but when I browse to a directory where the only "index"
> file = is "index.php3", I merely get a directory listing... have I
> missed = something in the implementation of the PHP module (re:
> Apache)?
>
> TIA - Steve !Please reply to my personal email... smartin
mho.net,
> thank you
>
You need to add php3 to your DirectoryIndex statement in httpd.conf, or possibly srm.conf, wherever your appace configuration is stored.
Mine is:
DirectoryIndex index.php3 index.php index.html index.htm index.shtml
Rick Widmer Internet Marketing Specialists www.developersdesk.com
attached mail follows:
Are there any tools to help with create standard Add/Modify/Delete style forms with PHP? I managed to get my application working but it is a huge pain whenever I have to add fields or create new tables.
Thanks, Mark
attached mail follows:
If I INSERT a an entry into a MySQL database table of which a primary key is identical, is the entry overwritten, or is an error given out?
Thanks in advance,
Noel
attached mail follows:
Do a REPLACE...
Pozdrawiam,
[ : : ] Lukasz Felsztukier : : I T D i r e c t o r
: : d i g i t a l O n e : : interactive media agency
: : h t t p : / / w w w . d i g i t a l o n e . p l
: : Al. Kosciuszki 1, Lodz : : tel./fax [0 42] 632.89.74
----- Original Message -----
From: Noel Nolst Trenite <Maillist
internet-praesent.de>
To: <php3
lists.php.net>
Sent: Friday, March 24, 2000 11:28 PM
Subject: [PHP3] INSERT & primary key
> If I INSERT a an entry into a MySQL database table of which a
> primary key is identical, is the entry overwritten, or is an error given
> out?
>
> Thanks in advance,
>
> Noel
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I Know, but I don't want to bother about the if() at the moment.
> Do a REPLACE...
attached mail follows:
I have to create a directory so, I use mkdir("/tmp/test", 0770) But when I look at the mode, the group have only read and execution acces...
> ls -l total 1 drwxr-x--- 3 nobody www 512 Mar 24 16:13 test
And if after I use the chmod function chmod("/tmp/test", 0770), it's work fine...
> ls -l total 1 drwxrwx--- 3 nobody www 512 Mar 24 16:13 test
-- Antoine Maisonneuve http://www.inter-resa.com Le Réseau Touristique INTER-RésThe INTER-Res
tourism network
attached mail follows:
PHPED www.soysal.com/PHPEd/
you can upload your files to the server with a simple Ctrl + Alt + S this is SOOOOOO convenient
attached mail follows:
How would I go about sending a header to another computer/page?
I'm looking to make a real simple uptime client for the uptimes.net thing, http://www.uptimes.net/stuff/protocol.html
And I'm a little confised as to how to "send" the header to something other than a browser.
Thanks, Chris
attached mail follows:
Does anyone have a function that I could use to take the boolean input from a search box and convert it to a SQL WHERE clause?
Example: $words = "mouse AND pa%";
converted to:
$where = " search_table.word IN('mouse') AND search_table.word LIKE pa%";
or anything like the above. Any help is appreciated.
Thanks!
Robert Zwink
attached mail follows:
I did not intentionally post this. I think it was in a que somewhere, and is just now being sent again.
> -----Original Message-----
> From: Robert V. Zwink [mailto:rzwink
microcenter.com]
> Sent: Friday, March 24, 2000 12:14 PM
> To: php3
lists.php.net
> Subject: [PHP3] [Q]Boolean search to SQL function
>
>
> Does anyone have a function that I could use to take the boolean
> input from
> a search box and convert it to a SQL WHERE clause?
>
> Example:
> $words = "mouse AND pa%";
>
>
> converted to:
>
> $where = "
> search_table.word IN('mouse')
> AND
> search_table.word LIKE pa%";
>
> or anything like the above. Any help is appreciated.
>
>
> Thanks!
>
> Robert Zwink
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list
> administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi!
I'm new to PHP so please forgive me lack of deep understanding of how it works. My questions are:
1. I want to make a questionaire. I want it to work this way: - 1. On first page user sees a form with some fields to fill in. It's validated in browser with JavaScript. It then submits form data to second page. [This step works OK] - 2. On second page user sees what he entered in nicely formatted HTML and is asked to confirm correctness of what he entered. Up to this moment it is done. Currently all form data is stored in variables like $name, $address etc. which is very convenient. Now I need to either pass this data to third page when PHP script stores this data in database or somehow ask user for confirmation and proceed on the same page. Problem is: I don' t know how to make variables persistent over several pages so the script on third page can use them OR how to ask user for confirmation and proceed on the same page.
One possible solution is to store all data in system variable and read it back later but it would be terribly inefficient and complicated.
I hope I made it clear enough :-) If not, please let me know! Any help would be appreciated. Hint: I'm not stupid, I just don't know how PHP works ;-)
Second question is related to this 'hint':
2. Where can I found PHP *tutorial*. I have read most of php manual (which is more like specification than manual) and I have seen tons of examples (downloaded lots of them :-). But what I couldn't find is The Tutorial that would explain the way how PHP works. I need understanding of PHP's way of organizing things. To be honest, I was surprised that it's not available from php.net.
Thanks for any help, Max
-- Max Gilead (gileadlinart.pl) http://3d.linart.krakow.pl/OfficinaArtificialis -----------------------------------------------------------------------------
attached mail follows:
You can do one of three things:
First, pass the data via the URL... this works something like: final_page.php?name=Joe&last_name=blow&address=nowhereland&.....
Secondly, you can store the data in a form in hidden fields then if he click's ok, just submit the form.
Third, PHP supports sessions, in which you can have certain variables that are valid for as many pages as you require.
HTH,
Michael L Smith
ALLTEL Information Services
Emerging Technology Solutions
(501) 220-8551
Michael.L.Smith
alltel.com
-- Echelon bait: COSCO SCUD missile Pecan-Pie Honduras Clinton Rule Psix security quiche Soviet cracking Linux Vince Foster FBI Khaddafi supercomputer JFK mp3 jihad freedom-----Original Message----- From: gilead
linart.pl (Max Gilead) Sent: Friday, March 24, 2000 4:52 PM To: php3
lists.php.net Subject: [PHP3] Two newbie questions
Hi!
I'm new to PHP so please forgive me lack of deep understanding of how it works. My questions are:
1. I want to make a questionaire. I want it to work this way: - 1. On first page user sees a form with some fields to fill in. It's validated in browser with JavaScript. It then submits form data to second page. [This step works OK] - 2. On second page user sees what he entered in nicely formatted HTML and is asked to confirm correctness of what he entered. Up to this moment it is done. Currently all form data is stored in variables like $name, $address etc. which is very convenient. Now I need to either pass this data to third page when PHP script stores this data in database or somehow ask user for confirmation and proceed on the same page. Problem is: I don' t know how to make variables persistent over several pages so the script on third page can use them OR how to ask user for confirmation and proceed on the same page.
One possible solution is to store all data in system variable and read it back later but it would be terribly inefficient and complicated.
I hope I made it clear enough :-) If not, please let me know! Any help would be appreciated. Hint: I'm not stupid, I just don't know how PHP works ;-)
Second question is related to this 'hint':
2. Where can I found PHP *tutorial*. I have read most of php manual (which is more like specification than manual) and I have seen tons of examples (downloaded lots of them :-). But what I couldn't find is The Tutorial that would explain the way how PHP works. I need understanding of PHP's way of organizing things. To be honest, I was surprised that it's not available from php.net.
Thanks for any help, Max
-- Max Gilead (gilead
linart.pl) http://3d.linart.krakow.pl/OfficinaArtificialis -----------------------------------------------------------------------------
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
on the first page you did something like this in your forms, no? <input type=text name=address> when a form with this text box is passed to a php page the variable $address will carry what the user entered. On the next page you probably showed the value like this: <input type=text name=address value=<? print "$address"; ?> > If you want the user to verify you could: include a hidden form field like: <input type=hidden name=approved value=1> have this form (on the second page) submit to itself, have some code like <? if (isset($approved)) { (insert the data into your database); } ?> That way the first time they come to this page it will not send to the database, but after they submit this form it will. You will want to signal that the stuff has been submitted and maybe not show the form if $approved is set.
-----Original Message-----
From: max
hebb.scilearn.com [mailto:max
hebb.scilearn.com]On Behalf Of
Max Gilead
Sent: Friday, March 24, 2000 2:52 PM
To: php3
lists.php.net
Subject: [PHP3] Two newbie questions
Hi!
I'm new to PHP so please forgive me lack of deep understanding of how it works. My questions are:
1. I want to make a questionaire. I want it to work this way: - 1. On first page user sees a form with some fields to fill in. It's validated in browser with JavaScript. It then submits form data to second page. [This step works OK] - 2. On second page user sees what he entered in nicely formatted HTML and is asked to confirm correctness of what he entered. Up to this moment it is done. Currently all form data is stored in variables like $name, $address etc. which is very convenient. Now I need to either pass this data to third page when PHP script stores this data in database or somehow ask user for confirmation and proceed on the same page. Problem is: I don' t know how to make variables persistent over several pages so the script on third page can use them OR how to ask user for confirmation and proceed on the same page.
One possible solution is to store all data in system variable and read it back later but it would be terribly inefficient and complicated.
I hope I made it clear enough :-) If not, please let me know! Any help would be appreciated. Hint: I'm not stupid, I just don't know how PHP works ;-)
Second question is related to this 'hint':
2. Where can I found PHP *tutorial*. I have read most of php manual (which is more like specification than manual) and I have seen tons of examples (downloaded lots of them :-). But what I couldn't find is The Tutorial that would explain the way how PHP works. I need understanding of PHP's way of organizing things. To be honest, I was surprised that it's not available from php.net.
Thanks for any help, Max
-- Max Gilead (gileadlinart.pl) http://3d.linart.krakow.pl/OfficinaArtificialis ---------------------------------------------------------------------------- -
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Max Gilead writes: > Hi! > > I'm new to PHP so please forgive me lack of deep understanding of how it > works. My questions are: > > 1. I want to make a questionaire. I want it to work this way: > - 1. On first page user sees a form with some fields to fill in. It's > validated in browser with JavaScript. It then submits form data to > second page. [This step works OK] > - 2. On second page user sees what he entered in nicely formatted HTML > and is asked to confirm correctness of what he entered. Up to this > moment it is done. Currently all form data is stored in variables like > $name, $address etc. which is very convenient. Now I need to either pass > this data to third page when PHP script stores this data in database or > somehow ask user for confirmation and proceed on the same page. Problem > is: > I don' t know how to make variables persistent over several pages so the > script on third page can use them OR how to ask user for confirmation > and proceed on the same page. > > One possible solution is to store all data in system variable and read > it back later but it would be terribly inefficient and complicated.
The saving of variables across pages is generally referred to as 'session management'. PHP4 can do this natively, but there are also several third-party libraries available for PHP3. Perhaps the most famous of these is PHPLIB:
For something like what you are proposing, however, perhaps full-bore sessions are overkill. The easiest quick-and-dirty way that I can think of at the moment is to simply iterate over the variables when creating the confirmation page and output a form with all of the variables set using <input>'s 'value' attribute. (This gets a bit tougher if you're using multiple selects/checkboxes; see the FAQ at php.net for more information on that.)
For instance, if you know beforehand what all of the form elements will be, you could do something like:
<form action="formhandler.php" method="post"> <input type="hidden" name="name" value="<?php echo $name ?>"> <input type="hidden" name="phone" value="<?php echo $phone ?>"> <!-- . . .yada yada yada. . . --> <input type="submit" name="action" value="Accept"><br> <input type="submit" name="action" value="Reject"> </form>
Now, the form handlers checks for the value of $action; if it's "Reject", the form is presented again; if it's "Accept", the variables are saved to the database (or whatever).
Perhaps a more elegant solution is to skip the intermediate confirmation form, and simply re-show the original form, using the value attribute to present already-entered information.
> I hope I made it clear enough :-) If not, please let me know! > Any help would be appreciated. > Hint: I'm not stupid, I just don't know how PHP works ;-) > > Second question is related to this 'hint': > > 2. Where can I found PHP *tutorial*. > I have read most of php manual (which is more like specification than
Oh, I'd disagree with that; it's just more like a manual than it is like an introductory book. :)
> manual) and I have seen tons of examples (downloaded lots of them :-). > But what I couldn't find is The Tutorial that would explain the way how > PHP works. I need understanding of PHP's way of organizing things. To be > honest, I was surprised that it's not available from php.net. > > > Thanks for any help, > Max
There's a tutorial on the php.net website:
At the end of the tutorial are links to other tutorials; in general, check out http://www.zend.com (PHP4-centric); http://www.devshed.com; and http://www.webmonkey.com.
Good luck,
Torben
-- +----------------------------------------------------------------+ |Torben Wilson <torbenphp.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben
netmill.fi| +----------------------------------------------------------------+
attached mail follows:
> > Try > > $s = $cart->show(); > $c = $cart->count; > > // A here doc > print <<< END > <HTML> > Status: $s > Count: $c > </HTML> > END; >
Yes, this will work, but it does not allow for the calling the method within the string. I tried to keep the example simple, but there is a next step that makes this technique powerful.
Consider,
// A here doc print <<< END <HTML> Status: {$cart->show()} Count: {$cart->count} <TABLE> Contents:<p> {$cart->table("<TR>", "</TR>", "<TD>", "</TD>")} </HTML> END;
The table() method would take four arguments, a pre-string and post-string for rows and cells of the table.
The ultimate objective being to create a framework where here docs contain all of the relevant HTML code and the php class contains all of the php logic. I think a system would be nice because it would be easier to do all of the HTML formatting in one place.
--pk
attached mail follows:
Hello I am having problems using the require directive. I keep getting this error: Fatal error: Failed opening required 'common.php' in /usr/local/httpd/htdocs/test/add_list.php3 on line 4 the "required file" is just a footer statement with two printf statements.. any ideas
thanks
Brad Ross http://www.SoldUSA.com Director of Technology Infrastructure Office: 704-602-2503 Cell: 704-907-4081
attached mail follows:
I for one think that Paul's idea is a good one. A regex library of useful routines (not necessarilly just for XML) is something that can't be sneered at.
However, with PHP 4.0 beta 4 currently shipping with the expat sources included and the eventual upgrading of hosts from v3 to v4, we will probably see the necessity for regex XML processing decline in the next few months. In the meantime, I wouldn't mind seeing an example of what Paul has done.
-BG
Paul Meagher wrote:
> [...]
> I mean that the XML parser is constructed out of existing PHP resources and > is not dependent upon recompiling php with new modules (expat, libxml, etc...). > Sort of like working with Perl where some scripts require that you install 5 other > libraries before you can get them to work, versus scripts that are ready to go > right out of the box. > > I personally think there should be a project to create a library of regular expressions > based XML functions for the simple reason that alot of developers without there don't have > the luxury of owning their own servers will not be able to get into the XML game > if their hosting provider does not upgrade PHP with XML support. I realize > parsers so constucted will be slower than parsers built in C and added to PHP > as extensions, however, the space of possible uses of XML is very large and > the requirement for fast response times may only exist in a small fraction of the > applications. For example, a large number of business-to-business applications > just require propogating updates among the partners and these updates can > consist of simple XML documents that can take 30-60 seconds to process without > the world coming to an end. Nobody is watching. > [...] > I look forward to any feedback on this issue. > > Regards, > Paul Meagher
-- Dr Brendan Gowing The Coastal Group5900 Mossbank Drive, Rancho Palos Verdes, CA 90275, USA 1800 E. Washington Blvd., Los Angeles, CA 90021, USA
attached mail follows:
index.php3?sometext
What is the varuable that is passed to the script in this situation i see these sites do stuff like these, HOW? thanx
attached mail follows:
The variable in this case is $sometext.
Andrian
Art Center wrote:
>
> index.php3?sometext
>
> What is the varuable that is passed to the script in this situation
> i see these sites do stuff like these, HOW? thanx
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Art Center wrote: > > index.php3?sometext > > What is the varuable that is passed to the script in this situation > i see these sites do stuff like these, HOW? thanx
The variable is initialized with the name of "sometext", and the value of the $sometext variable is non-existant.
Why this is handy, anyways: An _empty_ variable is data too. Things that can code off of this: isset(sometext); empty(sometext);
Generally, you'll see something more like: index.php3?sometext=1&othertext=blue
In which case the variable named $sometext has the value of "1", and $othertext variable has the the value of "blue"....
How to build these in PHP? With HREF statements, like a normal page link. To build them sutomatically in an HREF, use something like this: <A HREF="/here/index.php3sometext=<? echo $sometext ?>" >
HTH, -Bop
-- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.
attached mail follows:
No you didnt undestand my question!
i seen sites with like index.php3?D2378DSLKJ26d78s
so means that they got some $var in the script equal to D2378DSLKJ26d78s
i dont want to have my script like index.php3?page=mainpage i wanna have something like index.php3?mainpage
HOW? thanx
----- Original Message -----
From: "Andrian Pervazov" <andrian
truefire.com>
To: "Art Center" <ac
artcenter.ac>
Cc: "PHP Support" <php3
lists.php.net>
Sent: Friday, March 24, 2000 4:11 PM
Subject: Re: [PHP3] index.php3?sometext - what is the varuable?
> The variable in this case is $sometext.
>
> Andrian
>
> Art Center wrote:
> >
> > index.php3?sometext
> >
> > What is the varuable that is passed to the script in this situation
> > i see these sites do stuff like these, HOW? thanx
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> > To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> > To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> No you didnt undestand my question! > > i seen sites with like index.php3?D2378DSLKJ26d78s
No, I think the original answer was right. Such a case would generally add a new variable
$D2378DSLKJ26d78s = "";
What they may be doing on that site, of course, is to not use the variables defined in the URL, but to parse the URL.
A poor way to do this would be something like:
$variable = split("\?",$PHP_SELF)
$variable[1] is then D2378DSLKJ26d78s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Paul Burney
Webmaster and Internet Developer
Educational Technology Unit
Graduate School of Education and Information Studies
University of California, Los Angeles
(310) 825-8365
<webmaster
gseis.ucla.edu>
<http://www.gseis.ucla.edu/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
attached mail follows:
On Fri, 24 Mar 2000, Paul Burney wrote: > > > No you didnt undestand my question! > > > > i seen sites with like index.php3?D2378DSLKJ26d78s > > No, I think the original answer was right. Such a case > would generally add a new variable > > $D2378DSLKJ26d78s = ""; > > What they may be doing on that site, of course, is to not > use the variables defined in the URL, but to parse the URL. > > A poor way to do this would be something like: > > $variable = split("\?",$PHP_SELF) > > $variable[1] is then D2378DSLKJ26d78s
Or they may be doing in this way:
$variable = $argv[0];
from: http://www.php.net/manual/language.variables.predefined.php
argv
Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string.
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: shadow
wnet.com.br | Heart of Men!" |
| shadow
uem.br | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \
attached mail follows:
That's probably to make a page look unique to prevent cacheing.
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: Art Center <ac
artcenter.ac>
To: Andrian Pervazov <andrian
truefire.com>
Cc: PHP Support <php3
lists.php.net>
Sent: Friday, March 24, 2000 10:23 PM
Subject: [PHP3] index.php3?sometext - what is the varuable?
| No you didnt undestand my question!
|
| i seen sites with like index.php3?D2378DSLKJ26d78s
|
| so means that they got some $var in the script equal to D2378DSLKJ26d78s
|
| i dont want to have my script like
| index.php3?page=mainpage
| i wanna have something like index.php3?mainpage
|
| HOW? thanx
|
|
| ----- Original Message -----
| From: "Andrian Pervazov" <andrian
truefire.com>
| To: "Art Center" <ac
artcenter.ac>
| Cc: "PHP Support" <php3
lists.php.net>
| Sent: Friday, March 24, 2000 4:11 PM
| Subject: Re: [PHP3] index.php3?sometext - what is the varuable?
|
|
| > The variable in this case is $sometext.
| >
| > Andrian
| >
| > Art Center wrote:
| > >
| > > index.php3?sometext
| > >
| > > What is the varuable that is passed to the script in this situation
| > > i see these sites do stuff like these, HOW? thanx
| > >
| > > --
| > > PHP 3 Mailing List <http://www.php.net/>
| > > To unsubscribe, send an empty message to
php3-unsubscribe
lists.php.net
| > > To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
| > > To search the mailing list archive, go to:
| http://www.php.net/mailsearch.php3
| > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
| >
|
|
| --
| PHP 3 Mailing List <http://www.php.net/>
| To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
| To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
| To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
| To contact the list administrators, e-mail: php-list-admin
lists.php.net
|
|
attached mail follows:
> We have this working. Suggested it as the template engine, but was told > it was lame. Look at the first 10 messages of the template list. You can > view it at http://jadeke.projectsanity.org. The problem is it is horribly > slow. It needs to be in C as a phpModule not in PHP. > > We had other deadlines so we dropped it. It was functional though. You > could even bind tags to database fields. Everything worked ok speed wise > until we implement loops. If and while were too slow cause we had to copy > the tree to iterate. If's and thens worked fine. >
Interesting. I say leave out the loops anyway, who needs 'em in a template?
attached mail follows:
Hey everyone,
Just a quick question for anyone who cold help me please....
I'm making a website with php where I have a kind of an article section on one page. This is replicated on another page, and I was wondering if anyone knew any code whereby i could pull text from other pages by defining what tags to pull it between. For e.g. :
<article> Article headline Date posted
This is an article headline para which acts as an introduction. </article>
I'm not using xml here, so I guess those tags would be replaced by html comments.
Could anyone help me on this ?
Thanks
Sunny
__________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com
attached mail follows:
On Fri, 24 Mar 2000, [iso-8859-1] Sandeep Hundal wrote:
> Just a quick question for anyone who cold help me > please.... > > I'm making a website with php where I have a kind of an > article section on one page. This is replicated on another > page, and I was wondering if anyone knew any code whereby i > could pull text from other pages by defining what tags to > pull it between. For e.g. : > > <article> > Article headline Date posted > > This is an article headline para > which acts as an introduction. > </article> > > I'm not using xml here, so I guess those tags would be > replaced by html comments.
I'm sure there is a way, but it seems like it would be a lot easier if you simply moved the article to its own file, and include()'d it in all the files that want it.
Matt
attached mail follows:
I think this should work. it should strip away everything before the <article> tag and everything after the </article> tag and it'll strip the article tags as well. The only thing left will be the stuff between the tags.
Ryan
if (file_exists($file)) { $fp = fopen($file,"r"); $contents = fread($fp); fclose($fp); $article = ereg_replace(".+<article>","",$contents); $article = ereg_replace("</article>.+","",$article); }
> Hey everyone,
>
> Just a quick question for anyone who cold help me
> please....
>
> I'm making a website with php where I have a kind of an
> article section on one page. This is replicated on another
> page, and I was wondering if anyone knew any code whereby i
> could pull text from other pages by defining what tags to
> pull it between. For e.g. :
>
> <article>
> Article headline Date posted
>
> This is an article headline para
> which acts as an introduction.
> </article>
>
> I'm not using xml here, so I guess those tags would be
> replaced by html comments.
>
> Could anyone help me on this ?
>
> Thanks
>
> Sunny
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Can i host like 3 sites in one? with $PHP_SELF ?
can i have index.php3 script check and then include files depending on the domain they are going to?
attached mail follows:
Hi all, I want to use SMNP in php to browse my small net work any examples? thanks for your help Minh
- Next message: php3-digest-help
lists.php.net: "php3 Digest 25 Mar 2000 17:59:45 -0000 Issue 1561"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 24 Mar 2000 20:46:31 -0000 Issue 1559"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]