Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jeffrivers

  • Rank
  1. I found the error. I was missing the '$' in front of row in this part of the code in view_quotes.php: {row['quote_id']} fixed to {$row['quote_id']} Thanks again for helping me identify the issue.
  2. I did notice that. Here's what I see: http://localhost:8888/phpfortheweb/edit_quote.php?id={row['quote_id']} What's the fix for this?
  3. Here's the HTML after adding the snippet you included above: <pre>Array ( [id] => {row['quote_id']} ) Array ( ) </pre> <!doctype html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" media="all" href="../css/style.css" /> <title>Edit a Quote</title> </head> <body> <div id="container"> <h1>My Site of Quotes</h1> <br /> <!-- BEGIN CHANGEABLE CONTENT --> <h2>Edit a Quotation</h2><p class="error">This page has been accessed in error.</p><hr />
  4. I haven't run the query using phpMyAdmin, but I copied/pasted the query from the edit_quotes.php file into the next exercise (delete_quote.php) and I was able to delete quotes: //Define the query. $query = "SELECT quote, source, favorite FROM quotes WHERE quote_id={$_GET['id']}"; if ($r = mysql_query($query, $dbc)) { //Run the query. $row = mysql_fetch_array($r); //retrieve the information. So, this would indicate that the query works, right? Why would it work in one instance (delete) and not another (edit)? I checked my DB user's privileges and it appears I have all privileges enabled...
  5. I'm working my way through Chapter 13 and I'm unable to get my edit_quote.php page to work. The error message I'm getting is: I understand that the reason for this is that the script isn't getting a valid ID. I'm just not sure why. Here's my code. I've reviewed it line-by-line a few times, but I'm not seeing the problem: <?php define('TITLE', 'Edit a Quote'); include('templates/header.html'); print '<h2>Edit a Quotation</h2>'; //Restrict access to adminsitrators only. if (!is_administrator()) { print '<h2>Acess Denied!</h2> <p class="error">You
  • Create New...