I know that when you want to have a value in the form like search you can do like
<input type='text' name='search' value='$_GET[search]' placeholder=' Search'/>
by using placeholder="value" you will have the text in the form when click it will be disappear, but that is only valid in HTML5. Even though most of the browsers now are support (maybe few still not), but this is an assignment, so I’m not suppose to use HTML5 or JavaScript. Where JavaScript you can also do something like.
<input type="text" onfocus="if(this.value=='Enter your text here...') this.value='';" onblur="if(this.value=='') this.value='Enter your text here...';" value="Enter your text here..." />
So now I only have two option left.
- is to find any attribute that is actually valid in XHTML 1.0
- Use php to have the value like
placeholder
Stop stop stop. What you want? Placeholders is a CLIENT-SIDE technique. You cannot create placeholders with server-side technology. You can check the values on the server side anyway for security goals.