Home › Forums › Other › Help/suggestions with a contact form, please! › Reply To: Help/suggestions with a contact form, please!
No, I don’t understand PHP in depth.
The key concept (that relates to your current questions) is that it’s a server-side language. Once you add a
.php extension to your webpage, it is no longer a webpage, but a script that is executed on your server and sends its output (which is (hopefully) a webpage) to the user’s browser. At this point, it is a “normal” webpage; but the code you are writing is definitely not.
This is also the reason that you need a server that supports PHP in order to run/test PHP scripts. Browsers don’t parse it (and, therefore, neither will codepen).
I don’t understand what “PHP installed on my computer” means.
xampp/wampserver/whatever are very beginner-oriented packages and are pretty easy to install and use. Your php scripts will go in the web root directory, and you’ll run them by visiting
http://localhost/whatever_you_named_your_script.php in your browser. Simples.
XAMPP … complete with Apache, MySQL and PHP.
…and the extra “p” is for perl, though it ought to be for python. Ah well; you can’t win them all.
My server now apparently supports PHP after a battle with my host company. I’ll still switch to another host after the new site is ready, but I digress.
If it was “a battle”, check what version of PHP you ended up with. (Ask them; or use the
- 5.5+ is best.
- 5.4 is pretty darn good.
- If it is anything less than 5.3.x, you should seriously consider switching hosts (and before you try to get anything to work, not after).
- If it’s less than 5.2.x, there’s really nothing to consider: leave now.
It appears, based on older CF’s I’ve done in the past, that this one only requires my email address to be entered into the PHP script in the head tag.
I’m not sure what you mean by “head tag”…? I assume you’re talking about the call to
$formproc->AddRecipient() method (which there doesn’t seem to be anything wrong with, but, as I said above, we’d need to see the actual code).
Would posting the PHP and/or modified contact form with codepen be of help to you?
It would be much more helpful to use a service like pastebin or make a gist on github. The modified version is what we would need to see; you can post a link here when you are ready.