• I have the below quote, i have to read from the other database to the added page in wordpress page. how do we do that.

    the code are below:experts please help me. added the Plugin Insert PHP and also PHP widget. still there is error in reading from the database which is exist there. how do we connect to other database and retrive the data in the form with php and Sql fetch code

    Code starts…….

    [insert_php]

    $tbl = "";
    		$rs = $db->query("SELECT * FROM project_list WHERE (category = 'NAMA')");
    
    		$rs->data_seek(0);
    		while ($row = $rs->fetch_assoc()) {
    			$tbl .= "<tr>" .
    					"<td><a>" . $row['national_id'] . "</td>" .
    					"<td></a><a>" . $row['unfccc_code'] . "</td>" .
    					"<td>" . $row['proj_title'] . "</td>" .
    					"<td>" . $row['proj_description'] . "</td>" .
    					"<td>" . $row['proj_status'] . "</td>" .
    					"</tr>";
    		}
    
    		$db->close();
    
    	[\insert_php]
    
    		<table width="90%" cellpadding="0" cellspacing="0" class="table table-striped table-bordered" id="example" >
    			<thead>
    			<tr>
    				<th>National ID</th>
    				<th>UFCCC Code</th>
    				<th>Title</th>
    				<th>Description</th>
    				<th>Status</th>
    			</tr>
    			</thead>
    			<tbody>
    				[insert_php]
                                       echo $tbl;
                                     [\insert_php]
    			</tbody>
    		</table></a>

The topic ‘read from other database in to form.’ is closed to new replies.