Howdy!
To start, I can say with confidence that "<?" represents PHP. With that said, let's move on...
I have been researching threads and downloading snippets 'n such for some time now looking for what I think would be a rather simple task, however I have not succeeded in my objectives thus far.
I will attempt to explain as directly as I can, but please forgive me if I refer to things incorrectly.
The objective:
After a whole heck of a lot of data entry I have successfully logged all of my plants into a mySQL database.
Now I would like to have one (1) form field...
<html>
<head>
<title>Plant</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="plant" method="post" action="plant.php">
<input type="text" name="plant" size="5" maxlength="5">
<input type="submit" name="Get Plant Info">
</form>
</body>
</html>
This form field then goes to "plant.php" to process the plant name, or heck even the same page for all I care.
I then call the database in "plants.php" using the code my host provided:
$dbh=mysql_connect ("", "", "") or die ('I cannot connect to the database.');
mysql_select_db ("plants");
Next I grab the four columns in the plant table...at least I'd like to.
This is where I fail and heave my monitor out the window.
All I want is an easy way to reference my stock. It took a few months for me to put all 4,658 different plants I have (or have had and may get again) into the database.
The results should be a simple ASCII list:
Daiseys - 100 - Instock - Greenhouse A
There should never ever be two rows, ever.
I say that because the closest I came was spitting out the entire content of my database.
So, if you would, please help me; all of you codeing guru's out there... And feel free speak to me like a four year old - remember how I started this post?