close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

combine or concatenate form fields

Thread began 3/11/2010 6:34 pm by evansg7124312885 | Last modified 1/11/2012 2:10 pm by evansg7124312885 | 3955 views | 12 replies

evansg7124312885

combine or concatenate form fields

My site requires date calculations. I have set all pages that collect dates up to require users to select dates in 3 menu boxes; year, month, and day. So far I have built pages to express this data as needed using the 3 values separated by the text that makes it reader friendly. So far my work has been done in PHP/MySQL.

My databases are set up to receive year, month, day, and DATE (4 different fields); the user only enters 3 values and the 4th should be based on the prior 3. What I would like to do is at the insert or update pages, have the DATE field fill off of the 3 date values entered and insert the "-" at their appropriate points, or concatenate the values to make a valid DATE entry. Within the Insert/Update server behaviors and in the DATE field, here is a sample of one of several field command attempts that so far have failed to post vaild dates in the SQL database:
<?php echo ((isset($_POST["selYearcal1"]. "-" . $_POST["selMonthcal1"] . "-" . $_POST["selDaycal1"]))?$_POST["selYearcal1"]. "-" . $_POST["selMonthcal1"] . "-" . $_POST["selDaycal1"]:""); ?>

Again, I am trying to fill the DATE with a valid date value using the 3 user inputs.

I am learning (by no means skilled) PHP language, can anyone show me the syntax/command to combine form elements and text to create a valid date for database entry?

Thanks,

Gary

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...