Forum Moderators: coopster
Here is the is the code:
<?php
if(isset($_COOKIE[userkey])) {
echo '<a href="http://www.example.com/listing_1a.php?id='.$id.'">View More Pictures</a>' ;
}else{
echo '<a href="welcome.html" onclick="return popitup('welcome.html')">View More Pictures</a>';
}
?>
The error occurs on the second "echo", if I remove all of the " & ' the error goes away but clickling on the link does not open the webpage in a pop-up window, it opens it in the same window.
Mark
[edited by: eelixduppy at 10:16 pm (utc) on Sep. 24, 2007]
[edit reason] use example.com for exemplification [/edit]
quick edit ;)
you just have mismatched quotes in the echo in the else
try this
}else{
echo '<a href="welcome.html" onclick="return popitup(\'welcome.html\')">View More Pictures</a>';
}
you need to escape the single quotes inside the echo since you enclosed the line in single quotes