View Single Post
Join Date: Jan 2009
Posts: 1,365
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 164
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: php code to search and show results on same page

 
0
  #5
Jan 8th, 2009
  1. <form action='<?php echo $_SERVER['PHP_Self']; ?>'>
  2. <input type='text' name='field1' value='<?php if(isset($field1)){echo $field1; } ?>'>
  3. <input type='text' name='field2' value='<?php if(isset($field2)){echo $field2; } ?>'>
  4. <input type='text' name='field3' value='<?php if(isset($field3)){echo $field3; } ?>'>
  5. <input type='text' name='field4' value='<?php if(isset($field4)){echo $field4; } ?>'>
  6. <input type='submit' onclick="return confirm('Are all fields complete?')">

I like to add confirmation to the submit button, degrades ok with javascript disabled,
Last edited by peter_budo; Jan 9th, 2009 at 6:13 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote