|
Posted by murrayatuptowngallery on 02/19/07 17:15
Started a new post because this has nothing to do with my last post on
view source etc.
Some dumb questions may follow...
I am learning PHP for a simple specialized calculator/curve-fitter
that collects input from a user then fits the data to their range of
conditions in the form of a table (actually just two columns of
output).
I bought a copy of Dmitri Koterov's book with a title something like
"Create your Web Page with PHP'. What I like about it is it explains
the how and why significantly instead of just examples.
I may eventually find an answer in there, but I'd like to supplement
reading with questions...
It APPEARS to me that my task will be even easier with PHP than
previous efforts with JavaScript.
It looks like I can simply ECHO the processed data embedded in tags,
like a <LI> list or even a <TABLE> . With JS I got lost trying to
figure out other examples people referred me to with get inner html &
item ID etc...got too abstract for me.
It doesn't need to be fancy...thus far, I think the echo method may be
adequate.
So, at last, the question...I previously had trouble with JS figuring
out how to make variables accessible to more than one script (make
them 'global'?).
I think PHP is more flexible with variables...whether or not it is a
good practice, they apparently do not need to be explicitly defined by
type (they are interpreted by content?), but are they automatically
assumed to be global?
What do I need to do to them to make them be 'global' or "remembered"
for use by more than one script? What then would be their
'lifetime'...cleared when the script is exit-ed, or until refreshed by
a new form Submit? (Maybe what I'm hinting at is whether or not there
is the concept of a 'session' that gets reset somehow.
Lastly, can Submits of form data for the purpose of recalculation be
'processed' by other means than pressing a Submit button, like a
MouseOver or MouseOff kind of thing?
I don't have an example yet to link to.
Thank you.
Murray
Navigation:
[Reply to this message]
|