473,382 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Seeding back the field values in html form

2
Hi All,
This is my first post and I am just stuck in my assignment. I am trying to create a single page which basically check whether a name field or text field includes text or not and display message accordingly. There are three field one drop down, two text field.
Now to access the name field I have to refresh the page I am basically using some php code to validate this field on the top of the form. Now whenever I refresh the page I loose all data but it does display the error message though.

Now the problem is how I will keep the data in the field and refresh the page.? And display yhe message as well.?

I have to do this through PHP only.

Thanx to all....!!!!!!
Sep 28 '08 #1
3 2021
Markus
6,050 Expert 4TB
When you say 'refresh' are you sending the form? If so, you can just use the $_POST array to fill the fields.
Sep 28 '08 #2
gsingh
2
When you say 'refresh' are you sending the form? If so, you can just use the $_POST array to fill the fields.
Hi markus.
Thanx for the reply, is it possible to set value of fields in html through php. I had looked around in the internet but i didnt find a way i can set field value through php.

Please guide //


Thanx
Sep 28 '08 #3
Markus
6,050 Expert 4TB
Hi markus.
Thanx for the reply, is it possible to set value of fields in html through php. I had looked around in the internet but i didnt find a way i can set field value through php.

Please guide //


Thanx
You set the value of an input by the value attribute
Expand|Select|Wrap|Line Numbers
  1. <input type="text" value="some value" />
You could set the value by php, assuming the POST array contains data, by doing this:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" value="<?php if(isset($_POST['value']){ echo $_POST['value'];}?>
You would obviously have to adapt this.
Sep 28 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Joe | last post by:
Hi, I have been working on some code that requires a high use of random numbers within. Mostly I either have to either: 1) flip a coin i.e. 0 or 1, or 2) generate a double between 0 and 1. I...
3
by: Roy Adams | last post by:
Hi I'm reposting this question because for some reason can't post follow up question to this thread. What I'm trying to do is put the value and text from a a select in to a text field and to a...
18
by: Neil | last post by:
I am using SQL 7 with an MS Access 2000 MDB front end, using bound forms with ODBC linked tables. In one form, the user needs to be able to check a box to select one or more records. This is...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
by: Simon Harvey | last post by:
Hi all, Is there any easy way to check a field for calues that have changed on a post back. So the page is sent to the user, the user changes some values and I need to know which ones...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
23
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
6
by: lucyh3h | last post by:
Hi, In one of my pages, I use javascript (AJAX) to populate one mulitple select field based on user's click event on another control. I noticed that when I navigate back to this page by clicking...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.