Reputation: 8385
I have just started to develop the form below and I have the following questions:
How using PHP or Local Storage could I save the data of the previous page when the client clicks next?
How could I attach an image to the form. When the form is completed I would like it to be attached and sent in an email?
<form action="#" method="post">
<legend>Company Details:</legend>
<label for="companyName">Company Name: </label><input type="input" name="companyName" id="companyName"/>
<label for="companySlogan">Company Slogan: </label><input type="input" name="companySlogan" id="companySlogan"/>
<label for="companyEmail">Company E-Mail: </label><input type="email" name="companyEmail" id="companyEmail"/>
<label for="companyPhone">Company Phone: </label><input type="phone" name="companyPhone" id="companyPhone"/>
<label for="companyFax">Company Fax: </label><input type="phone" name="companyFax" id="companyFax"/>
<label for="companyAddress">Company Address: </label><textarea name="companyAddress" id="companyAddress"></textarea>
<legend>Web Hosting:</legend>
<label for="hostingRequired">Hosting Required: </label>
<select name="hostingRequired" id="hostingRequired">
<option value="hostingRequiredPleaseSelect">Please Select</option>
<option value="hostingRequiredYes">Yes</option>
<option value="hostingRequiredNo">No</option>
</select>
<label for="domain">Domain: </label><input type="url" name="domain" id="domain"/>
<label for="domainType">Domain Type: </label>
<select name="domainType" id="domainType">
<option value="domainTypePleaseSelect">Please Select</option>
<option value="domainTypeRegister">Register</option>
<option value="hostingRequiredNo">Transfer</option>
</select>
</form>
Upvotes: 0
Views: 250
Reputation: 6117
For your first question, you can save the data in a database or session variables, I think you may want to save in session variables instead (although I don't know exactly how you want to use your data).
I don't quite understand your second question, clarify... By the way, if you don't want any section to load on the selection of an option, be sure not to attach any event to it.
Use input type="file"
to attach a file (in this case an image file to the form) and send along with other data
Upvotes: 1
Reputation: 14309
Part 1:
Save the data to a database on your backend when the user hits next, it is really saving data and retrieving it on the next page.
or
pass the data in URL parameters to the next page
Part 2:
google it.
Upvotes: 0