|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: |
<?php
$hostname="localhost";
$username="xxx";
$password="xxx";
$dbname="moodybeedb";
$usertable="retailers";
$yourfield = "region";
mysql_connect($hostname,$username, $password) or die ("CANNOT CONNET TO DATABASE");
mysql_select_db($dbname);
echo "<form action=\"retailers_delete2.php\" method=\"post\">
<select name='Province'>";
$sql = "SELECT DISTINCT Province FROM retailers";
$result = mysql_query($sql)or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$province = "{$row['Province']}";
echo "<option value='".$province."'>".$province."<br>";
}
echo "</select><br><br><input type='submit' value='submit'>
</form>";
?>
<!-- the code below is the part that isn't working for me right now. I am trying to get it to display the data I want. After I accomplish that, I will want each piece of data displayed with a checkbox attached to it. The eventual plan for this secondary form is that when submitted anything checked will be deleted from the database -->
<?php
$hostname="localhost";
$username="xxx";
$password="xxx";
$dbname="moodybeedb";
$usertable="retailers";
$yourfield = "region";
$province = "Province";
echo "<form>";
if($_REQUEST['submit']) {
mysql_connect($hostname,$username, $password) or die ("CANNOT CONNET TO DATABASE");
mysql_select_db($dbname);
$query = "SELECT * from retailers where Province='" . $_REQUEST['Province']. "'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
print "<pre>";
print_r($row);
print "</pre>";
}
mysql_free_result($result);
}
echo "<br><br><input type='submit' value='Submit'>
</form>";
?>
--
-- Database: `moodybeedb`
--
-- --------------------------------------------------------
--
-- Table structure for table `retailers`
--
CREATE TABLE `retailers` (
`id` tinyint(5) NOT NULL auto_increment,
`Province` varchar(500) NOT NULL,
`region` varchar(500) NOT NULL,
`store` varchar(500) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `retailers`
--
INSERT INTO `retailers` VALUES(1, 'BRITISH COLUMBIA', '100 MILE HOUSE', 'Hight Ground Natural Foods<br>104 Birch Avenue South<br>100 Mile House');
INSERT INTO `retailers` VALUES(2, 'BRITISH COLUMBIA', 'ABBOTSFORD', 'Campbells Gold Honey Farm<br>2595 Lefeuvre Road<br>Abbotsford<br>www.bchoney.com ');
INSERT INTO `retailers` VALUES(3, 'BRITISH COLUMBIA', 'BURNABY', 'Choices In The Park<br>6855 Station Hill Drive<br>Burnaby<br>www.choicesmarket.com/burnaby-park.htm');
INSERT INTO `retailers` VALUES(4, 'BRITISH COLUMBIA', 'BURNABY', 'Choices At The Crest<br>8683 10th Avenue<br>Burnaby<br>www.choicesmarket.com/burnaby-crest.htm ');
INSERT INTO `retailers` VALUES(5, 'BRITISH COLUMBIA', 'BURNABY', 'Natural Focus Foods<br>6536 Hastings Street<br>Burnaby ');
INSERT INTO `retailers` VALUES(6, 'ALBERTA', 'ATHABASCA', 'Bovens Jewelry & Giftware<br>4916A 50 ST<br>Athabasca ');
|
Advertisement
| Hall of Fame |