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
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

 

Link to comment
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

 

 

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).

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.