robnet wrote: I suspect you are opening the php directly in the browser as in: browsing to file:///Applications/MAMP/htdocs/file.php....
CORRECT!!!
You were
right - and though there were still other problems, I figured them out on my own using your correct method
Kinda feels like this was a big DUH on my part
But like I said, I'm new to all this, I didn't know what needed to be done..
Anyway, let me explain: I did open the file as you suggested - by typing the full path with
http://127.0.0.1/filename - and it FINALLY WORKED and I get it - its gotta go through the server first - and that's how you force it to do that and that makes sense cause PHP is all about running on the server, isn't it?

(I'm so used to actionscript, javascript, html, etc.) - ANYWAY, that much is good.
HOWEVER...
I had problems with another file, a regular HTML file that has a form requesting the user to type in his name. Upon clicking the "submit" button, the ACTION on the FORM calls another file - a PHP file called "message.php" - that will simply spit back the name - and
that file wasn't working.
I looked at the ACTION attribute in the FORM tag (this is in the HTML file) - it was
Code: Select all
<form action="message.php" method="post">
and it wasn't working - it was just displaying the CODE of the PHP file.
So...I changed the action to be
Code: Select all
<form action="http://127.0.0.1/message.php" method="post">
figuring this would force it to go through the server - it worked.
Friggin' FINALLY!!
It all makes sense - and I knew it had to be something really simple cause all the install and utility/diagnostic app & files were clearly saying everything was running smoothly...
Like I said: its a big DUH - BUT, we're finally DONE with this. Its working.
Now I can finally focus on learning the actual
language of PHP - which seems really straightforward thus far - instead of focusing on this back-end stuff - which I've never been interested in and always handed off to the sys-admin guys who's job it was to take care of it anyway.
So....THANK YOU GUYS!!
Really appreciate it.
I'm off an running - thanks to you
Cheers,
-S