Jump to content

read and display data


srinivasa

Recommended Posts

(question)Create a web page with four text boxes and a button. When user enters all the data and hits the submit button. Display the data entered by the user. If the user has not entered all four text boxes, prompt user to enter values for all four fields.

 

how to promt user to enter correct value? is there any prompt box function in php as there in javascript?

giv me solution(code)

 

thanks in advance...................

Link to comment
Share on other sites

That's a job for PHP but the code could get quite complicated. It's common for web forms to check if input boxes have been filled in correctly, but showing the result on the same page is an extra piece of coding because web forms are normally submitted to an email or database.

 

Here's an example with two boxes so you could repeat for four boxes:-

http://www.wickham43.net/form1.php

Edited by Wickham
Link to comment
Share on other sites

Javascript = before the data is sent to the server

PHP = when the data has been sent.

 

So use javascript to make the interaction better for the user, but use PHP to validate again and if somethings wrong you could display the form again along with let say a somewhat red box telling the user where they didn't fill it out correctly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...