homepage Welcome to WebmasterWorld Guest from 54.198.42.105
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
HTML Forms
how to get selected and entered data on submit into a new page
Torsian




msg:4473750
 7:54 am on Jul 9, 2012 (gmt 0)

Hi There,

I have created a form where the consultants at work can input what they have been doing the day: i.e: Jack JJ001 - Has done typing from 09:45 to 10:55 on 2012/07/09 until 2012/07/09 on sumbit these informtion that Jack has entered must show on a seperate page, but I can't seem to get the information to display on a second page, I can only get the tables names through, but the data entered and selected does not pull through ? the data must then also always be there, for everyday that Jack has used this program, I will then at later stage be able to get a monthly report through that ? Can any one help me? I am desperate, I do not have such an excellent scripting experience and would really appreciate some help...

Thanking you in advance.

Torsian

 

phranque




msg:4473760
 8:07 am on Jul 9, 2012 (gmt 0)

welcome to WebmasterWorld, Torsian!

this is more of a server-side scripting issue than a markup issue.
which scripting language are you using?

swa66




msg:4473761
 8:14 am on Jul 9, 2012 (gmt 0)

You need a lot more than a form.

You need authentication (and authorization), you need session management and other security features. Otherwise John can fill in that Jack has done nothing. Or Jill can snoop around and see what everybody has been up to.

You need storage (typically: a database) to remember what has been filled in and who can authenticate in which way (store one-way hashed paswords (with a salt), store the entered data, ...

IOW: the form you have might at best be the beginning of an interface to the user. But there is no "state" in http: it doesn't remember anything. All of that needs to be programmed.

In the end you'll have to chose a server side scripting language and thoroughly learn it and a database underneath it. Esp covering the security features is something not trivial as virtually all examples you'll find aimed at beginners leave out security completely - yet it's essential. So you have to become quite senior before you can make something usable in real life.

Torsian




msg:4473762
 8:25 am on Jul 9, 2012 (gmt 0)

I am using HTML for the web side and will be using php and sql to get, the data and save it on the DB, but I would like the data that "John" has just entered to save show on the second page, in the backround all that has to be saved to a db file where I can use sql to get the information ? Does that make sence or not I am new at this so it's difficult to express the exact words and terms :)

swa66




msg:4473785
 11:47 am on Jul 9, 2012 (gmt 0)

In a simple world (i.e. one without ajax and the like - it's still the same but allows more interaction between client side scripts and servers):

- your server sends HTML to the browser including a form (either generated by php or plain html - doesn't matter)
- the browser sends you data back in a GET or POST depending on how the HTML tells it to. It does that once the user presses the "submit". For the browser the entire thing is now a thing of the past: it goes on to a brand new page (just like following a link is) that it expects to get from the server.
- your script gets the data and does its thing with it and has a choice: 1. it can send back html to the browser to show whatever it likes (including more forms). 2. it could send a redirect to the browser to tell it to go elsewhere next.
There is no background, remembering of what was filled in, etc: your php script has to do all that by itself.

Technically the second form sent by the php script that received the first from's result could include a "hidden" input field: but it's most often a bad idea to go there as it's almost a guaranteed security vulnerability in your application unless you really know what you're doing [it's one of the first things hackers look for: hidden field: tampering with it is trivial]

Best if you look in the php forums if you're using php, they'll use the php terminology.

Torsian




msg:4473793
 12:33 pm on Jul 9, 2012 (gmt 0)

thank you so much for your help :)

Really helped a lot

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved