php.. drvivng me around the bend..

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
hey guys.. just need a push in the right direction here, basically i am
using phpMyAdmin to store data and running php scripts to
search/add/manage the information in the database. it is like a friends
reunited style website, i have figured out code on how to search for
members, but i am wondering where to put this code?!
after the user enters info on the website, there is a search button but
how do i connect the code for searching onto this button so that when
it is pressed, the results are returned?
is it something like 'on click'..... and then the code?
please post replies as i am really stuck!!
thanks very much for your time

Re: php.. drvivng me around the bend..

I've seen a pre-built friends-reunited solution before, and I'm
wondering if that's the one you're using.


Normally you put a form in the page that calls another page, and make
it "post" it's data..

Example - in your page with the search form...

<form method="POST" action="search.php">
<input type="text" name="search" size="20">
<input type="submit" value="Go!">

then in search.php, the $_POST variables have the contents of the form,
which you might access like this...

$search = $_POST["search"];

... and then you might do something with the database...

$sql = "SELECT * FROM users WHERE foo LIKE

Hope that makes some sense...

Site Timeline