How to insert data into table - html

I need to know how to insert data into table. For example (Table - students info) :
No | Student Name | Address | Phone Number
1. | Add | |
Add - is a hyperlink. The user need to click Add(hyperlink) to add student. After the user click Add, then this page will be display :
Student : <textbox>
Address : <textbox>
Phone Number : <dropdownlist> <textbox>
Submit<submit button>
Then, the user will click Submit button and the data that the user enter will be display in the table. Like this :
No | Student Name | Address | Phone Number
1. | Patrick | Malaysia| 013366666
2. | Add | |
I'm using Microsoft FrontPage 2003. Thank You.

it sounds to me like you are wanting to perform 3 functions. 1.) functionality to add to the list. (the add link.) 2.) to build a form to input the data for the list. 3.) to print the list out. (or echo the list in a table).
You mentioned that your using frontpage, however some more information would be great in order to better assist you. For example, what server technologies do you have available? (php, database type?, cgi, asp, etc.) or is your add functionality going to add the data to a flat file? (.txt, etc.) usually only used for storing the data locally. If you are unsure which server technologies you have available (if any), you can ask your web server administrator, isp, or web hosting provider.
I know I should avoid statements based on opinion.. However, probably the best way to get a very good output would be to use php and a database server to conduct all of this. I say this because, if you use a database server as opposed to a flat file, you can "echo" the data with some organization, instead of the organization just being what student information was entered first. With the database technology, you could organize it with the country they are from, or by the first or last name, etc. Making it so that if the list gets really long you aren't hunting for the students information you are looking for, or needing to use the find functionality in your browser or other program you might use with this. just a little insight to help you avoid future headaches. :)
Ok so if you can give use some of that information, it might help us help you a lot easier!
oh, and here is a link about what Microsoft has to say about collecting and storing form data entered by site users: http://office.microsoft.com/en-us/frontpage-help/collect-and-store-form-data-entered-by-site-visitors-HP005261723.aspx
Hope you find this helpful, or at least somewhat informative. Sorry I couldn't help you further without knowing more information about what server technologies you have available. However, if you get that information to us I am sure that we can assist you a lot "better".

Related

eCommerce website - What should I check when inserting data

Hello everyone!
I am working today on a project to make an e-commerce website (Exercise given for my studies).
I am currently controlling the different entries that the administrator can make (Creation of a product, a brand etc)
To make my controls I use express-validator and here are my different tables with their parameters:
Customer:
User name
Email
Password
Product:
Product Name
Description
Price
Image URL
Quantity of product
Brand ID
Brand ID:
Brand Name
Logo URL
And more
I would like to know what is common to verify the validation of the data inserted from an e-commerce site.
For example for the user, I verify that when creating an account, the password, email, name is filled (.notEmpty())
I don't know if my question is appropriate but thank you in advance for any answers!
Have a nice day / evening.
So this answer may sound blatant to you and maybe nothing new. But you should validate everything that is coming from the client-side. You just can see what you're sending in your forms or when making a request. For the general guidelines, you can read: https://owasp.org/www-project-top-ten/
There are a lot of parts like not just security but reliability and such which could look like the same thing but are actually different and really depend on your business requirements and use cases. But I will write my own recommendations of what I observed through many years in web development, keep in mind that my statements are not the only truth or one way to do it or the best practice, so you should take it with a grain of salt, do you your own research and make some informed decisions.
Most basic things would be:
Sanitize and validate the data coming from the client-side.
Set predefined max length of some values if possible.
Check if an entity exists in a database, like username, product, or product quantity and such.
Always use the encryption for the passwords recommended at the current time.
Now more specific business and reliability parts could be (these are just recommendations):
Recommendations:
Username should contain letters and/or numbers only
Username, Email should not be case sensitive.
Disallow creating a customer with a very similar username like: John or J0hn.
Also one suggestion I would give is to look at some open source projects and how such things are done there, such projects are quite large so it will definitely take some of your time, but it may give you a better idea of how most of those e-commerce website work in general.
I really feel like this question and answer would fit better in softwareengineering.stackexchange.com. But anyway just trying to be helpful :)

Restricting users to proper read/write/update permission in MySQL

Let's assume there is a website called as mysite.com -
Now, mysite has users who have registered for the website.
Say Jane and John are two registered users on the website.
mysite.com uses MySQL to store its data.
Say there are tables such as Users which stores username, address, contact, etc,.
My question is how do i make it possible such that Jane -
can only read her rows from the Users table.
can only modify her rows from the Users table.
Also, while modification she cannot update the value in for username cell.
Also, what general roles are given to Jane and John with respect to the database? They cannot obviously cannot connect to MySQL as root/admin users. How to handle this situation?
You would not try to control this at the level of database users. Really, your database users are strictly for different pieces of code that interact directly with your database. Within your back-end code you would want to check which user of your software is logged in, and then restrict them to only reading or writing certain rows or data.
There is no way to set a MySQL user to be able to read/write some rows of a table and not others.
To expand on this... You may have a piece of software that lets Jane read some information but not write anything. That piece of software should connect to your database as a MySQL user with the minimum permission necessary to accomplish it's task. E.g. it can select but not update or insert. Another piece of software may allow users to edit rows, so you set up a MySQL user for that software which does have the update permission.
I've done this in my mini project once, my project was based on HTML, CSS, JS, PHP, and MySQL where I had created one website to store employee database, and employee can log in to there account and make some changes like to address or phone number, but I didn't give permission to changes Name, Government ID, or something which is permanent.
All this I did in front-end and not in back-end.
You can do this to, say Jane and John account where they can change there own information.
There is disabled attribute that is used in HTML where you can restrict the user from inputting any value
This is what I believe your answer would be based on how you explained your problem. If it worked, your welcome!

