almightyegg Posted March 26, 2008 Share Posted March 26, 2008 I can't see what the problem with this is? Parse error: syntax error, unexpected '}' in /home/lordofth/public_html/editlinks.php on line 101 if(!$setlink && !$set && !$delete && !$cancel){ ?> <b>Custom Links:</b><br> <? if(!$mem[link1]){ echo "<a href='editlinks.php?setlink=1'>Set Link 1</a><br>"; }else{ echo "<a href='$mem[link1]'>$mem[linkn1]</a> [<a href='editlinks.php?setlink=1'>Relink</a>] [<a href='/editlinks.php?delete=1'>Delete</a>]<br>"; } if(!$mem[link2]){ echo "<a href='editlinks.php?setlink=2'>Set Link 2</a><br>"; }else{ echo "<a href='$mem[link2]'>$mem[linkn2]</a> [<a href='editlinks.php?setlink=2'>Relink</a>] [<a href='/editlinks.php?delete=2'>Delete</a>]<br>"; } if(!$mem[link3]){ echo "<a href='editlinks.php?setlink=3'>Set Link 3</a><br>"; }else{ echo "<a href='$mem[link3]'>$mem[linkn3]</a> [<a href='editlinks.php?setlink=3'>Relink</a>] [<a href='/editlinks.php?delete=3'>Delete</a>]<br>"; } if(!$mem[link4]){ echo "<a href='editlinks.php?setlink=4'>Set Link 4</a><br>"; }else{ echo "<a href='$mem[link4]'>$mem[linkn4]</a> [<a href='editlinks.php?setlink=4'>Relink</a>] [<a href='/editlinks.php?delete=4'>Delete</a>]<br>"; } if(!$mem[link5]){ echo "<a href='editlinks.php?setlink=5'>Set Link 5</a><br>"; }else{ echo "<a href='$mem[link5]'>$mem[linkn5]</a> [<a href='editlinks.php?setlink=5'>Relink</a>] [<a href='/editlinks.php?delete=5'>Delete</a>]<br>"; } }elseif(is_numeric($setlink) == TRUE){ $update = mysql_query("UPDATE users SET qlupdate='$setlink' WHERE id='{$mem['id']}'"); echo "Direct to the page you wish to link in and confirm it on the right panel under the other links."; }elseif($set == yes){ $link = $_POST['link']; $linkn = $_POST['linkn']; if(!$link){ echo "You haven't selected a link!"; }else{ $l = "link$mem[qlupdate]"; $n = "linkn$mem[qlupdate]"; $update = mysql_query("UPDATE users SET $l='$link',$n='$linkn',qlupdate='No' WHERE id='{$mem['id']}'"); echo "Your custom link was updated."; } }elseif(is_numeric($delete) == TRUE){ $update = mysql_query("UPDATE users SET link$delete='',linkn$delete='' WHERE id='{$mem['id']}'"); echo "You removed custom link number $delete."; }elseif($cancel = yes){ $update = mysql_query("UPDATE users SET qlupdate='No' WHERE id='{$mem['id']}'"); echo "You cancelled the updating process."; } ?> I can't spot why it might be unexpected... any help would be greatly appreciated Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 26, 2008 Share Posted March 26, 2008 where is that line? Quote Link to comment Share on other sites More sharing options...
brevig Posted March 26, 2008 Share Posted March 26, 2008 hi towards the bottom if statement $cancel = yes should be $cancel == yes few more tips: $l = "link$mem[qlupdate]"; $n = "linkn$mem[qlupdate]"; should be: $l = "link{$mem[qlupdate]}"; $n = "linkn{$mem[qlupdate]}"; One more: don't test if a var is set like this: !$var use isSet() like this: !isSet($var) I'd read through your php log file and correct the warnings it's printing Quote Link to comment Share on other sites More sharing options...
almightyegg Posted March 26, 2008 Author Share Posted March 26, 2008 What the ?? I just went to check and it doesn't even have 101 lines.... then I refreshed the web page and the error had gone ?? 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.