|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
search script problems!
I am trying to write a php page for searching the user database for specific users. This is what I have so far.
PHP Code:
this is giving me nothing at all. The error chbecking I did isn't evem echoing hte $POST_['search']. any ideas? I am an amatuer and don't know much about php or forms yet. Thanks for your time!
__________________
hey it's the CHARKING |
|
#2
|
|||
|
|||
|
heres you problem
PHP Code:
Heres the way it should be... PHP Code:
the way you had it,...you were setting $_POST['search'] equal to nothing. Then when you tried to echo nothing, you got nothing ![]()
__________________
-- Jason |
|
#3
|
|||
|
|||
|
thanks man
yah i was writting something earlier and realized as I wrote it that that was my problem, cause this time I had written it correctly. So I fixed it and it is echoing stuff now, only I have to clean somethin g up, but it seems good. so thanks
![]() ran into a new problem. small one though. I want when there is no username matching the search query, it should say something to the user about searching again or whatever. I have tried using and if statement in numerous places and it's jsut not working. I tried using PHP Code:
I tried stuff like that. well any suggestions? it seems easy, but every time I try it just gives me a blank page. Last edited by thecharking : June 18th, 2003 at 04:02 AM. |
|
#4
|
|||
|
|||
|
PHP Code:
if it is showing a blank page you may have a parse error somewhere. Post the code that shows how $findUser gets set |
|
#5
|
|||
|
|||
|
the code
not much more really.
PHP Code:
|
|
#6
|
|||
|
|||
|
what should the value for $_POST['search'] be? can you echo $_POST['search']? what does it return?
|
|
#7
|
|||
|
|||
|
what i get
when i search for something that is in the database, it simply sends me to the profile... i use headers to do it... when i search for something not in the database, i get the search term that i entered. So that's what i expected... oh but by the way... I don't really have this problem anymore because I realized that I won't need to show that little blurb about not having a user, if I were able to pull up all users that match somewhat to the search term... like msot search engines, you know? So how can I do this? you know anything? I appreciate the help.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > search script problems! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|