RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

php drop down menu to search multiple sql tables

Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: php drop down menu to search multiple sql tables

  #8  
Jul 28th, 2005
lawfour, bwest is not trying to write your app for you. Instead, he's trying to teach you good programming techniques as well as giving you very good code examples specific to your task.

I think you need to take a step back, and start with some of the basics bwest is trying to show you. Start with some very minimal code. Don't try to tackle 5 concepts at one time.

For example, create a simple HTML page with nothing but a very simple form with a single text element like so:
[HTML]
<html>
<head>
<title>My Page</title>
</head>
<body>
<form method="POST" action="process.php">
<input name="fave_color" type="text" />
<input type="submit" />
</form>
</body>
</html>
[/HTML]

Then create a PHP page named process.php like so:
[PHP]
<?php

$fave_color = $_POST['fave_color'];

?>

<html>
<head>
<title>Another Page</title>
</head>
<body>

<?= $fave_color ?>

</body>
</html>
[/PHP]
Once you've mastered how to receive form variables into a PHP script and work with it, you can move on to database connections.

bwest gave you very good code examples with comments. Although it's good code practice to use an include for a common database connection, it's not easy for a beginner to understand includes. It's easier to see all the code inline. Check out code example in this thread if you are having trouble getting connected.
http://www.daniweb.com/techtalkforums/thread25821.html

You don't need to post all your code--each time you have a problem, you should be able to narrow it down to a single line of code or at least a small subset of code.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:23 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC