Jump to content

Input Field


nthomthom

Recommended Posts

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?

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.