error in pagination
===

I get this error in pagination system 

 Parse error: syntax error, unexpected '$sql' (T_VARIABLE) in D:\Xampp\htdocs\Test\Pagination\pagi.php on line 19

This is my code

    <?php
			//connect to DB
			mysql_connect( 'localhost', 'root', 'password') ;
			mysql_select_db( 'test1' ) ;
			
			//preparing variable.
			if( !isset( $_GET['p'] ) ) {$_GET['p']=0;}
			$per_page= 4 ;
			$sql=  " SELECT name FROM pagination "
			$sql2= " SELECT name FROM pagination ORDER BY id DESC LIMIT ".$_GET['p']."," . $per_page; 
			$query= mysql_query ( $sql2 ) ;
			$rows=  mysql_num_rows ( mysql_query ( $sql ) ) ;
			$page=  ceil ( $rows / $per_page ) ;
			
			while( $fetch= mysql_fetch_assoc( $query ) ) {
				echo '<p>' . $fetch['id'] . '</p>' ;
			}
			
			for( $i=0;$i<$page;$i++ ){
			
				echo' <a href="index.php?p='. ( $i * $per_page ) . '">'. ( $i + 1 ) .'</a> ' ;
				
			}

		?>