nthomthom Posted September 18, 2009 Share Posted September 18, 2009 Hello I would like to create two text fields one to ask the user for input and the other to verify that they are the same, then i would like to create a submit button which i have an image for, and then update the mysql table with the new information? How would I be able to do this? Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/ Share on other sites More sharing options...
Amtran Posted September 18, 2009 Share Posted September 18, 2009 I think doing everything is discouraged in this forum, so I'll point you in the right direction. To check the input fields, you can use Javascript or PHP, but javascript is much easier. Google "javascript form validation". Then, google "submit button image" Finally, learn PHP and MySQL. That's going to be more in depth, and would basically require lessons if someone were to help you in this forum. Google PHP + MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-920510 Share on other sites More sharing options...
nthomthom Posted September 19, 2009 Author Share Posted September 19, 2009 Yes, I'm sorry I didnt really need to much help with mysql, actually what i need help with is how to create an input field, i'll do a google search. thank you. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921032 Share on other sites More sharing options...
nthomthom Posted September 19, 2009 Author Share Posted September 19, 2009 Actually I am trying to create a PO Request Number system. So my concern is if i email the page where it ask them to enter a PO# then to submit, it this unsafe to have no login for this considering that it puts info into the sql table? Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921045 Share on other sites More sharing options...
trq Posted September 19, 2009 Share Posted September 19, 2009 Actually I am trying to create a PO Request Number system. So my concern is if i email the page where it ask them to enter a PO# then to submit, it this unsafe to have no login for this considering that it puts info into the sql table? Sorry, that makes no sense at all to me. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921049 Share on other sites More sharing options...
mikesta707 Posted September 19, 2009 Share Posted September 19, 2009 javascript isn't a good way to validate data, since it can be turned off server side. if you don't know how to create input boxes, then you will have to learn HTML. if you have the SQL statement(s) down, its really just about doing a query with PHP. its quite simple, but if have no clue where to get started, learn HTML, and PHP Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921058 Share on other sites More sharing options...
nthomthom Posted September 19, 2009 Author Share Posted September 19, 2009 Well I know how to create fields in a .html file, then transfer the info to a .php file... Anywho I was wondering if there was a way to directly put them into a .php file. Sorry that the statement above didn't make any sense. See I want to create a field for someone to enter information in a php file for instance: "/purchaseorder.php?number=20" This is a public file which is not secured by anything (such as a login). For instance when the person enters a value in the field and clicks submit the table is updated with the information in the table WHERE po_number is = $_GET['number']. I wanted to know if it is possible that someone can enter info into a field to destroy the database (is that possible?) and if i should required that the customer enters their login info. this would be simple as all I have to do is require the file which makes sure that the person is logged into the system. However, i though this would be an inconvenience, but if it is a security issue then I am better off requiring them to login in. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921063 Share on other sites More sharing options...
trq Posted September 19, 2009 Share Posted September 19, 2009 I wanted to know if it is possible that someone can enter info into a field to destroy the database (is that possible?) Yes its possible. You need to make sure your users are posting only valid data and that you sanatise any variables used within SQL queries. should required that the customer enters their login info Just because a customer is logged in doesn't make it any more secure, it just means you can keep track of who's doing what. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921066 Share on other sites More sharing options...
Amtran Posted September 19, 2009 Share Posted September 19, 2009 javascript isn't a good way to validate data, since it can be turned off server side. True, if something HAS to be validated. Usually it's just for the client's benefit "passwords, usernames, etc." If they turn off javascript, it's their loss. Quote Link to comment https://forums.phpfreaks.com/topic/174658-input-field/#findComment-921067 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.