Note that there are some explanatory texts on larger screens.

plurals
  1. POwhat are the mistakes in this php web page design and implementation procedure?
    text
    copied!<p>what are the mistakes in this php web page design and implementation procedure?</p> <p>I have a php web page that contains some form elements like textboxes, textareas, radiobuttons, checkboxes, buttons and so on.</p> <p>I would like the user to fill the form then press the action button which will save the data in the database using ODBC [using PHP ODBC Functions] then send Email to specific department email address [using PHP Mail Function] and I follow the following steps to achieve that:-</p> <ol> <li><p>Design The Needed Form Elemets using HTML Tags and put them inside the .. tags in the PHP web page (file1.php).</p></li> <li><p>Change The Layout and the Styles of the HTML tags inside the PHP web page using a CSS file (style1.css).</p></li> <li><p>Create Validation functions for the form elements using JavaScript file (script1.js) like IsEmpty(str), IsRequired(str), IsNumeric(str), IsAlphaNumeric(str), IsBetween(num,A,B), IsGreaterThan(num,A), IsLesserThan(num,B), IsValidEmail(str), IsValidForm(frm) and so on as IsValidForm(frm) will validate one form element then the next from the first one till the last one using if .. else statements.</p></li> <li><p>Prepare a PHP code file (database1.php) that contains a user-defines database function SaveData() that uses the PHP ODBC functions to save (insert/update) the data filled in the form and after preparing the Form parameters and the SQL Scripts needed to do that.</p></li> <li><p>Prepare a PHP code file (mail1.php) that contains a user-defines mail function SendMail(vTo,vSubject,vMessage,vHeaders) that uses the PHP mail() function to send email and configuring the php.ini file in the web server by changing the SMTP IP Address and Port.</p></li> <li><p>Call the validation script (script1.js) then the database script (database1.php) then the Mail Script (mail1.php) in the OnClick Event of the Save Button in the Web page. This may be done using Post to enable PHP code to run in the server side or using AJAX which will need some exmaples to achieve it.</p></li> <li><p>The Form will have two read only textboxes () which will save the order number and the order date. The date can be filled using javascript but the number may have to be generated and got from the database to be unique and a primary key of the data. what are the required steps to do that ? how to generate these Number and Date?</p></li> </ol> <p>Sorry for being more detailed and more informative.</p> <p>Thanks in Advance and I hope to reciev your feedbacks :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload