Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 30th, 2003, 11:40 PM
Carol Carol is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sunshine Coast Australia
Posts: 23 Carol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Searching mysql table using php

Forgive how basic this question is.

I have a mysql database that i want to be able to search for specific items using different search criteria through a php form.

Can some kind person direct me to a tutorial that will teach me this.

With thanks

Carol

Reply With Quote
  #2  
Old May 1st, 2003, 01:25 AM
sliver's Avatar
sliver sliver is offline
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 897 sliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 44 m 13 sec
Reputation Power: 2
Send a message via AIM to sliver Send a message via XFire to sliver
RE: Searching mysql table using php

Simple really:
php Code:
Original - php Code
  1.  
  2. <?php
  3. //Search.php
  4. ?>
  5. <form action=handler.php method=post>Name: <input type=text name=name size=30><br>
  6. <input type=submit name=sub value='Search'>
  7. </form>

php Code:
Original - php Code
  1.  
  2. <?php
  3. //Handler.php
  4. $name=$_POST['name'];
  5. $connmysql_connect("localhost","user","pass");
  6. mysql_select_db("somedb");
  7. $do=mysql_query("select * from table where name like '%$name%'");
  8. while($row=mysql_fetch_array($do)) {
  9.    print"$row[0],$row[1]";
  10. }
  11. mysql_close($conn);
  12. ?>

I hope you can make some sense of this.

Reply With Quote
  #3  
Old May 1st, 2003, 07:40 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Searching mysql table using php

here is a link that might be useful...

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Searching mysql table using php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway