ntroycondo Posted September 4, 2010 Share Posted September 4, 2010 I'm trying to add a link to edit my results. Not sure the best way to create the link, nothing I've tried works. There's probably a better way than what I've tried: echo 'There were ', mysql_num_rows($result), ' Matching Photographers:'; while ($row = mysql_fetch_array($result)) { echo "<br />Photographer Info:<br />"; echo "Photographer Name: $row[name]<br />"; echo "Photographer Email: $row[email]<br />"; echo "Photographer ID: $row[PHOTOGRAPHERID]<br />"; echo "Photographer Company: $row[c_name]<br />"; echo "Edit Photographer <a href="update.php?id=' . $row[PHOTOGRAPHERID] . '">Here</a>"; } Link to comment https://forums.phpfreaks.com/topic/212556-adding-link-to-edit-a-result/ Share on other sites More sharing options...
Pikachu2000 Posted September 4, 2010 Share Posted September 4, 2010 You're using unescaped double quotes in a double quoted string. echo "Edit Photographer <a href=\"update.php?id={$row['PHOTOGRAPHERID']}\">Here</a>"; Link to comment https://forums.phpfreaks.com/topic/212556-adding-link-to-edit-a-result/#findComment-1107341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.