How to insert entries from a user perspective

I want to build a small Access database to better keep track of the companies we are looking at. I read Access 2010 Inside Out by Conrad/Viescas, did a lot of their examples and had the feeling I understood the basics, so I started with my own data base. Now the struggle begins, I think I have a basic misunderstanding here.
The relation I started with is quite simple: Each company we look at can have listed peers that we want to use to compare this company to. Of course, each company can have many peers and each peer can be the peer of many of our companies. So I modelled this relation as a many-to-many relationship:
Next, I created the form for a company, which looked something like this:
I related the subform I used to show the peers with a query that is based on tblPeersCompanies_1 and gives some additional information. What I now want from a user perspective is straightforward: A user should simply add peers to this subform for the company he is currently viewing. Access should then automatically update tblPeersCompanies_1 and tblPeers_1. The peers really serve no other purpose than to relate them to a company.
However, I struggle implementing this. Adding a new peer to the subform does not work, simply because it is not based on tblPeers_1 and if I enter the information there, Access notices that the peer is not in that table yet. (That is at least what I think the problem is). How can this be achieved though? I don't want the user to open another form, enter the peer first, go back to this form, type the peer again and the other related information. I hope that there must a simple way to do that automatically. Or is this indeed not so simple.
In summary, the question probably can be phrased as: "How to add records to a matching table and a related one-table on the fly in a form?"
Thanks to the great comment by #Remou, I found a solution to this problem. It contais three steps:
Use a combo box as outlined in another SO post
Use this function to automatically enter new records in case the peer is missing. Call this function in the "On Not in List" event
Show other values from tblPeers by linking it to the selected value in the combo box, as explained here
I have to say, this is much harder than I hoped it to be. Let's hope that the learning curve is steep and that it will at least be easy to use for the user and quite robust.

User Restrictions based on Field Content in MS Access

I need to set up user permissions within the same table, based on the value of a field. I know that this is not directly possible in Access but a post on Allenbrown.com points to a way of doing this see here. I'm not proficient in coding so I'm hoping that I can get some directions from you. Here are the details:
I have two tables in the database, a parent one populated via a form and a children one populated via a subform. The parent contains companies and the child contain subsidiaries of those companies. In the child table, I have a field called "Domicile" and I want to discriminate user access based on that. Because the database will be used by a variety of people worldwide, my plan is to create user groups based on location and allow users to edit (or add) information based on a match between their location (as specified in the group) and the domicile of the subsidiary. For example, a person in Europe will only be allowed to edit data for subsidiaries that are in Europe, even though companies from other domiciles may be stored in the same table.
I'm looking for some guidance here as well as suggestions as to how you think may be done most effectively. I'm not partial to this method, that's just something I came up with to put some logic behind what I'm doing.
Thank you so much!
The important thing to note in Allen's description is (emphasis mine):
Assuming all updates are performed through forms, the Current event of the form then locks the fields based on this property.
There would be no practical, bulletproof way to prevent users from viewing and altering any data in the table(s) if they open the back-end database file directly.
Since you are asking for advice on how "[row- or column-level restrictions] may be done most effectively" the first issue you need to address is how "effective" those restrictions really need to be:
If you can accept that these will be "soft restrictions" (really a matter of convenience to the user so they don't accidentally alter certain records or fields while using the forms), then Allen's approach might be sufficient. (If so, then follow Allen's instructions as best you can and ask new question if you need help with a specific aspect of that implementation.)
On the other hand, if you need "hard restrictions" (serious protection against mischievous or malevolent user activity) then you'll have to employ a different database back-end -- something like Microsoft SQL Server -- with a richer set of security tools for you to use.

Creating a graphical representation of connections in Microsoft Access

I have another Microsoft Access question:
I am building a contact database, and some of these contacts have relationships with each other. For example, two contacts in the database might be brother and sister, and I will have marked their relationship within the database accordingly. I can generate a report with SQL that will give me the information that I want (i.e. who is related to what person). However, the problem is not the information itself, but how I would like to display said information.
Instead of a list format detailing every contact somehow related to the person in question. I would like to graphically represent a web of people. So if John Doe is the brother of Scott Doe and a sister of Jane Doe, then the Access report would have John Doe's name in the middle and then two lines coming out of the name pointing to Scott Doe and Jane Doe.
I am not even sure if this graphical representation is possible in Access, which is why I'm curious to know if anyone has ever attempted this before or if it is even possible. And then, how would one go about setting that up programmatically?
I realize that this is a fairly open-ended question, but any help would be much appreciated. For the record, I am proficient in VBA.
You could consider introducing a treeview control. And since you don't know how many levels, then in our industry, we typically use what is called recursion.
There is an example here of code to fill the treeview:
http://support.microsoft.com/kb/209891