Seitan Posted December 6, 2006 Share Posted December 6, 2006 I need help with this code, I keep getting a parse error, but I can`t see what I did wrong. I`ve looked it over a billion times, I just don`t get what I`m forgetting. Here is my code[code]<?php # view_users.php// This script retrieves all the records from the users table.$page_title = 'Breakfast';$header = 'Breakfast';include ('../php/header.php');require_once ('../shhhhhhh/mysql_connect.php');$query = "SELECT `Recipe Name` AND 'Recipe_Number' FROM `Recipes` WHERE `Category` LIKE 'Breakfast' ORDER BY `Recipe Name` ASC";$result = @mysql_query ($query); if ($result) { // If it ran OK, display the records. // Fetch and print all the records. while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { echo "<a href = "recipes.php?id={$row['Recipe_Number']}">{$row['Recipe Name']}</a>"; ?> <br><br> <? }[/code] Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted December 6, 2006 Share Posted December 6, 2006 [code]echo "<a href = "recipes.php?id={$row['Recipe_Number']}">{$row['Recipe Name']}</a>";[/code]should be[code]echo "<a href=\"recipes.php?id={$row['Recipe_Number']}\">{$row['Recipe Name']}</a>";[/code] Quote Link to comment Share on other sites More sharing options...
drifter Posted December 6, 2006 Share Posted December 6, 2006 not sure if what you posted got cut off, but[code] ?> <br><br> <? }[/code]needs should be[code] echo "<br><br>"; }?>[/code] Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted December 6, 2006 Share Posted December 6, 2006 Assuming there are no parse errors following what was in the OP, the:[code]<br><br> <? }[/code]looks fine to me. It's the unescaped double quotes in the echo statement. Quote Link to comment Share on other sites More sharing options...
Seitan Posted December 6, 2006 Author Share Posted December 6, 2006 Sweet thank guys. that was driving me nuts! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.