Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Build an XHTML form for submitting information about the item which is being req

ID: 3651277 • Letter: B

Question


Build an XHTML form for submitting information about the item which is being requested. Require that the visitor provide a brief description of the item, the desired size, and an email address for confirmation.
Use the POST method of transmission, since this is the sort of application which often leads to updates to databases.
The script will contain a hardcoded email address for the flea-market organizer.
The script will use string operations - primarily concatenation operations - to build a text message which will be sent to the flea-market organizer. The text message must include plenty of descriptive text, and the information supplied by the visitor should be placed appropriately.
After creating the message, the script will invoke the functions used to send it to the flea-market organizer.
(NOTE: Performing an actual test transmission may not be possible - please discuss this on the boards.)
Work with the text message further - the next step is to send a confirmation email to the visitor, so add text to the message which identifies the message as such. (Add the new text to the FRONT of the message . . .)
Invoke the mail function again (remembering that you may not be able to send an actual message), then use the XHTML portion of your script page to display the contents of the confirmation message.

Explanation / Answer

The code below creates a form submit button: name: specifies the identification assigned to this submit button. value: is the label that appears on the button. Identifying the submit button on the server side The name and value of the button that is pressed to submit the form is passed to the server side script. For the button above, when you click on the submit button, the data passed to the server side script is: mysubmit="Click!" Multiple Submit buttons You can have more than one submit buttons in a form. But, how to identify from the server side which of the buttons was pressed to submit the form? One way is to have different names for the submit buttons. In the server side script you can do a check like this : if(!empty($_REQUEST['Update'])){ //Do update here..}elseif(!empty($_REQUEST['Insert'])){ //Do insert Here} Note: The code depends on the server side scripting language you use. The code above is in PHP. The second method is to have different values for submit buttons with the same name. The server side code goes like this (PHP code): if($_REQUEST['Operation'] == 'Update'){ //Do update here..}elseif($_REQUEST['Operation'] == "Insert"){ //Do insert here} only reward if helpful.
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote