Jump to content

craiggerz

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

craiggerz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I'm looking for information on how to upload an image to a database? Can someone point me in the directions of some tutorials? Also is there a way that I can import a database into myphpadmin? I use Freeservers and I see the export function but no import, or is it just that import has been disabled? Thanks, Craig!
  2. I didn't figure it out, but I completely started over and it works now so please don't worry about this anymore. Thanks!
  3. That doesn't seem to work. All that is showing up for my page source is the following, which is obviously not correct. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> </head> <body>
  4. Sorry lets try this again. I even tried setting $breedName within the PHP file so it's not the HTML file that is calling it that is the problem, there must be something wrong with this code. Thanks again! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> </head> <body> <?php require db.php; // Show all dogs with the breedname in a <table> function displayDogsList($connection, $query, $breedName) { // Run the query on the server if (!($result = @ mysql_query ($query, $connection))) showerror(); // Find out how many rows are available $rowsFound = @ mysql_num_rows($result); // If the query has results ... if ($rowsFound > 0) { // ... print out a header print "Dogs of $breedName<br>"; // and start a <table>. print "\n<table>\n<tr>" . "\n\t<th>Wine ID</th>" . "\n\t<th>Wine Name</th>" . "\n\t<th>Year</th>" . "\n\t<th>Winery</th>" . "\n\t<th>Description</th>\n</tr>"; // Fetch each of the query rows while ($row = @ mysql_fetch_array($result)) { // Print one row of results print "\n<tr>\n\t<td>{$row["dog_id"]}</td>" . "\n\t<td>{$row["name"]}</td>" . "\n\t<td>{$row["price"]}</td>\n</tr>"; } // end while loop body // Finish the <table> print "\n</table>"; } // end if $rowsFound body // Report how many rows were found print "{$rowsFound} records found matching your criteria<br>"; } // end of function // Connect to the MySQL server if (!($connection = @ mysql_connect($hostName, $username, $password))) die("Could not connect"); // Secure the user parameter $regionName $breedName = mysqlclean($_GET, "breedName", 30, $connection); if (!mysql_select_db($databaseName, $connection)) showerror(); //$breedName = "Schnoodle"; // Start a query ... $query = "SELECT * FROM dog"; // run the query and show the results displayDogsList($connection, $query, $breedName); ?> </body> </html>
  5. Hi guys, I'm new to php and I'm trying to set up a form that you can select a "filter" and the results will show up. The problem is that nothing is showing up. I've attached it below if someone could tell me what's going wrong that would be great, I'm trying to use a book as a guideline. Thanks! [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.