Jump to content


Photo

History in text box


  • Please log in to reply
1 reply to this topic

#1 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 24 August 2006 - 09:20 AM

I don't know if this is possible but I have a web page that displays content from a MySQL database. I have a box that if filled in can narow down the search. I thought it wouls be a good idea to add another box so I could write a complete SQL statment. The problem is the text box is behaving like a browser entry box. as soon as I type SELECT I get an enormous history of all SELECT statments. Can this be prevented as it is very disconcerting.


Desmond.


#2 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 24 August 2006 - 11:43 AM

Sorted it out. Simple realy. Why I did not think of it sooner. Use a session variable for the "name"

session_start();
$stamp = time();
if($_SESSION['Entry'] == "")
    $_SESSION['Entry'] = $stamp;

AND

<input type="text" name="<?=$_SESSION['Entry']?>">

Desmond.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users