kellyrmartin Posted April 7, 2008 Share Posted April 7, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/ Share on other sites More sharing options...
AndyB Posted April 8, 2008 Share Posted April 8, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/#findComment-511634 Share on other sites More sharing options...
KevinM1 Posted April 8, 2008 Share Posted April 8, 2008 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). Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/#findComment-512003 Share on other sites More sharing options...
deadonarrival Posted April 17, 2008 Share Posted April 17, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/#findComment-519266 Share on other sites More sharing options...
Barand Posted April 19, 2008 Share Posted April 19, 2008 VB is quite similar in syntax to PHP They must have made a few changes, then, since I last used it. Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/#findComment-521443 Share on other sites More sharing options...
Orio Posted April 20, 2008 Share Posted April 20, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/100050-a-vba-guy-thinkin-of-tryin-out-php/#findComment-522033 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.