Can anyone help with this parse error = urgent (isn't it always?)!

Error message:
Parse error: parse error, unexpected '}' in /home/fhlinux195/i/ibsweb.co.uk/user/htdocs/Business-Links/libs/liblinks.php on line 1

<SCRIPT>
function copyclipboard(intext){ if (window.clipboardData) { // IE-only (function developed by IRCspy.com) window.clipboardData.setData("Text", intext); alert('The Link has been copied to your clipboard.\n\nTo visit the wesite now, simply click on the underlined text. To use later, right-click and paste the link into the address bar of your browser or into a notepad or other doument.'); } }</SCRIPT>
<?function show_country_dropdown($cid, $db){ global $links_count; $q_count = "SELECT link_id FROM links WHERE link_status ='ok'"; $r_count = mysql_query($q_count, $db); $links_count = mysql_num_rows($r_count); if(!isset($cid)) { $query = "SELECT * FROM countries ORDER BY country_name ASC"; $result = mysql_query($query, $db); ?> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function check_empty_drop() { if ((document.countries_dropdown.cid.value == "0") || (document.countries_dropdown.cid.value == "1")) { alert('Please select a country before continuing'); } else { document.countries_dropdown.submit(); } } //--> </SCRIPT>

Would really appreciate any help - have some more developing work php coding for anyone willing to quote for it, including
- interactive world map
- members area (partly already in place, but needs rebuilding using MCP).

james

    <SCRIPT> 
    function copyclipboard(intext){ if (window.clipboardData) { // IE-only (function developed by IRCspy.com) window.clipboardData.setData("Text", intext); alert('The Link has been copied to your clipboard.\n\nTo visit the wesite now, simply click on the underlined text. To use later, right-click and paste the link into the address bar of your browser or into a notepad or other doument.'); } }</SCRIPT> 
    <?function show_country_dropdown($cid, $db){ global $links_count; $q_count = "SELECT link_id FROM links WHERE link_status ='ok'"; $r_count = mysql_query($q_count, $db); $links_count = mysql_num_rows($r_count); if(!isset($cid)) { $query = "SELECT * FROM countries ORDER BY country_name ASC"; $result = mysql_query($query, $db); ?> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function check_empty_drop() { if ((document.countries_dropdown.cid.value == "0") || (document.countries_dropdown.cid.value == "1")) { alert('Please select a country before continuing'); } else { document.countries_dropdown.submit(); } } //--> </SCRIPT> 
      <SCRIPT>
      function copyclipboard(intext){ if (window.clipboardData) { // IE-only (function developed by IRCspy.com) window.clipboardData.setData("Text", intext); alert('The Link has been copied to your clipboard.\n\nTo visit the wesite now, simply click on the underlined text. To use later, right-click and paste the link into the address bar of your browser or into a notepad or other doument.'); } }</SCRIPT>
      
      <?
      function show_country_dropdown($cid, $db)
      {
      	global $links_count; 
      	$q_count = "SELECT link_id FROM links WHERE link_status ='ok'"; 
      	$r_count = mysql_query($q_count, $db); $links_count = mysql_num_rows($r_count); 
      	if(!isset($cid)) 
      	{ 
      		$query = "SELECT * FROM countries ORDER BY country_name ASC"; $result = mysql_query($query, $db); 
      		?> 
      		<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> 
      		<!-- 
      		function check_empty_drop() 
      		{ 
      			if ((document.countries_dropdown.cid.value == "0") || (document.countries_dropdown.cid.value == "1")) 
      			{ 
      				alert('Please select a country before continuing'); } 
      			else 
      			{ document.countries_dropdown.submit(); } 
      		} //--> </SCRIPT> 
      		<?
      	}
      }
      ?>
      

      This would have been a lot easier if you wouldn't create code on one line of code. You should try something like what I did above, it's a lot easier to find your mistakes.

        Thanks very much Ian, understand your point about layout. You can tell that I am not php expert and that this was done for me, but the point is well made. Will try the code now.
        Rgds
        James

          Write a Reply...