Jump to content

jango

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by jango

  1. I have attempted to implement those changes and have failed yet again, though through further research I had found the following code/posting which implements what I am trying to accomplish: <?php $action = $_POST['action']; if (isset($action) ) { $name = $_POST['name']; if ($name=="Friday") echo "Have a nice weekend!"; elseif ($name=="Saturday") echo "Tomorrow is Sunday!"; else echo "Please enter Friday or Saturday"; } ?> <form method="post" > Name: <input type="text" size="10" maxlength="40" name="name"> <input type="submit" value="Send"> <input type="hidden" name="action" value="submitted"> </form> From the following post: http://www.phpfreaks.com/forums/index.php/topic,135555.msg571792.html#msg571792 I have attempted to implement the above stated code into my work and have been unable to successfully get it (the code) to do what I need. Can anyone provide any insight into how I may utilize my code from my first posting in combination with the code from this posting to have my search results returned to a text field/area on my initial page? Thank you.
  2. Hello, Curious to know if someone could point me in the right direction, been struggling with this for a bit now. I have a HTML page with a search field, I can enter a search term and hit the submit button and I am directed to my search.php page with the appropriate results. What I am looking to accomplish is having the search results from the search.php page displayed in a text area below my search field in my HTML page. I have included an image to better describe what I am looking to accomplish: Additionally below is the source from my HTML page and search.php page: page.html <form name="search" action='search.php' method="post"> <input type="text" class="myinputstyle" name="search" value="search" onClick="this.value=''"/><br> <input type="submit" value="submit" class="myinputstyle"> </form> search.php <?php $search = "%" . $_POST["search"] . "%"; mysql_connect ("localhost", "game_over", "Ge7Ooc9uPiedee3oos9xoh4th"); mysql_select_db ("game_over"); $query = "SELECT * FROM game_over WHERE first_name LIKE '$search'"; $result = mysql_query ($query); if ($result) { while ($row = mysql_fetch_array ($result)) { echo "Name: {$row['name']} " . "{$row['lname']} <br>" . "Email: {$row['email]} <br>" . } } ?> Any insight would be most appreciated. Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.