Jump to content

A VBA guy thinkin of tryin out php


kellyrmartin

Recommended Posts

I have a considerable amount of experience writing VB code and a few other languages.

 

I would like to create an online order form that would email the form contents to a certain address. Is this terribly hard with php? Is there a place that would be best to start? ARe there any examples I could look at?

Link to comment
https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/
Share on other sites

It's trivial.  Pseudo-code follows:

 

check if form submit button pressed

if NOT, display form and submit

if so, abstract and validate form data (optional but obviously recommended)

concatenate form data into a sensible 'message'

send using the mail() function

 

Since the form is just html, your best help is from the manual dealing with the mail() function

 

It's trivial.  Pseudo-code follows:

 

check if form submit button pressed

if NOT, display form and submit

if so, abstract and validate form data (optional but obviously recommended)

concatenate form data into a sensible 'message'

send using the mail() function

 

Since the form is just html, your best help is from the manual dealing with the mail() function

 

 

Actually, it's probably better to go:

 

Check form submission.

If it HAS been submitted, do all processing.  If data is valid, return the good news to the user (e-mail).

If it HAS NOT been submitted OR the data isn't valid, display the form (again).

  • 2 weeks later...

VB is quite similar in syntax to PHP - you shouldn't have much of a problem.

 

Just remember to end lines with ; and use braces {}

 

Oh, and you don't need to declare variable types.

 

There are a few other differences, but that's about it with the code... other then that you use HTML for output instead of populating field forms etc.

I have a considerable amount of experience writing VB code and a few other languages.

 

I would like to create an online order form that would email the form contents to a certain address. Is this terribly hard with php? Is there a place that would be best to start? ARe there any examples I could look at?

 

I started learning PHP just because I had to do a task like this one. Eventually I finished it, and it worked just fine.

You can start out by doing something like that, learning PHP is not hard after you have other programming skills.

 

Orio.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.